From d0ac01b92ebb666c5f4d65480a54aac6c038cc1b Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 13 Aug 2024 09:45:59 +0700 Subject: [PATCH 1/5] fixing route --- src/components/Dialogs/PopupPersonalNew.vue | 22 ++++++++++++++----- .../components/ExitInterview/EditQuestion.vue | 2 +- .../components/ExitInterview/exitMain.vue | 22 +++++++++---------- .../components/ExitInterview/exitRegistry.vue | 2 +- src/modules/06_retirement/router.ts | 6 ++--- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 857c993ab..e1cce5bf9 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -22,7 +22,7 @@ const retireDate = ref(); const { showLoader, hideLoader, messageError, date2Thai } = mixin; const isEmployee = defineModel("isEmployee", { type: String }); -const empType = ref(""); +const empType = ref("officer"); /** props*/ const props = defineProps({ id: { @@ -95,7 +95,12 @@ function calculateAge(birthDate: Date | null) { async function fetchInformation(id: string) { showLoader(); await http - .get(config.API.orgProfileById(id, empType.value)) + .get( + config.API.orgProfileById( + id, + `${empType.value == "employee" ? `-${empType.value}` : ""}` + ) + ) .then((res) => { const data = res.data.result; imformation.prefix = data.prefix ? data.prefix : "-"; @@ -128,7 +133,12 @@ async function fetchInformation(id: string) { async function fetchProfileGov(id: string) { showLoader(); await http - .get(config.API.profileNewGovernmentById(id, empType.value)) + .get( + config.API.profileNewGovernmentById( + id, + `${empType.value == "employee" ? `-${empType.value}` : ""}` + ) + ) .then((res) => { const data = res.data.result; goverment.oc = data.org !== "" ? data.org : "-"; @@ -155,7 +165,7 @@ async function fetchProfileGov(id: string) { } function redirecToRegistry() { - router.push(`/registry-officer${empType.value}/${props.id}`); + router.push(`/registry-${empType.value}/${props.id}`); modal.value = false; } @@ -168,8 +178,8 @@ watch( empType.value = route.name === "appoint-employee-detail" || isEmployee.value == "EMPLOYEE" - ? "-employee" - : ""; + ? "employee" + : "officer"; fetchInformation(props.id); fetchProfileGov(props.id); diff --git a/src/modules/06_retirement/components/ExitInterview/EditQuestion.vue b/src/modules/06_retirement/components/ExitInterview/EditQuestion.vue index 3f085eb36..a77612b79 100644 --- a/src/modules/06_retirement/components/ExitInterview/EditQuestion.vue +++ b/src/modules/06_retirement/components/ExitInterview/EditQuestion.vue @@ -277,7 +277,7 @@ const putData = () => { messageError($q, e); }) .finally(async () => { - router.push(`/exit-Interview`); + router.push(`/retirement/exit-interview`); }); }; diff --git a/src/modules/06_retirement/components/ExitInterview/exitMain.vue b/src/modules/06_retirement/components/ExitInterview/exitMain.vue index ff63fe751..f2ff7398a 100644 --- a/src/modules/06_retirement/components/ExitInterview/exitMain.vue +++ b/src/modules/06_retirement/components/ExitInterview/exitMain.vue @@ -296,7 +296,7 @@ const openModalCalendar = (rows: any) => { color="blue-9" icon="mdi-square-edit-outline" outline - @click="$router.push('/retirement/exit-Interview/edit-question')" + @click="$router.push('/retirement/exit-interview/edit-question')" >แก้ไขคำถาม @@ -374,7 +374,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -385,7 +385,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -396,7 +396,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -407,7 +407,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -418,7 +418,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -429,7 +429,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -440,7 +440,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -452,7 +452,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -465,7 +465,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > @@ -478,7 +478,7 @@ const openModalCalendar = (rows: any) => { :props="props" @click=" router.push( - `/retirement/exit-Interview/questionnair/${props.row.id}` + `/retirement/exit-interview/questionnair/${props.row.id}` ) " > diff --git a/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue b/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue index 3c7dcc4e7..fbc9e1ca0 100644 --- a/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue +++ b/src/modules/06_retirement/components/ExitInterview/exitRegistry.vue @@ -278,7 +278,7 @@ const putData = () => { messageError($q, e); }) .finally(async () => { - router.push(`/exit-Interview`); + router.push(`/retirement/exit-interview`); }); }; diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index a0d08948a..cf3237941 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -83,7 +83,7 @@ export default [ }, }, { - path: "/retirement/exit-Interview", + path: "/retirement/exit-interview", name: "exit-Interview", component: exitInterviewMain, meta: { @@ -93,7 +93,7 @@ export default [ }, }, { - path: "/retirement/exit-Interview/questionnair/:id", + path: "/retirement/exit-interview/questionnair/:id", name: "exit-Interview-details", component: exitInterviewDetails, meta: { @@ -103,7 +103,7 @@ export default [ }, }, { - path: "/retirement/exit-Interview/edit-question", + path: "/retirement/exit-interview/edit-question", name: "ExitInterviewEditQuestion", component: exitInterviewEditQuestion, meta: { From fd1f6a93d26aafb5f1a4dfdc6075936e128b82b9 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 13 Aug 2024 09:47:49 +0700 Subject: [PATCH 2/5] remove redirect at row --- .../05_placement/components/AppointEmployee/Main.vue | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/modules/05_placement/components/AppointEmployee/Main.vue b/src/modules/05_placement/components/AppointEmployee/Main.vue index a3232fac8..d97e120b6 100644 --- a/src/modules/05_placement/components/AppointEmployee/Main.vue +++ b/src/modules/05_placement/components/AppointEmployee/Main.vue @@ -710,14 +710,7 @@ function onSave(data: any) { - +
{{ props.rowIndex + 1 }}
From 232b5cf60d440dd62a42b23ca265f686e4e1ecca Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 13 Aug 2024 10:25:45 +0700 Subject: [PATCH 3/5] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=82?= =?UTF-8?q?=E0=B8=AB=E0=B8=A5=E0=B8=94=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C?= =?UTF-8?q?=20=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Complaint/Form.vue | 57 +++++++++++-------- .../components/2_InvestigateFacts/Form.vue | 5 +- .../components/4_Result/Form.vue | 3 +- .../11_discipline/components/UploadFile.vue | 4 +- src/stores/mixin.ts | 17 ++++++ 5 files changed, 58 insertions(+), 28 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 547013dbe..29f6ed01a 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -46,6 +46,7 @@ const { messageError, hideLoader, showLoader, + downloadRenameFileByLink } = mixin; const { filterSelector } = complainstStore; // function จาก store complainstStore @@ -140,13 +141,6 @@ function onSubmit() { }); } -/** - * เปิดลิงค์ไฟล์ - * @param link รับมาเป็น https ลิงค์ - */ -function downloadFile(link: string) { - window.open(link, "_blank"); -} /** * ลบไฟล์ @@ -434,7 +428,7 @@ function filterOptionFnAgency(val: string, update: Function) { ref="respondentTypeRef" dense outlined - :readonly="isReadonly ||checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" label="ผู้ถูกร้องเรียน" option-value="id" option-label="name" @@ -674,7 +668,7 @@ function filterOptionFnAgency(val: string, update: Function) { ref="descriptionRef" dense outlined - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" hide-bottom-space v-model="formData.description" label="รายละเอียดเรื่องร้องเรียน" @@ -691,7 +685,7 @@ function filterOptionFnAgency(val: string, update: Function) { :locale="'th'" autoApply borderless - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" :enableTimePicker="false" week-start="0" @update:model-value="changeFormData()" @@ -709,7 +703,7 @@ function filterOptionFnAgency(val: string, update: Function) { outlined dense :class="inputEdit(isReadonly)" - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" hide-bottom-space :model-value=" formData.dateReceived != null @@ -741,7 +735,7 @@ function filterOptionFnAgency(val: string, update: Function) { ref="levelConsiderationRef" dense outlined - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" v-model="formData.levelConsideration" :options="complainstStore.levelConsiderationtOptions" label="ระดับการพิจารณา" @@ -764,7 +758,7 @@ function filterOptionFnAgency(val: string, update: Function) { v-model="formData.dateConsideration" @update:model-value="changeFormData()" :locale="'th'" - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" autoApply borderless :enableTimePicker="false" @@ -788,7 +782,7 @@ function filterOptionFnAgency(val: string, update: Function) { ? date2Thai(formData.dateConsideration) : null " - :readonly="isReadonly|| checkRoutePermisson" + :readonly="isReadonly || checkRoutePermisson" label="วันที่กำหนดพิจารณา" hide-bottom-space > @@ -801,7 +795,11 @@ function filterOptionFnAgency(val: string, update: Function) {