From f988b3add4d9ad31bc853368069b81ce76a99933 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Mon, 2 Dec 2024 14:02:17 +0700 Subject: [PATCH] update master --- src/helpers/common.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/helpers/common.ts b/src/helpers/common.ts index 2a4e6f2..d37f948 100644 --- a/src/helpers/common.ts +++ b/src/helpers/common.ts @@ -163,12 +163,17 @@ export default class CommonHelper { } } - let whereAttr = ''; - if (whereAttrPre.length > 0) { - whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + (param.additional_where ?? ''); - } else { - whereAttr += param.additional_where; - } + + const whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + (param.additional_where ?? ''); + + // let whereAttr = ''; + // if (whereAttrPre.length > 0) { + // whereAttr = whereAttrPre.join(' and ') + (whereAttrPre.length > 0 && param.additional_where != '' ? ' and ' : '') + param.additional_where; + // } else { + // whereAttr += param.additional_where; + // } + + // console.log('whereAttr', whereAttr) return { whereAttr, whereVal };