From 06bf78e68ae12e86b6d5e6a16c014ab27b52b6d0 Mon Sep 17 00:00:00 2001 From: joseph le Date: Wed, 11 Oct 2023 16:41:16 +0700 Subject: [PATCH] Create function check status for other system --- app/utils/sendStatusOtherSystem.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/utils/sendStatusOtherSystem.js b/app/utils/sendStatusOtherSystem.js index 81a6a87..25f1774 100644 --- a/app/utils/sendStatusOtherSystem.js +++ b/app/utils/sendStatusOtherSystem.js @@ -1014,13 +1014,13 @@ const checkMultipleRequest = async () => { }); await Promise.all(promises); - + let listShipping = report.filter((i)=>i.group==="Shipping System").sort((a, b) => a.group.localeCompare(b.group)) + report = report.filter((i)=>i.group!=="Shipping System").concat(listShipping).sort((a, b) => a.group.localeCompare(b.group)) let groupName = report?.sort((a, b) => a.group.localeCompare(b.group))[0] ?.group; let no = 0; content += "||**" + groupName + "**|||\n"; report - .sort((a, b) => a.group.localeCompare(b.group)) ?.map((u, index) => { no += 1; if (u.group === groupName) { @@ -1034,6 +1034,7 @@ const checkMultipleRequest = async () => { "|" + no + "|" + u.name + "|**" + time + "**|" + u.status + "|\n"; } }); + let params = { type: "stream", to: "Result test - auto.nswteam.net",