From 6e7351d4c179f2093f1dba42f85ce55b9332f48a Mon Sep 17 00:00:00 2001 From: puriphatt Date: Fri, 22 Mar 2024 19:27:55 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4:=20=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=AD=E0=B8=B7=E0=B9=88=E0=B8=99=E0=B9=86?= =?UTF-8?q?,=20=E0=B8=9C=E0=B8=A5=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=AF=20(refactor)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Achievement/05_ResultsPerformance.vue | 10 ++----- .../detail/Other/01_OtherInformation.vue | 30 ++++--------------- .../Other/01_OtherInformationHistory.vue | 25 +++------------- 3 files changed, 13 insertions(+), 52 deletions(-) diff --git a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue index 6f92cced5..c653756f1 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue @@ -365,12 +365,8 @@ function onSubmit() { dialogConfirm( $q, async () => { - myForm.value?.validate().then(async (result: boolean) => { - if (result) { - addEditData(isEdit.value); - modal.value = false; - } - }); + addEditData(isEdit.value); + modal.value = false; }, "ยืนยันการบันทึกข้อมูล", "ต้องการยืนยันการบันทึกข้อมูลนี้หรือไม่ ?" @@ -587,7 +583,7 @@ onMounted(async () => { - + { - const hasError = []; - for (const key in objectRef) { - if (Object.prototype.hasOwnProperty.call(objectRef, key)) { - const property = objectRef[key]; - if (property.value && typeof property.value.validate === "function") { - const isValid = property.value.validate(); - hasError.push(isValid); - } - } - } - if (hasError.every((result) => result === true)) { - if (edit.value) { - editData(); - } else { - saveData(); - } + if (edit.value) { + editData(); + } else { + saveData(); } }, "ยืนยันการบันทึกข้อมูล", @@ -228,12 +216,6 @@ async function getData() { // }); // } -const infoRows = [ - { title: "รายละเอียด", value: "" }, - { title: "ล้างมลทิน", value: "" }, - { title: "เลขที่คำสั่ง", value: "" }, - { title: "เอกสารอ้างอิง (ลงวันที่)", value: "" }, -]; onMounted(() => { getData(); }); @@ -467,7 +449,7 @@ onMounted(() => { -
+ @@ -541,7 +523,7 @@ onMounted(() => { บันทึกข้อมูล - +
diff --git a/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue b/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue index 0b2142c41..2ef2777a6 100644 --- a/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue +++ b/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue @@ -3,9 +3,7 @@ import { ref, watch, reactive } from "vue"; import DialogHeader from "@/components/DialogHeader.vue"; import { useCounterMixin } from "@/stores/mixin"; import { useQuasar, type QTableProps } from "quasar"; -import type { - RowList, -} from "@/modules/04_registryNew/interface/index/other"; +import type { RowList } from "@/modules/04_registryNew/interface/index/other"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -93,7 +91,8 @@ const columns = ref([ ]); function getHistory() { showLoader(); - http.get(config.API.profileNewOtherHisById(id.value)) + http + .get(config.API.profileNewOtherHisById(id.value)) .then((res) => { let data = res.data.result; rows.value = []; @@ -201,23 +200,7 @@ watch(modal, (status) => {