From 3909d816a9700a02297148847ef223046f2730c9 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 11 Sep 2023 16:22:50 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=20message=20error?= =?UTF-8?q?=20=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=97=E0=B8=94=E0=B8=A5?= =?UTF-8?q?=E0=B8=AD=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/MainProbation.vue | 8 ++------ src/stores/mixin.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index 861afdfbd..b4420a844 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -189,7 +189,7 @@ const ProbationMainFilter = () => { }; const dataUpdate = ref([]); const updateRows = (body: any) => { - console.log(body.value); + // console.log(body.value); if (body.value !== "ทั้งหมด") { const filteredRows = dataUpdate.value.filter( (item: any) => item.probation_status === body.value @@ -207,10 +207,6 @@ const getpersonalList = async () => { .then((res) => { const data = res.data.data; fillterStatus.value = data; - console.log( - "🚀 ~ file: MainProbation.vue:193 ~ .then ~ fillterStatus:", - fillterStatus - ); rows.value = data.map((item: FormMainProbation) => ({ personal_id: item.personal_id, name: item.name, @@ -282,7 +278,7 @@ const findlist = async (id: string) => { response2.forEach((e: any) => probationlist.value.push({ ...e, probation: false }) ); - console.log(probationlist.value); + // console.log(probationlist.value); rows2.value = probationlist.value.map((e: any) => ({ id: e.id, fullname: e.fullname, diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index 463b8e2ac..9e837b61f 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -353,6 +353,17 @@ export const useCounterMixin = defineStore("mixin", () => { onlycancel: true, }, }); + } else if (e.response.data.successful === false) { + q.dialog({ + component: CustomComponent, + componentProps: { + title: `พบข้อผิดพลาด`, + message: e.response.data.message, + icon: "warning", + color: "red", + onlycancel: true, + }, + }); } else { q.dialog({ component: CustomComponent, From a81b3a3853ebe22383c09133c23e3b8d990b5d16 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Mon, 11 Sep 2023 16:46:56 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5?= =?UTF-8?q?=E0=B9=88=20invalid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MainLayout.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index b874856d6..6ae085dc9 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -99,7 +99,7 @@ const getDataNotification = async () => { ? "เจ้าหน้าที่"[0] : e.createdFullName[0], body: e.body ?? "", - timereceive: new Date(e.createdAt), + timereceive: new Date(e.receiveDate), }); }); notiList.value = list;