From 8a95e0dae117ceac1f7ea33d61d9c071029ead03 Mon Sep 17 00:00:00 2001 From: Nilotpal Saha Date: Wed, 19 Feb 2025 14:20:00 +0530 Subject: [PATCH 1/3] =?UTF-8?q?fix(core):=20=E2=9A=A1=20count=20fix=20for?= =?UTF-8?q?=20business=20entity=20get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit count fix for business entity get Ref #203 --- .../_system/functions/businessEntity.get.helper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/modules/_system/functions/businessEntity.get.helper.ts b/package/modules/_system/functions/businessEntity.get.helper.ts index b853b17..0d6f5bf 100644 --- a/package/modules/_system/functions/businessEntity.get.helper.ts +++ b/package/modules/_system/functions/businessEntity.get.helper.ts @@ -103,9 +103,9 @@ const getEntityDataCount = async ( _options ); - const _count = Array.isArray(rows) ? rows.length : 0; + // const _count = Array.isArray(rows) ? rows.length : 0; - return _count; + return count; } catch (error: any) { WrappidLogger.error("-------------------------------------"); WrappidLogger.error("getBusinessEntity.helper>getEntityData"); @@ -241,9 +241,9 @@ const getEntityDataName = async (entityName: string, query: GenericObject, user? _options ); - const _count = Array.isArray(rows) ? rows.length : 0; + // const _count = Array.isArray(rows) ? rows.length : 0; - return { columns: columns, rows: rows, totalRecords: _count }; + return { columns: columns, rows: rows, totalRecords: count }; } catch (error: any) { WrappidLogger.error("-------------------------------------"); WrappidLogger.error("getBusinessEntity.helper>getEntityData"); From a72d385111c3589ca7261c3ad721d9550a1e2bd6 Mon Sep 17 00:00:00 2001 From: anantakumarghosh Date: Wed, 19 Feb 2025 14:32:17 +0530 Subject: [PATCH 2/3] fix(utils): :rotating_light: lint issues exported createWhatsappMessageBody, causing lint issues ref #203 --- package/utils/communication.utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/communication.utils.ts b/package/utils/communication.utils.ts index 9fc28a3..1c9c67d 100644 --- a/package/utils/communication.utils.ts +++ b/package/utils/communication.utils.ts @@ -187,7 +187,7 @@ export function getMessageObject( * @param data Template Variable * @returns message body */ -function createWhatsappMessageBody(template: any, data: any): any { +export function createWhatsappMessageBody(template: any, data: any): any { // console.log("TEMPLATE", template); const keys = Object.keys(data); let newBody = From b8c5ae3d50e436917046b1f2c4071f9be7a8a396 Mon Sep 17 00:00:00 2001 From: Nilotpal Saha Date: Wed, 19 Feb 2025 14:57:07 +0530 Subject: [PATCH 3/3] =?UTF-8?q?fix(core):=20=E2=9A=A1=20fix=20eslint=20err?= =?UTF-8?q?or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix eslint error Ref #203 --- package/utils/communication.utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/package/utils/communication.utils.ts b/package/utils/communication.utils.ts index 1c9c67d..c0d18d3 100644 --- a/package/utils/communication.utils.ts +++ b/package/utils/communication.utils.ts @@ -187,6 +187,7 @@ export function getMessageObject( * @param data Template Variable * @returns message body */ +// eslint-disable-next-line no-unused-vars export function createWhatsappMessageBody(template: any, data: any): any { // console.log("TEMPLATE", template); const keys = Object.keys(data);