From 5276ba4db37ea459b815cda00839bf8692d7e2b3 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:52:16 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20Fetchdata=20?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=B1=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_metadata/components/insignia/Insignia.vue | 9 ++++++--- .../components/insignia/InsigniaType.vue | 13 ++++++++----- .../01_metadata/components/organization/Fax.vue | 13 ++++++++----- .../01_metadata/components/organization/Level.vue | 9 +++++---- .../components/organization/Organization.vue | 12 +++++++----- .../components/organization/ShortName.vue | 13 ++++++++----- .../01_metadata/components/organization/Status.vue | 11 +++++++---- .../components/organization/TelExternal.vue | 13 ++++++++----- .../components/organization/TelInternal.vue | 13 ++++++++----- .../01_metadata/components/organization/Type.vue | 13 ++++++++----- src/modules/01_metadata/components/person/Blood.vue | 13 ++++++++----- .../01_metadata/components/person/Education.vue | 13 ++++++++----- .../01_metadata/components/person/Gender.vue | 10 ++++++---- .../01_metadata/components/position/Level.vue | 11 +++++++---- .../01_metadata/components/position/Line.vue | 12 ++++++++---- .../01_metadata/components/position/Path.vue | 11 +++++++---- .../01_metadata/components/position/PathSide.vue | 12 +++++++----- .../01_metadata/components/position/Status.vue | 9 ++++++--- .../01_metadata/components/position/Type.vue | 9 ++++++--- .../components/positionEmployee/Group.vue | 11 +++++++---- .../components/positionEmployee/Level.vue | 11 +++++++---- .../components/positionEmployee/Line.vue | 11 +++++++---- .../components/positionEmployee/Position.vue | 10 ++++++---- .../components/positionEmployee/PositionSide.vue | 11 +++++++---- .../components/positionEmployee/Status.vue | 13 ++++++++----- 25 files changed, 178 insertions(+), 108 deletions(-) diff --git a/src/modules/01_metadata/components/insignia/Insignia.vue b/src/modules/01_metadata/components/insignia/Insignia.vue index 242413725..ecc746a5b 100644 --- a/src/modules/01_metadata/components/insignia/Insignia.vue +++ b/src/modules/01_metadata/components/insignia/Insignia.vue @@ -809,8 +809,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -846,7 +847,7 @@ const checkDupDataShortName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -854,6 +855,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -861,6 +863,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -868,7 +871,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/insignia/InsigniaType.vue b/src/modules/01_metadata/components/insignia/InsigniaType.vue index 493e21f85..cfeac7a8e 100644 --- a/src/modules/01_metadata/components/insignia/InsigniaType.vue +++ b/src/modules/01_metadata/components/insignia/InsigniaType.vue @@ -454,7 +454,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -473,7 +473,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -542,8 +542,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -565,7 +566,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -573,6 +574,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -580,6 +582,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -587,7 +590,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/Fax.vue b/src/modules/01_metadata/components/organization/Fax.vue index 4ca08c1cd..11a675e39 100644 --- a/src/modules/01_metadata/components/organization/Fax.vue +++ b/src/modules/01_metadata/components/organization/Fax.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/Level.vue b/src/modules/01_metadata/components/organization/Level.vue index 6ff4a3224..38b3efe00 100644 --- a/src/modules/01_metadata/components/organization/Level.vue +++ b/src/modules/01_metadata/components/organization/Level.vue @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -591,7 +592,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/Organization.vue b/src/modules/01_metadata/components/organization/Organization.vue index cc211ee3c..4f6d1a7b2 100644 --- a/src/modules/01_metadata/components/organization/Organization.vue +++ b/src/modules/01_metadata/components/organization/Organization.vue @@ -492,7 +492,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -511,7 +511,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -581,8 +581,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -604,7 +605,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -612,6 +613,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -626,7 +628,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/ShortName.vue b/src/modules/01_metadata/components/organization/ShortName.vue index b145fc4cc..d93096222 100644 --- a/src/modules/01_metadata/components/organization/ShortName.vue +++ b/src/modules/01_metadata/components/organization/ShortName.vue @@ -589,7 +589,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -608,7 +608,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -683,8 +683,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -725,7 +726,7 @@ const checkDupDataName = (row: any) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -733,6 +734,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -740,6 +742,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -747,7 +750,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/Status.vue b/src/modules/01_metadata/components/organization/Status.vue index fa4acb234..baf15ad77 100644 --- a/src/modules/01_metadata/components/organization/Status.vue +++ b/src/modules/01_metadata/components/organization/Status.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -548,6 +548,7 @@ const save = async (publish: boolean) => { }) .finally(() => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/TelExternal.vue b/src/modules/01_metadata/components/organization/TelExternal.vue index 8998ce81d..5eb7278ba 100644 --- a/src/modules/01_metadata/components/organization/TelExternal.vue +++ b/src/modules/01_metadata/components/organization/TelExternal.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/TelInternal.vue b/src/modules/01_metadata/components/organization/TelInternal.vue index 4d83ae654..1cdf05949 100644 --- a/src/modules/01_metadata/components/organization/TelInternal.vue +++ b/src/modules/01_metadata/components/organization/TelInternal.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/organization/Type.vue b/src/modules/01_metadata/components/organization/Type.vue index ce056c12b..e078fcfe6 100644 --- a/src/modules/01_metadata/components/organization/Type.vue +++ b/src/modules/01_metadata/components/organization/Type.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/person/Blood.vue b/src/modules/01_metadata/components/person/Blood.vue index f0c143882..96e057c6a 100644 --- a/src/modules/01_metadata/components/person/Blood.vue +++ b/src/modules/01_metadata/components/person/Blood.vue @@ -457,7 +457,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -476,7 +476,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -545,8 +545,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -568,7 +569,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -576,6 +577,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -583,6 +585,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -590,7 +593,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/person/Education.vue b/src/modules/01_metadata/components/person/Education.vue index 93aa2740d..7c2499371 100644 --- a/src/modules/01_metadata/components/person/Education.vue +++ b/src/modules/01_metadata/components/person/Education.vue @@ -454,7 +454,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -473,7 +473,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -542,8 +542,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -565,7 +566,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -573,6 +574,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -580,6 +582,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -587,7 +590,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/person/Gender.vue b/src/modules/01_metadata/components/person/Gender.vue index 6bd7aeec4..2f29725dd 100644 --- a/src/modules/01_metadata/components/person/Gender.vue +++ b/src/modules/01_metadata/components/person/Gender.vue @@ -454,7 +454,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -473,7 +473,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -565,7 +565,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -573,6 +573,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -580,6 +581,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -587,7 +589,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/Level.vue b/src/modules/01_metadata/components/position/Level.vue index 9ba9bd4ff..d9c908026 100644 --- a/src/modules/01_metadata/components/position/Level.vue +++ b/src/modules/01_metadata/components/position/Level.vue @@ -576,7 +576,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -595,7 +595,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -668,8 +668,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -713,6 +714,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -720,6 +722,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -727,7 +730,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/Line.vue b/src/modules/01_metadata/components/position/Line.vue index 4ed4ec1ce..71b36a8a7 100644 --- a/src/modules/01_metadata/components/position/Line.vue +++ b/src/modules/01_metadata/components/position/Line.vue @@ -436,6 +436,7 @@ const fetchHistory = async () => { }) .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -455,7 +456,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -474,7 +475,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -543,8 +544,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -574,6 +576,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -581,6 +584,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -588,7 +592,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/Path.vue b/src/modules/01_metadata/components/position/Path.vue index 4a853ce0e..ec99114dd 100644 --- a/src/modules/01_metadata/components/position/Path.vue +++ b/src/modules/01_metadata/components/position/Path.vue @@ -474,6 +474,7 @@ const fetchHistory = async () => { }) .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -512,7 +513,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -582,8 +583,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -605,7 +607,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -620,6 +622,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -627,7 +630,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/PathSide.vue b/src/modules/01_metadata/components/position/PathSide.vue index 98f8ef868..25f500cfb 100644 --- a/src/modules/01_metadata/components/position/PathSide.vue +++ b/src/modules/01_metadata/components/position/PathSide.vue @@ -497,7 +497,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -516,7 +516,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -586,8 +586,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -609,7 +610,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -624,6 +625,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -631,7 +633,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/Status.vue b/src/modules/01_metadata/components/position/Status.vue index 2adf4c7be..8c9bd287e 100644 --- a/src/modules/01_metadata/components/position/Status.vue +++ b/src/modules/01_metadata/components/position/Status.vue @@ -459,7 +459,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -547,8 +547,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -578,6 +579,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -585,6 +587,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -592,7 +595,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/position/Type.vue b/src/modules/01_metadata/components/position/Type.vue index d3c92bed5..90016d15b 100644 --- a/src/modules/01_metadata/components/position/Type.vue +++ b/src/modules/01_metadata/components/position/Type.vue @@ -455,7 +455,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -474,7 +474,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -545,6 +545,7 @@ const save = async (publish: boolean) => { }) .finally(() => { hideLoader(); + await fetchData(true); }); }; @@ -574,6 +575,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -581,6 +583,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -588,7 +591,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/Group.vue b/src/modules/01_metadata/components/positionEmployee/Group.vue index 26f32eca3..00c538863 100644 --- a/src/modules/01_metadata/components/positionEmployee/Group.vue +++ b/src/modules/01_metadata/components/positionEmployee/Group.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/Level.vue b/src/modules/01_metadata/components/positionEmployee/Level.vue index 58e30aa71..e13ba6cdc 100644 --- a/src/modules/01_metadata/components/positionEmployee/Level.vue +++ b/src/modules/01_metadata/components/positionEmployee/Level.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/Line.vue b/src/modules/01_metadata/components/positionEmployee/Line.vue index 031581b62..5baf19592 100644 --- a/src/modules/01_metadata/components/positionEmployee/Line.vue +++ b/src/modules/01_metadata/components/positionEmployee/Line.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/Position.vue b/src/modules/01_metadata/components/positionEmployee/Position.vue index e27bbf862..874901210 100644 --- a/src/modules/01_metadata/components/positionEmployee/Position.vue +++ b/src/modules/01_metadata/components/positionEmployee/Position.vue @@ -496,7 +496,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -515,7 +515,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -587,6 +587,7 @@ const save = async (publish: boolean) => { }) .finally(() => { hideLoader(); + await fetchData(true); }); }; @@ -608,7 +609,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -623,6 +624,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -630,7 +632,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/PositionSide.vue b/src/modules/01_metadata/components/positionEmployee/PositionSide.vue index 22584ada8..6e5a6bbbb 100644 --- a/src/modules/01_metadata/components/positionEmployee/PositionSide.vue +++ b/src/modules/01_metadata/components/positionEmployee/PositionSide.vue @@ -496,7 +496,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -515,7 +515,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -588,8 +588,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -619,6 +620,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -626,6 +628,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -633,7 +636,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /** diff --git a/src/modules/01_metadata/components/positionEmployee/Status.vue b/src/modules/01_metadata/components/positionEmployee/Status.vue index ba2fe9bac..240deb801 100644 --- a/src/modules/01_metadata/components/positionEmployee/Status.vue +++ b/src/modules/01_metadata/components/positionEmployee/Status.vue @@ -458,7 +458,7 @@ const clearPublishedData = async () => { }) .finally(async () => { await fetchHistory(); - await fetchData(); + await fetchData(true); }); }; @@ -477,7 +477,7 @@ const publishedData = async () => { messageError($q, e); }) .finally(async () => { - await fetchData(); + await fetchData(true); }); }; @@ -546,8 +546,9 @@ const save = async (publish: boolean) => { .catch((e) => { messageError($q, e); }) - .finally(() => { + .finally(async () => { hideLoader(); + await fetchData(true); }); }; @@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => { * ฟังก์ชันปุ่มแก้ไข ให้ get data มาใหม่ */ const clickEdit = async () => { - await fetchData(); + await fetchData(true); }; /** @@ -577,6 +578,7 @@ const clickEdit = async () => { */ const clickSave = async () => { await save(false); + await fetchData(true); }; /** @@ -584,6 +586,7 @@ const clickSave = async () => { */ const clickDelete = async () => { await clearPublishedData(); + await fetchData(true); }; /** @@ -591,7 +594,7 @@ const clickDelete = async () => { */ const clickCancel = async () => { edit.value = false; - await fetchData(); + await fetchData(true); }; /**