diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index dc1b27742..23ce76382 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -5,6 +5,8 @@ import { useCounterMixin } from "@/stores/mixin"; import { useRoute, useRouter } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; +import { useProbationDataStore } from "@/modules/05_placement/storeProbation"; +const probationStore = useProbationDataStore(); const $q = useQuasar(); const myForm = ref(null); @@ -39,7 +41,7 @@ const reson52 = ref(""); const chairman_dated = ref(); const director1_dated = ref(""); const director2_dated = ref(""); -const fullname = ref(""); +// const fullname = ref(""); const director_id = ref(null); const director_id2 = ref(null); const director_id3 = ref(null); @@ -158,7 +160,10 @@ async function clickdownloadFile(type: string) { responseType: "blob", }) .then((res) => { - downloadFile(res, `แบบรายงานการประเมินฯ_${fullname.value}.${type}`); + downloadFile( + res, + `แบบรายงานการประเมินฯ_${probationStore.person.name}.${type}` + ); }) .catch(async (e) => { messageError($q, JSON.parse(await e.response.data.text())); diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue index 6f8d0988b..acfbe8b3d 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1.vue @@ -29,7 +29,7 @@ const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const dataArrayNumber = ref(); const dataRole = ref("mentor"); @@ -43,9 +43,9 @@ async function fecthAssign(id: string) { .get(config.API.formevaluate(id)) .then(async (res: any) => { await fecthdataAssign(res.data.data); - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.experimentee + // ? res.data.data.experimentee.name + // : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -91,7 +91,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้ดูเเล)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้ดูเเล)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { @@ -110,7 +110,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue index 41ee396bc..5a37fbae6 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template1Commader.vue @@ -29,7 +29,7 @@ const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const dataArrayNumber = ref(); const dataRole = ref("mentor"); @@ -48,9 +48,7 @@ async function fecthAssign(id: string) { .get(config.API.formevaluateCommander(id)) .then(async (res: any) => { await fecthdataAssign(res.data.data); - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.person ? res.data.person.name : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -99,7 +97,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { @@ -118,7 +116,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบบันทึกผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue index ba36db23a..124e59ddc 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2.vue @@ -29,7 +29,7 @@ const probationStore = useProbationDataStore(); const { fecthdataAssign } = probationStore; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const tabs = ref([]); const dataArrayNumber = ref(1); @@ -60,9 +60,7 @@ async function fecthAssign(id: string) { await fecthdataAssign(res.data.data); evaluate.value = probationStore.evaluate; tabs.value = evaluate.value; - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.person ? res.data.data.person.name : ""; dataArrayNumber.value = 1; }) .catch((e: any) => { @@ -98,7 +96,7 @@ async function FileDownload(type: string) { .then(async (res) => { downloadFile( res, - `แบบประเมินผล(ผู้บังคับบัญชา)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบประเมินผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => { diff --git a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue index 989e24a4e..8deccf166 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/Template2Format2.vue @@ -30,7 +30,7 @@ const { showLoader, hideLoader, messageError, success } = mixin; const assignId = ref(route.params.form.toString()); const personalId = ref(route.params.personalId.toString()); -const fullname = ref(""); +// const fullname = ref(""); const tab = ref("save1"); const tabs = ref([]); const dataArrayNumber = ref(1); @@ -47,9 +47,7 @@ const fecthAssign = async (id: string) => { .then(async (res: any) => { await fecthdataAssign(res.data.data); evaluate.value = probationStore.evaluate; - fullname.value = res.data.data.experimentee - ? res.data.data.experimentee.name - : ""; + // fullname.value = res.data.data.person ? res.data.data.person.name : ""; tabs.value = evaluate.value; dataArrayNumber.value = 1; }) @@ -80,7 +78,7 @@ const FileDownload = async (type: string) => { .then(async (res) => { downloadFile( res, - `แบบประเมินผล(คณะกรรมการ)_${fullname.value}_ครั้งที่${numTab.no}.${type}` + `แบบประเมินผล(คณะกรรมการ)_${probationStore.person.name}_ครั้งที่${numTab.no}.${type}` ); }) .catch(async (e) => {