From 9e8130df53c97d5fc9f0515f83282f4f825376d9 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Mon, 2 Dec 2024 14:02:14 +0700 Subject: [PATCH] update user --- src/helpers/common.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/helpers/common.ts b/src/helpers/common.ts index f137492..a0e3d0d 100644 --- a/src/helpers/common.ts +++ b/src/helpers/common.ts @@ -192,12 +192,14 @@ 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; + // } return { whereAttr, whereVal };