From ec04bc2e1ef123f5553b20b94419cd86e7e14dc2 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 11 Jul 2024 00:44:34 +0700 Subject: [PATCH 01/13] fixing --- .../detail/PersonalInformation/01_Profile.vue | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue index 6ca2aaab9..03579f3ab 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -137,7 +137,9 @@ const columnsHistory = ref([ field: "birthDate", headerStyle: "font-size: 14px", style: "font-size: 14px", - format: (v) => date2Thai(v), + format: (v) => { + return v ? date2Thai(v) : ""; + }, sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, @@ -265,17 +267,15 @@ async function getData() { showLoader(); http .get(config.API.registryNewByProfileId(profileId.value, empType.value)) - .then(async (res) => { - informaData.value = await res.data.result; - if (informaData.value) { - id.value = informaData.value.id; + .then((res) => { + informaData.value = res.data.result; + id.value = res.data.result.id; - if (informaData.value.birthDate) { - console.log("birthDate===>", informaData.value.birthDate); + if (res.data.result.birthDate) { + console.log("birthDate===>", res.data.result.birthDate); - age.value = calculateAge(informaData.value.birthDate); - console.log("age===>", age.value); - } + age.value = calculateAge(res.data.result.birthDate); + console.log("age===>", age.value); } }) .catch((e) => { From cfaa2faf91854efe20e9dbfb3c31b522adb7fd20 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 11 Jul 2024 09:16:27 +0700 Subject: [PATCH 02/13] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=9C=E0=B8=B4=E0=B8=94?= 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 88e7fd992..a841244f5 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -637,7 +637,7 @@ const handleButtonClick = () => { size="sm" color="yellow-10" /> - ไมมีข้อมูล + ไม่มีข้อมูล From 3ffe9b367e3dce69ab1f4b384cff0732dbb35805 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 11 Jul 2024 13:17:08 +0700 Subject: [PATCH 03/13] fix bug --- .../PersonalDetail/Information/Information.vue | 8 -------- .../components/ListRetirement/AddList.vue | 10 +++++----- .../components/ListRetirement/TableList.vue | 11 +++-------- .../13_salary/store/SalaryEmployeeListsStore.ts | 2 +- src/modules/13_salary/views/salaryEmployeeRate.vue | 2 +- 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/modules/05_placement/components/PersonalDetail/Information/Information.vue b/src/modules/05_placement/components/PersonalDetail/Information/Information.vue index f9bfe39ca..289f776b4 100644 --- a/src/modules/05_placement/components/PersonalDetail/Information/Information.vue +++ b/src/modules/05_placement/components/PersonalDetail/Information/Information.vue @@ -87,8 +87,6 @@ const onCancel = async () => { `ข้อมูลมีการแก้ไข`, `ยืนยันยกเลิกการแก้ไขใช่หรือไม่?` ); - - } else { edit.value = false; } @@ -252,7 +250,6 @@ const getClass = (val: boolean) => { }; }; - function checkEdit() { onEdit.value = true; } @@ -470,7 +467,6 @@ function checkEdit() { :class="getClass(edit)" :readonly="!edit" :borderless="!edit" - :rules="[(val:string) => !!val || `${'กรุณาเลือก หมู่เลือด'}`]" :outlined="edit" dense lazy-rules @@ -556,10 +552,6 @@ function checkEdit() { :readonly="!edit" :borderless="!edit" v-model="informaData.telephone" - :rules="[ - (val:string) => !!val || `${'กรุณากรอก เบอร์โทร'}`, - (val:string) => val.length >= 10 || `${'กรุณากรอกข้อมูลเบอร์โทรให้ครบ'}`, - ]" :label="`${'เบอร์โทร'}`" mask="##########" /> diff --git a/src/modules/06_retirement/components/ListRetirement/AddList.vue b/src/modules/06_retirement/components/ListRetirement/AddList.vue index 1754ea456..711f97a60 100644 --- a/src/modules/06_retirement/components/ListRetirement/AddList.vue +++ b/src/modules/06_retirement/components/ListRetirement/AddList.vue @@ -135,8 +135,8 @@ const totalList = ref(0); // fecth profile const fecthProfile = async () => { + showLoader(); if (props?.dataProfile?.type === "OFFICER") { - showLoader(); formPagePersonList.keyword = formPagePersonList.keyword === null ? "" : formPagePersonList.keyword; await http @@ -154,7 +154,9 @@ const fecthProfile = async () => { fullname: e.prefix + e.firstName + " " + e.lastName, position: e.position, level: - e.posTypeName && e.posLevelName ? e.posTypeName + " (" + e.posLevelName + ")" : "-", + e.posTypeName && e.posLevelName + ? e.posTypeName + " (" + e.posLevelName + ")" + : "-", organizationOrganization: findOrgChildName(e), })); }) @@ -187,9 +189,7 @@ const fecthProfile = async () => { fullname: e.prefix + e.firstName + " " + e.lastName, position: e.position, level: - e.posType && e.posLevel - ? e.posType + " (" + e.posLevel + ")" - : "-", + e.posType && e.posLevel ? e.posType + " (" + e.posLevel + ")" : "-", organizationOrganization: findOrgName(e), })); }) diff --git a/src/modules/06_retirement/components/ListRetirement/TableList.vue b/src/modules/06_retirement/components/ListRetirement/TableList.vue index f1db1babe..92ff9044a 100644 --- a/src/modules/06_retirement/components/ListRetirement/TableList.vue +++ b/src/modules/06_retirement/components/ListRetirement/TableList.vue @@ -636,12 +636,7 @@ function updatemodalPersonal(modal: boolean) { }}{{ props.row.firstName ? props.row.firstName : "" }} {{ props.row.lastName ? props.row.lastName : "" }} - + {{ props.row.position ? props.row.position : "-" }} @@ -697,7 +692,7 @@ function updatemodalPersonal(modal: boolean) { flat round color="primary" - icon="mdi-pencil" + :icon="props.row.remove === 'EDIT' ? 'info' : 'mdi-pencil'" dense @click.stop=" (modalNote = true), @@ -724,7 +719,7 @@ function updatemodalPersonal(modal: boolean) { flat round class="text-red-14" - icon="mdi-delete" + :icon="props.row.remove === 'REMOVE' ? 'info' : 'mdi-delete'" dense @click.stop=" (modalNote = true), diff --git a/src/modules/13_salary/store/SalaryEmployeeListsStore.ts b/src/modules/13_salary/store/SalaryEmployeeListsStore.ts index bd2ed8395..bc6531fa9 100644 --- a/src/modules/13_salary/store/SalaryEmployeeListsStore.ts +++ b/src/modules/13_salary/store/SalaryEmployeeListsStore.ts @@ -125,7 +125,7 @@ export const useSalaryEmployeeListSDataStore = defineStore( const itemDownloadOct = ref([ { id: "emp2-01", - name: "บัญชีการคำนวณวงเงินเลื่อนขั้นค่าจางลูกจ้างประจำกรุงเทพมหานคร", + name: "บัญชีการคำนวณวงเงินเลื่อนขั้นค่าจ้างลูกจ้างประจำกรุงเทพมหานคร", }, { id: "emp2-02", diff --git a/src/modules/13_salary/views/salaryEmployeeRate.vue b/src/modules/13_salary/views/salaryEmployeeRate.vue index b95a7b35b..963fc554d 100644 --- a/src/modules/13_salary/views/salaryEmployeeRate.vue +++ b/src/modules/13_salary/views/salaryEmployeeRate.vue @@ -208,7 +208,7 @@ function clickDownload() { .get(config.API.salaryReportemployeeByid(salaryEmployeeId.value)) .then((res) => { const dataList = res.data.result; - genReportXLSX(dataList, "อัตราเงินเดือน"); + genReportXLSX(dataList, "อัตราค่าจ้าง"); }) .catch((e) => { messageError($q, e); From 1cfb8fa563de0ee0a15646f3c2437b423832526d Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Thu, 11 Jul 2024 15:00:24 +0700 Subject: [PATCH 04/13] hide command code in salary system --- src/modules/13_salary/components/Command/step01.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/modules/13_salary/components/Command/step01.vue b/src/modules/13_salary/components/Command/step01.vue index f8f4e351e..cef9a4ab2 100644 --- a/src/modules/13_salary/components/Command/step01.vue +++ b/src/modules/13_salary/components/Command/step01.vue @@ -131,14 +131,14 @@ const fecthTypeOption = async (actions: string) => { name: e.name, category: e.category, commandCode: e.commandCode, - fullname: e.commandCode + " " + e.name, + fullname: e.name, })); typeOrderFilter.value = data.map((e: OrederResult) => ({ id: e.id, name: e.name, category: e.category, commandCode: e.commandCode, - fullname: e.commandCode + " " + e.name, + fullname: e.name, })); }) .catch((e) => { @@ -455,7 +455,6 @@ function fetchSalaryRound() { v-model="command" hide-bottom-space :label="`${'คำสั่งเลขที่'}`" - />