From 779e33d2a5da13552d9d865a73c3ca055c000a19 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 10 Sep 2024 15:10:18 +0700 Subject: [PATCH] Refactoring code module 10_registry --- .../01_Information/01_Information.vue | 47 ++- .../01_Information/02_ChangeName.vue | 19 +- .../10_registry/01_Information/03_Address.vue | 6 +- .../10_registry/01_Information/04_Family.vue | 39 +- .../01_Information/05_Educations.vue | 19 +- .../10_registry/01_Information/06_Ability.vue | 17 +- .../02_Government/01_Government.vue | 26 +- .../02_Government/02_Discipline.vue | 98 +---- .../10_registry/02_Government/03_Leave.vue | 20 +- .../10_registry/02_Government/04_Duty.vue | 11 +- .../10_registry/03_Salary/01_Salary.vue | 24 +- .../10_registry/03_Salary/02_Nopaid.vue | 15 +- .../04_Achievement/01_Certificate.vue | 19 +- .../04_Achievement/02_Training.vue | 16 +- .../04_Achievement/03_Insignia.vue | 20 +- .../10_registry/04_Achievement/04_Honor.vue | 18 +- .../04_Achievement/05_Assessments.vue | 16 +- .../04_Achievement/06_DevelopmentPlan.vue | 7 +- src/modules/10_registry/05_Other/01_Other.vue | 23 +- src/modules/10_registry/05_Other/02_File.vue | 13 +- .../10_registry/Dialog/DialogDevelopmant.vue | 1 - .../10_registry/Dialog/DialogHistory.vue | 4 +- .../components/DialogAddRequestEdit.vue | 5 +- .../10_registry/interface/index/Main.ts | 378 +++++++++++++++++- .../interface/response/01_Information.ts | 20 +- 25 files changed, 605 insertions(+), 276 deletions(-) diff --git a/src/modules/10_registry/01_Information/01_Information.vue b/src/modules/10_registry/01_Information/01_Information.vue index b4063f7..83a33f9 100644 --- a/src/modules/10_registry/01_Information/01_Information.vue +++ b/src/modules/10_registry/01_Information/01_Information.vue @@ -4,19 +4,19 @@ import { useQuasar, type QTableColumn, type QTableProps } from "quasar"; import { ref, reactive, onMounted } from "vue"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; -//history dialog -import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue"; - import http from "@/plugins/http"; import config from "@/app.config"; -const store = useRegistryInFormationStore(); -const rowsHistory = ref([]); +import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue"; + const $q = useQuasar(); +const store = useRegistryInFormationStore(); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai } = mixin; +const rowsHistory = ref([]); const modalHistory = ref(false); + /** ตัวแปรข้อมูล */ const formDataInformation = reactive({ citizenId: "", //เลขประจำตัวประชาชน @@ -26,7 +26,6 @@ const formDataInformation = reactive({ birthDate: "", //วันเกิด gender: "", //เพศ relationship: "", //สถานภาพ - nationality: "", //สัญชาติ ethnicity: "", //เชื้อชาติ religion: "", //ศาสนา @@ -34,6 +33,24 @@ const formDataInformation = reactive({ phone: "", //เบอร์โทร }); +const visibleColumnsHistory = ref([ + "citizenId", + "prefix", + "rank", + "firstName", + "lastName", + "birthDate", + "gender", + "relationship", + "bloodGroup", + "nationality", + "ethnicity", + "religion", + "phone", + "createdFullName", + "createdAt", +]); + const columnsHistory = ref([ { name: "citizenId", @@ -204,24 +221,6 @@ const columnsHistory = ref([ }, ]); -const visibleColumnsHistory = ref([ - "citizenId", - "prefix", - "rank", - "firstName", - "lastName", - "birthDate", - "gender", - "relationship", - "bloodGroup", - "nationality", - "ethnicity", - "religion", - "phone", - "createdFullName", - "createdAt", -]); - function onHistory() { modalHistory.value = true; } diff --git a/src/modules/10_registry/01_Information/02_ChangeName.vue b/src/modules/10_registry/01_Information/02_ChangeName.vue index 71fe2b1..024d280 100644 --- a/src/modules/10_registry/01_Information/02_ChangeName.vue +++ b/src/modules/10_registry/01_Information/02_ChangeName.vue @@ -1,23 +1,24 @@