From 5947797d267be0760c7cbafceee88468664d00c2 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 18 Oct 2023 12:00:11 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20value=20=3D>=20na?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11_discipline/stroes/InvestigateFactStore.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/11_discipline/stroes/InvestigateFactStore.ts b/src/modules/11_discipline/stroes/InvestigateFactStore.ts index 6c40d31a1..99c039f89 100644 --- a/src/modules/11_discipline/stroes/InvestigateFactStore.ts +++ b/src/modules/11_discipline/stroes/InvestigateFactStore.ts @@ -26,23 +26,26 @@ export const useInvestigateFactStore = defineStore("DisciplineInvestigateFact", function filterFnOptionsType(val: string, update: any, type: string) { update(() => { const needle = val.toLowerCase(); + if (type === "faultOp") { faultOp.value = faultOps.value.filter( - (v: any) => v.value.toLowerCase().indexOf(needle) > -1 + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 ); + } else if (type === "investigationOp") { investigationOp.value = investigationOps.value.filter( - (v: any) => v.value.toLowerCase().indexOf(needle) > -1 + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 ); } else if (type === "daysExtendOp") { daysExtendOp.value = daysExtendOps.value.filter( - (v: any) => v.value.toLowerCase().indexOf(needle) > -1 + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 ); } + }); } - async function fecthList(data:investigatefactsDataRowType[]) { - let datalist:investigatefactsDataRowType[] = data.map((e: any) => ({ + async function fecthList(data: investigatefactsDataRowType[]) { + let datalist: investigatefactsDataRowType[] = data.map((e: any) => ({ subject: e.subject, interrogated: e.interrogated, fault: e.fault ?? convertFault(e.fault),