diff --git a/src/app.config.ts b/src/app.config.ts index 27edfe45f..bea19bd34 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -148,6 +148,7 @@ const path = "https://bma-ehr-manual.frappet.synology.me"; const generatePopupPath = (routeName: any) => { + console.log("🚀 ~ generatePopupPath ~ routeName:", routeName); if (routeName.includes("metadata")) { return `${path}/manual/chapter-2-admin-metadata`; } else if (routeName.includes("registryNew")) { @@ -174,38 +175,74 @@ const generatePopupPath = (routeName: any) => { return `${path}/manual/chapter-12-admin-retirement`; } else if (routeName.includes("discharged")) { return `${path}/manual/chapter-12-admin-retirement`; - } else if (routeName.includes("discipline")) { - return `${path}/manual/chapter-15-admin-discipline`; - } else if (routeName.includes("appeal")) { - return `${path}/manual/chapter-15-admin-discipline`; + } else if (routeName.includes("disciplineComplaints")) { + return `${path}/manual/chapter-14-admin-discipline-complaints`; + } else if (routeName.includes("disciplineInvestigatefacts")) { + return `${path}/manual/chapter-14-2-admin-discipline-investigatefacts`; + } else if (routeName.includes("disciplineDisciplinary")) { + return `${path}/manual/chapter-14-3-admin-discipline-disciplinary`; + } else if (routeName.includes("disciplineResult")) { + return `${path}/manual/chapter-14-4-admin-discipline-result`; + } else if (routeName.includes("disciplineListSuspend")) { + return `${path}/manual/chapter-14-5-admin-discipline-suspend`; + } else if (routeName.includes("appealComplain")) { + return `${path}/manual/chapter-14-6-admin-discipline-appealcomplain`; + } else if (routeName.includes("disciplineDirector")) { + return `${path}/manual/chapter-14-7-admin-discipline-director`; + } else if (routeName.includes("disciplineChannel")) { + return `${path}/manual/chapter-14-7-2-admin-discipline-channel`; } else if (routeName.includes("KPIIndicatorByPlan")) { - return `${path}/manual/chapter-2-1-admin-evaluate`; + return `${path}/manual/chapter-2-admin-evaluate`; } else if (routeName.includes("KPIIndicatorByRole")) { - return `${path}/manual/chapter-2-2-admin-evaluate`; + return `${path}/manual/chapter-2-1-2-admin-evaluate`; } else if (routeName.includes("KPIAssignment")) { - return `${path}/manual/chapter-2-3-admin-evaluate`; + return `${path}/manual/chapter-2-1-3-admin-evaluate`; } else if (routeName.includes("KPICompetency")) { - return `${path}/manual/chapter-2-4-admin-evaluate`; + return `${path}/manual/chapter-2-2-admin-evaluate`; } else if (routeName.includes("strategic")) { - return `${path}/manual/chapter-2-5-admin-evaluate`; - } else if (routeName.includes("salary")) { - return `${path}/manual/chapter-17-admin-salary`; + return `${path}/manual/chapter-2-3-admin-evaluate`; } else if (routeName == "commandListPage") { return `${path}/manual/chapter-7-admin-order`; } else if (routeName == "competePeriod") { - return `${path}/manual/chapter-8-2-1-admin-compete-period`; + return `${path}/manual/chapter-8-3-admin-compete-period`; } else if (routeName == "qualifyPeriod") { - return `${path}/manual/chapter-8-3-1-admin-qualify-period`; + return `${path}/manual/chapter-8-4-1-admin-qualify-period`; } else if (routeName == "disablePeriod") { - return `${path}/manual/chapter-8-3-2-admin-disable-period`; + return `${path}/manual/chapter-8-4-2-admin-disable-period`; } else if (routeName == "manage") { - return `${path}/manual/chapter-8-3-3-admin-qualify-manage`; + return `${path}/manual/chapter-8-4-3-admin-qualify-manage`; } else if (routeName == "qualifyPeriodStat") { - return `${path}/manual/chapter-8-3-4-admin-qualify-period-stat`; + return `${path}/manual/chapter-8-4-4-admin-qualify-period-stat`; } else if (routeName == "qualifyPeriodStatDisable") { - return `${path}/manual/chapter-8-3-5-admin-qualify-disable-stat`; + return `${path}/manual/chapter-8-4-5-admin-qualify-disable-stat`; } else if (routeName.includes("competePeriodStat")) { - return `${path}/manual/chapter-8-2-2-admin-compete-period-stat`; + return `${path}/manual/chapter-8-3-2-admin-compete-period-stat`; + } else if (routeName.includes("probation")) { + return `${path}/manual/chapter-10-admin-probation`; + } else if (routeName.includes("insigniaProposals")) { + return `${path}/manual/chapter-12-admin-insignia`; + } else if (routeName.includes("insigniaManage")) { + return `${path}/manual/chapter-12-2-admin-insignia`; + } else if (routeName.includes("insigniaRecord")) { + return `${path}/manual/chapter-12-3-admin-insignia`; + } else if (routeName.includes("insigniaAllocate")) { + return `${path}/manual/chapter-12-4-admin-insignia`; + } else if (routeName.includes("insigniaBorrow")) { + return `${path}/manual/chapter-12-5-admin-insignia`; + } else if (routeName.includes("insigniaReport")) { + return `${path}/manual/chapter-12-6-admin-insignia`; + } else if (routeName.includes("roundTime")) { + return `${path}/manual/chapter-13-admin-leave`; + } else if (routeName.includes("workList")) { + return `${path}/manual/chapter-13-2-admin-leave`; + } else if (routeName.includes("changeRound")) { + return `${path}/manual/chapter-13-3-admin-leave`; + } else if (routeName.includes("timestampSpecial")) { + return `${path}/manual/chapter-13-4-admin-leave`; + } else if (routeName == "leave") { + return `${path}/manual/chapter-13-5-admin-leave`; + } else if (routeName == "leaveReport") { + return `${path}/manual/chapter-13-6-admin-leave`; } else if ( routeName.includes("qualify") || routeName.includes("recruiting") || @@ -214,10 +251,38 @@ const generatePopupPath = (routeName: any) => { routeName.includes("manage") ) { return `${path}/manual/chapter-9-admin-recruit`; - } else if (routeName.includes("development")) { - return `${path}/manual/chapter-19-admin-development`; - } else if (routeName.includes("evaluate")) { - return `${path}/manual/chapter-18-admin-perf-evaluation`; + } else if (routeName.includes("developmentMain")) { + return `${path}/manual/chapter-18-admin-development`; + } else if (routeName.includes("developmentHistory")) { + return `${path}/manual/chapter-18-2-admin-development-history`; + } else if (routeName.includes("developmentEmployeeHistory")) { + return `${path}/manual/chapter-18-3-admin-development-employee-history`; + } else if (routeName.includes("developmentScholarship")) { + return `${path}/manual/chapter-18-4-admin-development-scholarship`; + } else if (routeName == "evaluate") { + return `${path}/manual/chapter-15-admin-KPI`; + } else if (routeName == "evaluateDirector") { + return `${path}/manual/chapter-15-2-admin-KPI`; + } else if (routeName == "evaluateMeeting") { + return `${path}/manual/chapter-15-2-2-admin-KPI`; + } else if (routeName == "salaryChart") { + return `${path}/manual/chapter-16-admin-salary`; + } else if (routeName == "salaryEmployeeChart") { + return `${path}/manual/chapter-16-2-admin-salary`; + } else if (routeName == "salaryRound") { + return `${path}/manual/chapter-16-3-admin-salary`; + } else if (routeName == "salaryLists") { + return `${path}/manual/chapter-16-4-admin-salary`; + } else if (routeName == "salaryEmployeeLists") { + return `${path}/manual/chapter-16-5-admin-salary`; + } else if (routeName == "KPIRound") { + return `${path}/manual/chapter-17-admin-development`; + } else if (routeName == "KPI​List") { + return `${path}/manual/chapter-17-2-admin-development-history`; + } else if (routeName == "KPIResults") { + return `${path}/manual/chapter-17-3-admin-development-employee-history`; + } else if (routeName == "KPIReport") { + return `${path}/manual/chapter-17-4-admin-development-scholarship`; } else { return manualConfig[routeName as keyof typeof manualConfig]; } diff --git a/src/components/Table.vue b/src/components/Table.vue index 38d875fb6..9434aae28 100644 --- a/src/components/Table.vue +++ b/src/components/Table.vue @@ -10,6 +10,7 @@ dense :pagination-label="paginationLabel" v-model:pagination="pagination" + :rows-per-page-options="[10, 25, 50, 100]" > diff --git a/src/modules/03_recruiting/components/Address.vue b/src/modules/03_recruiting/components/Address.vue index 6544ace9d..149bc9c61 100644 --- a/src/modules/03_recruiting/components/Address.vue +++ b/src/modules/03_recruiting/components/Address.vue @@ -258,7 +258,11 @@ const getClass = (val: boolean) => { :class="getClass(status == 'checkRegister' || status == 'payment')" :readonly="!(status == 'checkRegister' || status == 'payment')" :borderless="!(status == 'checkRegister' || status == 'payment')" +<<<<<<< HEAD :rules="[(val:string) => !!val || `${'āļāļĢāļļāļ“āļēāđ€āļĨāļ·āļ­āļāđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ '}`]" +======= + :rules="[(val:string) => !!val || `${'āļāļĢāļļāļ“āļēāđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ '}`]" +>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1 :outlined="status == 'checkRegister' || status == 'payment'" dense lazy-rules @@ -382,7 +386,11 @@ const getClass = (val: boolean) => { :class="getClass(status == 'checkRegister' || status == 'payment')" :readonly="!(status == 'checkRegister' || status == 'payment')" :borderless="!(status == 'checkRegister' || status == 'payment')" +<<<<<<< HEAD :rules="[(val:string) => !!val || `${'āļāļĢāļļāļ“āļēāđ€āļĨāļ·āļ­āļāđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ '}`]" +======= + :rules="[(val:string) => !!val || `${'āļāļĢāļļāļ“āļēāđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ '}`]" +>>>>>>> 62f1c818415d928fd00ea2ddbde5ab6143efa1a1 :outlined="status == 'checkRegister' || status == 'payment'" dense lazy-rules diff --git a/src/modules/03_recruiting/views/03_editor/index.vue b/src/modules/03_recruiting/views/03_editor/index.vue index b921c7f14..d36a5687e 100644 --- a/src/modules/03_recruiting/views/03_editor/index.vue +++ b/src/modules/03_recruiting/views/03_editor/index.vue @@ -1017,7 +1017,7 @@ onMounted(async () => { :options="provinceOptions" option-value="id" :label="`${'āļˆāļąāļ‡āļŦāļ§āļąāļ”'}`" - @update:model-value="(value) => selectProvince(value)" + @update:model-value="(value:any) => selectProvince(value)" />
@@ -1036,8 +1036,8 @@ onMounted(async () => { option-label="name" :options="districtOptions" option-value="id" - :label="`${'āđ€āļ‚āļ•/āļ­āļģāđ€āļ āļ­'}`" - @update:model-value="(value) => selectDistrict(value)" + :label="`${'āđ€āļ‚āļ• / āļ­āļģāđ€āļ āļ­'}`" + @update:model-value="(value:any) => selectDistrict(value)" />
@@ -1057,7 +1057,7 @@ onMounted(async () => { :options="subdistrictOptions" option-value="id" :label="`${'āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ '}`" - @update:model-value="(value) => selectSubDistrict(value)" + @update:model-value="(value:any) => selectSubDistrict(value)" />
@@ -1085,8 +1085,8 @@ onMounted(async () => { v-model="address.tel" :borderless="!enable.about" :rules="[ - (val) => !!val || `${'āļāļĢāļļāļ“āļēāļāļĢāļ­āļ āđ€āļšāļ­āļĢāđŒāđ‚āļ—āļĢ'}`, - (val) => + (val:any) => !!val || `${'āļāļĢāļļāļ“āļēāļāļĢāļ­āļ āđ€āļšāļ­āļĢāđŒāđ‚āļ—āļĢ'}`, + (val:any) => val.length >= 10 || `${'āļāļĢāļļāļ“āļēāļāļĢāļ­āļāļ‚āđ‰āļ­āļĄāļđāļĨāđ€āļšāļ­āļĢāđŒāđ‚āļ—āļĢāđƒāļŦāđ‰āļ„āļĢāļš'}`, ]" :label="`${'āđ€āļšāļ­āļĢāđŒāđ‚āļ—āļĢ'}`" diff --git a/src/modules/04_registryPerson/components/Dialog/02_Address.vue b/src/modules/04_registryPerson/components/Dialog/02_Address.vue index 6c1929610..ab6cf4102 100644 --- a/src/modules/04_registryPerson/components/Dialog/02_Address.vue +++ b/src/modules/04_registryPerson/components/Dialog/02_Address.vue @@ -16,7 +16,7 @@ const dataLabel = { registrationAddress: "āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ•āļēāļĄāļ—āļ°āđ€āļšāļĩāļĒāļ™āļšāđ‰āļēāļ™", registrationProvince: "āļˆāļąāļ‡āļŦāļ§āļąāļ”", registrationDistrict: "āđ€āļ‚āļ•/āļ­āļģāđ€āļ āļ­", - registrationSubDistrict: "āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ", + registrationSubDistrict: "āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ", registrationZipCode: "āļĢāļŦāļąāļŠāđ„āļ›āļĢāļĐāļ“āļĩāļĒāđŒ", }; @@ -51,8 +51,8 @@ async function selectDistrict(e: string | null, name: string) { } /** - * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ - * @param e āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ āļ—āļĩāđˆāđ€āļĨāļ·āļ­āļ + * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ + * @param e āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ āļ—āļĩāđˆāđ€āļĨāļ·āļ­āļ * @param name 1 āļ„āļ·āļ­ āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ•āļēāļĄāļ—āļ°āđ€āļšāļĩāļĒāļ™āļšāđ‰āļēāļ™ 2 āļ„āļ·āļ­ āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ›āļąāļˆāļˆāļļāļšāļąāļ™ */ function selectSubDistrict(e: string | null, name: string) { diff --git a/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue b/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue index 4d8b9bd18..f22c6281d 100644 --- a/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue +++ b/src/modules/04_registryPerson/components/Dialog/DialogUpdate.vue @@ -63,6 +63,7 @@ const formInformations = reactive({ firstName: "", prefix: "", rank: null, + prefixMain: "", }); const formDataAddress = reactive({ @@ -257,7 +258,7 @@ async function amiRequest() { formInformations.nationality = data.value.nationalityDesc; // āđāļ›āļĨāļ‡ dateOfBirth āđ€āļ›āđ‡āļ™ format 1989-01-01 - formInformations.birthDate = conventDateOfBirth(`${data.value.dateOfBirth}`); + formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null; age.value = storeLinkCenter.calculateAge(data.value.age); formInformations.gender = data.value.genderDesc; @@ -327,15 +328,15 @@ async function convertDistrict(val: string) { const id = storeLinkCenter.OpsAddress.districtOps.find( (e: DataOption) => e.name === val )?.id; - // āđ€āļĢāļĩāļĒāļāļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ + // āđ€āļĢāļĩāļĒāļāļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ await storeLinkCenter.fetchSubDistrict(id ? id : null, "1", false); return id ? id : null; } /** - * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđāļ›āļĨāļ‡āļŠāļ·āđˆāļ­āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ āđ€āļ›āđ‡āļ™ ID - * @param val āļŠāļ·āđˆāļ­āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ + * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđāļ›āļĨāļ‡āļŠāļ·āđˆāļ­āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ āđ€āļ›āđ‡āļ™ ID + * @param val āļŠāļ·āđˆāļ­āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ */ async function convertSubdistrict(val: string) { const result = storeLinkCenter.OpsAddress.subdistrictOps.find( diff --git a/src/modules/04_registryPerson/components/DialogHistory.vue b/src/modules/04_registryPerson/components/DialogHistory.vue index 607e9f2a5..80b00c760 100644 --- a/src/modules/04_registryPerson/components/DialogHistory.vue +++ b/src/modules/04_registryPerson/components/DialogHistory.vue @@ -66,7 +66,7 @@ const columns = ref([ { name: "name", align: "left", - label: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", + label: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", field: "name", headerStyle: "font-size: 14px", style: "font-size: 14px", @@ -261,8 +261,8 @@ function closeDialog() {
-
-
+ +
-
-
+
-
- -
- -
- - -
- - -
+
diff --git a/src/modules/04_registryPerson/components/TableView.vue b/src/modules/04_registryPerson/components/TableView.vue index bada8fe49..8cfd6ebef 100644 --- a/src/modules/04_registryPerson/components/TableView.vue +++ b/src/modules/04_registryPerson/components/TableView.vue @@ -47,7 +47,7 @@ const columns = ref([ { name: "fullName", align: "left", - label: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", + label: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", sortable: true, field: "fullName", headerStyle: "font-size: 14px; min-width: 200px", diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue index de8e16b39..6cc8999c2 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue @@ -215,6 +215,8 @@ async function getData() { .get(config.API.profileNewGovernmentById(profileId.value, empType.value)) .then(async (res) => { const data = await res.data.result; + console.log(data); + formMain.ocId = data.org ?? "-"; //āļŠāļąāļ‡āļāļąāļ” formMain.positionId = data.position ?? "-"; //āļ•āļģāđāļŦāļ™āđˆāļ‡ formMain.positionLine = data.positionField ?? "-"; //āļŠāļēāļĒāļ‡āļēāļ™ diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue index 7132a0860..dbd516fcc 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/02_Discipline.vue @@ -39,7 +39,7 @@ const empType = ref(pathRegistryEmp(route.name?.toString() ?? "")); /** * props */ - const isLeave = defineModel("isLeave", { +const isLeave = defineModel("isLeave", { required: true, }); @@ -230,7 +230,7 @@ function openDialogAdd() { /** * function fetch āļ‚āđ‰āļ­āļĄāļđāļĨāļĢāļēāļĒāļāļēāļĢāļ§āļīāļ™āļąāļĒ */ -function fetchData(id: string) { +async function fetchData(id: string) { showLoader(); http .get(config.API.profileNewDisciplineByProfileId(id, empType.value)) @@ -398,7 +398,6 @@ onMounted(() => { map-options :options="columns" option-value="name" - style="min-width: 140px" /> { map-options :options="columns" option-value="name" - style="min-width: 140px" /> { flat round @click="openDialogEdit(props.row)" - >āđāļāđ‰āđ„āļ‚āđāļāđ‰āđ„āļ‚āļ‚āđ‰āļ­āļĄāļđāļĨ
diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue index 3a23f8c2b..fe8367f91 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue @@ -82,7 +82,7 @@ const dataLabel = { religion: "āļĻāļēāļŠāļ™āļē", bloodGroup: "āļŦāļĄāļđāđˆāđ€āļĨāļ·āļ­āļ”", phone: "āđ€āļšāļ­āļĢāđŒāđ‚āļ—āļĢ", - email: "āļ­āļĩāđ€āļĄāļĨāđŒ", + email: "āļ­āļĩāđ€āļĄāļĨ", prefix: "āļ„āļģāļ™āļģāļŦāļ™āđ‰āļēāļŠāļ·āđˆāļ­", rank: "āļĒāļĻ", firstName: "āļŠāļ·āđˆāļ­", @@ -316,10 +316,11 @@ async function getData() { function onClickOpenDialog() { if (!informaData.value) return; modal.value = true; + id.value = informaData.value.id; age.value = calculateAge(informaData.value.birthDate); formData.citizenId = informaData.value.citizenId; - formData.prefix = informaData.value.prefix; + formData.prefix = informaData.value.prefixMain; formData.rank = informaData.value.rank; formData.firstName = informaData.value.firstName; formData.lastName = informaData.value.lastName; diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue index 4dc42acaf..493ab8a4a 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue @@ -461,7 +461,7 @@ onMounted(async () => { icon="add" @click=" () => { - changeNameData.prefix = profileInfo?.prefix; + changeNameData.prefix = profileInfo?.prefixMain; changeNameData.firstName = profileInfo?.firstName; changeNameData.lastName = profileInfo?.lastName; prefixChange = changeNameData.prefix; @@ -496,7 +496,6 @@ onMounted(async () => { outlined emit-value map-options - options-dense option-value="name" style="min-width: 140px" diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue index a36fba00b..f4c3c9963 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/03_Address.vue @@ -252,7 +252,7 @@ const columnsHistory = ref([ /** * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨāļ—āļĩāđˆāļ­āļĒāļđāđˆ * - * āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨāļ—āļĩāđˆāļ­āļĒāļđāđˆ āļ‚āđ‰āļ­āļĄāļđāļĨāļˆāļąāļ‡āļŦāļ§āļąāļ” āļ‚āđ‰āļ­āļĄāļđāļĨ āđ€āļ‚āļ• / āļ­āļģāđ€āļ āļ­ āđāļĨāļ°āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ + * āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨāļ—āļĩāđˆāļ­āļĒāļđāđˆ āļ‚āđ‰āļ­āļĄāļđāļĨāļˆāļąāļ‡āļŦāļ§āļąāļ” āļ‚āđ‰āļ­āļĄāļđāļĨ āđ€āļ‚āļ• / āļ­āļģāđ€āļ āļ­ āđāļĨāļ°āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ */ async function getData() { showLoader(); @@ -337,8 +337,8 @@ async function selectDistrict(e: string | null, name: string) { } /** - * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ - * @param e āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ āļ—āļĩāđˆāđ€āļĨāļ·āļ­āļ + * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āđ€āļĨāļ·āļ­āļ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ + * @param e āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ āļ—āļĩāđˆāđ€āļĨāļ·āļ­āļ * @param name 1 āļ„āļ·āļ­ āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ•āļēāļĄāļ—āļ°āđ€āļšāļĩāļĒāļ™āļšāđ‰āļēāļ™ 2 āļ„āļ·āļ­ āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ›āļąāļˆāļˆāļļāļšāļąāļ™ */ function selectSubDistrict(e: string | null, name: string) { @@ -941,7 +941,6 @@ onMounted(async () => { map-options :options="columnsHistory" option-value="name" - style="min-width: 140px" />
diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue index 1d31955f2..91716d594 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/04_FamilyNew.vue @@ -1008,7 +1008,7 @@ onMounted(async () => { /> -
+
āļŠāļ–āļēāļ™āļ āļēāļžāļāļēāļĢāļĄāļĩāļŠāļĩāļ§āļīāļ•
{ ]); function fetchType(data: DataType[]) { posTypeMain.value = data; + const list: DataOption[] = data.map((e: DataType) => ({ id: e.id, name: e.posTypeName, })); posTypeOps.value = list; } - function fetchLevel(data: DataLevel[]) { + function fetchLevel(data: DataLevel[], shortName: string = "") { const list: DataOption[] = data.map((e: DataLevel) => ({ id: e.id, - name: e.posLevelName, + name: `${shortName} ${e.posLevelName} `, })); const seen = new Set(); posLevelOps.value = list.filter((item: DataOption) => { diff --git a/src/modules/04_registryPerson/stores/Address.ts b/src/modules/04_registryPerson/stores/Address.ts index 1ad7c7481..cd106d852 100644 --- a/src/modules/04_registryPerson/stores/Address.ts +++ b/src/modules/04_registryPerson/stores/Address.ts @@ -130,7 +130,7 @@ export const useAddressDataStore = defineStore("addess", () => { } /** - * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ + * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ * @param id āđ€āļ‚āļ• / āļ­āļģāđ€āļ āļ­ * @param position āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ•āļēāļĄāļ—āļ°āđ€āļšāļĩāļĒāļ™āļšāđ‰āļēāļ™, āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ›āļąāļˆāļˆāļļāļšāļąāļ™ */ diff --git a/src/modules/04_registryPerson/stores/LinkCenter.ts b/src/modules/04_registryPerson/stores/LinkCenter.ts index 22cd3667d..ccfb5e911 100644 --- a/src/modules/04_registryPerson/stores/LinkCenter.ts +++ b/src/modules/04_registryPerson/stores/LinkCenter.ts @@ -243,7 +243,7 @@ export const useDataLinkCenter = defineStore("DataLinkCenter", () => { } /** - * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡ / āļ•āļģāļšāļĨ + * āļŸāļąāļ‡āļāđŒāļŠāļąāļ™āļ”āļķāļ‡āļ‚āđ‰āļ­āļĄāļđāļĨ āđāļ‚āļ§āļ‡/āļ•āļģāļšāļĨ * @param id āđ€āļ‚āļ• / āļ­āļģāđ€āļ āļ­ * @param position āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ•āļēāļĄāļ—āļ°āđ€āļšāļĩāļĒāļ™āļšāđ‰āļēāļ™, āļ—āļĩāđˆāļ­āļĒāļđāđˆāļ›āļąāļˆāļˆāļļāļšāļąāļ™ */ diff --git a/src/modules/04_registryPerson/views/detailView.vue b/src/modules/04_registryPerson/views/detailView.vue index 37daea1da..3ee865cb4 100644 --- a/src/modules/04_registryPerson/views/detailView.vue +++ b/src/modules/04_registryPerson/views/detailView.vue @@ -349,6 +349,8 @@ async function fetchDataPersonal() { .get(config.API.registryNewByProfileId(profileId.value, empType.value)) .then(async (res) => { formDetail.value = res.data.result; + console.log(formDetail.value); + storeRegistry.isLeave = res.data.result.isLeave; if (res.data.result.leaveReason) { @@ -956,7 +958,7 @@ onMounted(async () => { {{ empType === "" ? "āļĢāļ°āļ”āļąāļš" : "āļĢāļ°āļ”āļąāļšāļŠāļąāđ‰āļ™āļ‡āļēāļ™" }}
- {{ formDetail?.posLevel?.posLevelName || "-" }} + {{ `${ empType === "" ? '': formDetail?.posType?.posTypeShortName } ${formDetail?.posLevel?.posLevelName}` || "-" }}
diff --git a/src/modules/04_registryPerson/views/listView.vue b/src/modules/04_registryPerson/views/listView.vue index 2aa948d3e..e61a0397e 100644 --- a/src/modules/04_registryPerson/views/listView.vue +++ b/src/modules/04_registryPerson/views/listView.vue @@ -242,7 +242,10 @@ function selectType() { */ function selectPosType(item: DataOption) { const dataType = store.posTypeMain.find((e: DataType) => e.id === item.id); - store.fetchLevel(dataType?.posLevels); + const shortName = + empType.value === "officer" ? "" : dataType?.posTypeShortName; + + store.fetchLevel(dataType?.posLevels, shortName); store.labelOption.posType = item.name; store.labelOption.posLevel = "āļ—āļąāđ‰āļ‡āļŦāļĄāļ”"; store.formFilter.page = 1; diff --git a/src/modules/04_registryPerson/views/requestEditView.vue b/src/modules/04_registryPerson/views/requestEditView.vue index c15020ff5..bece2c089 100644 --- a/src/modules/04_registryPerson/views/requestEditView.vue +++ b/src/modules/04_registryPerson/views/requestEditView.vue @@ -13,6 +13,9 @@ const route = useRoute(); const store = useRegistryNewDataStore(); const isIDP = ref(null); +const isEmployee = ref( + route.name?.toString() == "registryNewRequestEditEMP" ? true : false +); onBeforeMount(async () => { isIDP.value = await (route.name?.toString() == "registryNewRequestEditEMP" @@ -39,6 +42,7 @@ onMounted(() => { @click="router.go(-1)" /> āļĢāļēāļĒāļāļēāļĢāļ„āļģāļĢāđ‰āļ­āļ‡āļ‚āļ­āđāļāđ‰āđ„āļ‚āļ—āļ°āđ€āļšāļĩāļĒāļ™āļ›āļĢāļ°āļ§āļąāļ•āļī + {{ `(${isEmployee ? "āļĨāļđāļāļˆāđ‰āļēāļ‡āļ›āļĢāļ°āļˆāļģ" : "āļ‚āđ‰āļēāļĢāļēāļŠāļāļēāļĢ āļāļ—āļĄ.āļŠāļēāļĄāļąāļ"})` }} diff --git a/src/modules/06_retirement/components/ListRetirement/TableList.vue b/src/modules/06_retirement/components/ListRetirement/TableList.vue index fb2e966ce..35c25c205 100644 --- a/src/modules/06_retirement/components/ListRetirement/TableList.vue +++ b/src/modules/06_retirement/components/ListRetirement/TableList.vue @@ -16,8 +16,6 @@ import DialogPopupReason from "@/components/Dialogs/PopupReason.vue"; import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue"; import AddList from "../ListRetirement/AddList.vue"; -const modalPersonal = ref(false); -const personId = ref(""); /** Use */ const route = useRoute(); const checkRoutePermisson = ref(route.name == "retirementidDetail"); @@ -38,10 +36,12 @@ const myForm = ref(null); /** āļ•āļąāļ§āđāļ›āļĢ */ const retireld_params = route.params.retirementId; +const retireld = ref(retireld_params.toString()); +const modalPersonal = ref(false); +const personId = ref(""); const modalNote = ref(false); const note = ref(""); const retireProfileId = ref(""); -const retireld = ref(retireld_params.toString()); const profileId = ref(""); const filter = ref(""); const statusUpload = ref(); @@ -56,7 +56,69 @@ const statusReport = ref(); const dataProfile = ref([]); /** āļ„āļ­āļĨāļąāļĄāļ™āđŒāļ—āļĩāđˆāđāļŠāļ”āļ‡ */ -const columns = ref([]); +const columns = ref([ + { + name: "order", + label: "āļĨāļģāļ”āļąāļš", + title: "āļĨāļģāļ”āļąāļš", + field: "order", + align: "left", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "name", + align: "left", + label: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", + title: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", + field: "name", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "position", + align: "left", + label: "āļ•āļģāđāļŦāļ™āđˆāļ‡", + title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", + subtitle: employeeType.value == "OFFICER" ? "āđƒāļ™āļŠāļēāļĒāļ‡āļēāļ™" : "", + field: "position", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "positionType", + align: "left", + label: "āļ•āļģāđāļŦāļ™āđˆāļ‡", + title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", + subtitle: employeeType.value == "OFFICER" ? "āļ›āļĢāļ°āđ€āļ āļ—" : "āļāļĨāļļāđˆāļĄāļ‡āļēāļ™", + field: "positionType", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + + { + name: "positionNumber", + align: "left", + label: "āļ•āļģāđāļŦāļ™āđˆāļ‡ (āđ€āļĨāļ‚āļ—āļĩāđˆ) ", + title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", + subtitle: "āđ€āļĨāļ‚āļ—āļĩāđˆ", + field: "positionNumber", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "organization", + align: "left", + label: "āļŠāļąāļ‡āļāļąāļ”", + title: "āļŠāļąāļ‡āļāļąāļ”", + field: "organization", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(val: any, row: any) { + return findOrgName(row); + }, + }, +]); const rows = ref([]); const visibleColumns = ref([ "order", @@ -79,118 +141,58 @@ function closeDialog() { } // fecthlist -async function fecthlistprofile(id: string) { +async function fetchlistprofile(id: string) { showLoader(); await http .get(config.API.listRetire(id)) - .then((res) => { - dataProfile.value = res.data.result; - round.value = res.data.result.round; - statusReport.value = res.data.result.json; - typeReport.value = res.data.result.typeReport; - textReport.value = res.data.result.detail; - employeeType.value = res.data.result.type; + .then(async (res) => { + const data = await res.data.result; + + dataProfile.value = data; + round.value = data.round; + statusReport.value = data.json; + typeReport.value = data.typeReport; + textReport.value = data.detail; + employeeType.value = data.type; // āļĢāļēāļĒāļŠāļ·āđˆāļ­āļœāļđāđ‰āđ€āļāļĐāļĩāļĒāļ“āļ­āļēāļĒāļļāļĢāļēāļŠāļāļēāļĢ - rows.value = res.data.result.profile.map((e: any) => ({ - id: e.id, - profileId: e.profileId, - order: e.order, - prefix: e.prefix, - firstName: e.firstName, - lastName: e.lastName, - name: e.prefix + e.firstName + " " + e.lastName, - organization: e.root, - position: e.position, - positionNumber: e.posNo, - positionType: e.posTypeName, - positionLevel: e.posLevelName, - reason: e.reason, - remove: e.remove, - root: e.root, - rootId: e.rootId, - child1: e.child1, - child1Id: e.child1Id, - child2: e.child2, - child2Id: e.child2Id, - child3: e.child3, - child3Id: e.child3Id, - child4: e.child4, - child4Id: e.child4Id, - })); + if (data.profile !== null) { + rows.value = data.profile.map((e: any) => ({ + id: e.id, + profileId: e.profileId, + order: e.order, + prefix: e.prefix, + firstName: e.firstName, + lastName: e.lastName, + name: e.prefix + e.firstName + " " + e.lastName, + organization: e.root, + position: e.position, + positionNumber: e.posNo, + positionType: e.posTypeName, + positionLevel: e.posLevelName, + reason: e.reason, + remove: e.remove, + root: e.root, + rootId: e.rootId, + child1: e.child1, + child1Id: e.child1Id, + child2: e.child2, + child2Id: e.child2Id, + child3: e.child3, + child3Id: e.child3Id, + child4: e.child4, + child4Id: e.child4Id, + })); + } + if (statusReport.value == false) { - fecthCheck(retireld.value); + await fecthCheck(retireld.value); } else statusUpload.value = true; }) .catch((e) => { messageError($q, e); }) .finally(() => { - //āļ„āļ­āļĨāļąāļĄāļ™āđŒ - columns.value = [ - { - name: "order", - label: "āļĨāļģāļ”āļąāļš", - title: "āļĨāļģāļ”āļąāļš", - field: "order", - align: "left", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "name", - align: "left", - label: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", - title: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", - field: "name", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "position", - align: "left", - label: "āļ•āļģāđāļŦāļ™āđˆāļ‡", - title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", - subtitle: employeeType.value == "OFFICER" ? "āđƒāļ™āļŠāļēāļĒāļ‡āļēāļ™" : "", - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "positionType", - align: "left", - label: "āļ•āļģāđāļŦāļ™āđˆāļ‡", - title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", - subtitle: employeeType.value == "OFFICER" ? "āļ›āļĢāļ°āđ€āļ āļ—" : "āļāļĨāļļāđˆāļĄāļ‡āļēāļ™", - field: "positionType", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - - { - name: "positionNumber", - align: "left", - label: "āļ•āļģāđāļŦāļ™āđˆāļ‡ (āđ€āļĨāļ‚āļ—āļĩāđˆ) ", - title: "āļ•āļģāđāļŦāļ™āđˆāļ‡", - subtitle: "āđ€āļĨāļ‚āļ—āļĩāđˆ", - field: "positionNumber", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "organization", - align: "left", - label: "āļŠāļąāļ‡āļāļąāļ”", - title: "āļŠāļąāļ‡āļāļąāļ”", - field: "organization", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(val: any, row: any) { - return findOrgName(row); - }, - }, - ]; - hideLoader(); }); } @@ -212,21 +214,23 @@ function clickDelete() { dialogRemove( $q, async () => { + showLoader(); await http .post(config.API.removeProfile(), { retireProfileId: retireProfileId.value, reason: note.value, }) - .then(() => { + .then(async () => { + retireld.value = retireld_params.toString(); + await fetchlistprofile(retireld.value); + modalNote.value = false; success($q, "āļĨāļšāļ‚āđ‰āļ­āļĄāļđāļĨāļŠāļģāđ€āļĢāđ‡āļˆ"); }) .catch((e) => { messageError($q, e); }) .finally(async () => { - retireld.value = retireld_params.toString(); - await fecthlistprofile(retireld.value); - modalNote.value = false; + hideLoader(); }); }, "āļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāļĨāļšāļ‚āđ‰āļ­āļĄāļđāļĨ", @@ -239,21 +243,23 @@ function saveNote() { dialogConfirm( $q, async () => { + showLoader(); await http .post(config.API.createnote(), { retireProfileId: retireProfileId.value, reason: note.value, }) - .then(() => { + .then(async () => { + retireld.value = retireld_params.toString(); + await fetchlistprofile(retireld.value); + modalNote.value = false; success($q, "āļšāļąāļ™āļ—āļķāļāļ‚āđ‰āļ­āļĄāļđāļĨāļŠāļģāđ€āļĢāđ‡āļˆ"); }) .catch((e) => { messageError($q, e); }) - .finally(async () => { - retireld.value = retireld_params.toString(); - fecthlistprofile(retireld.value); - modalNote.value = false; + .finally(() => { + hideLoader(); }); }, "āļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāļšāļąāļ™āļ—āļķāļāļ‚āđ‰āļ­āļĄāļđāļĨ", @@ -264,7 +270,7 @@ function saveNote() { //āļ­āļąāļžāđ€āļ”āļ— ListId function UpdateListId(retireld: string, pId: string) { profileId.value = pId; - fecthlistprofile(retireld); + fetchlistprofile(retireld); } // āļāļĨāļąāļšāļŦāļ™āđ‰āļēāđ€āļ”āļīāļĄ @@ -300,18 +306,18 @@ async function uploadFile(event: any, signDate: any) { formdata ) .then(async (res) => { + await fetchlistprofile(retireld.value); + modalUpload.value = false; + success($q, "āđ€āļžāļīāđˆāļĄāđ„āļŸāļĨāđŒāļŠāļģāđ€āļĢāđ‡āļˆ"); fileUpload.value = null; signDate.value = null; - modalUpload.value = false; - await fecthlistprofile(retireld.value); - await fecthCheck(retireld.value); - hideLoader(); - success($q, "āđ€āļžāļīāđˆāļĄāđ„āļŸāļĨāđŒāļŠāļģāđ€āļĢāđ‡āļˆ"); }) .catch((err) => { messageError($q, err); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); }, "āļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāļ­āļąāļ›āđ‚āļŦāļĨāļ”āđ€āļ­āļāļŠāļēāļĢ", "āļ•āđ‰āļ­āļ‡āļāļēāļĢāļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāļ­āļąāļ›āđ‚āļŦāļĨāļ”āđ€āļ­āļāļŠāļēāļĢāļ™āļĩāđ‰āļŦāļĢāļ·āļ­āđ„āļĄāđˆ ?" @@ -333,13 +339,13 @@ async function downloadAttachment(type: string, id: string) { .then(async (res) => { const data = res.data.result; await genReport(data, `āļĢāļēāļĒāļŠāļ·āđˆāļ­āļœāļđāđ‰āđ€āļāļĐāļĩāļĒāļ“āļ­āļēāļĒāļļāļĢāļēāļŠāļāļēāļĢ`, type); - hideLoader(); }) .catch(async (e) => { messageError($q, JSON.parse(await e.response.data.text())); - hideLoader(); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); } // āļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāđāļāđ‰āđ„āļ‚āļ‚āđ‰āļ­āļĄāļđāļĨ @@ -349,17 +355,19 @@ function saveEdiitReport(reason: string) { dialogConfirm( $q, async () => { + showLoader(); await http .put(config.API.editDetail(retireld.value), formdata) .then(() => { + fetchlistprofile(retireld.value); + modalEdit.value = false; success($q, "āđāļāđ‰āđ„āļ‚āļ‚āđ‰āļ­āļ„āļ§āļēāļĄāļŠāļģāđ€āļĢāđ‡āļˆ"); }) .catch((err) => { messageError($q, err); }) .finally(() => { - fecthlistprofile(retireld.value); - modalEdit.value = false; + hideLoader(); }); }, "āļĒāļ·āļ™āļĒāļąāļ™āļāļēāļĢāđāļāđ‰āđ„āļ‚āļ‚āđ‰āļ­āļĄāļđāļĨ", @@ -400,9 +408,9 @@ function updatemodalPersonal(modal: boolean) { } /** Hook */ -onMounted(() => { +onMounted(async () => { retireld.value = retireld_params.toString(); - fecthlistprofile(retireld.value); + await fetchlistprofile(retireld.value); }); @@ -525,7 +533,6 @@ onMounted(() => { map-options :options="columns" option-value="name" - style="min-width: 140px" class="gt-xs q-ml-sm" > diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 5c822e9ee..84fc24629 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -100,10 +100,10 @@ const yearOptions = ref([{ id: "", year: "āļ—āļąāđ‰āļ‡āļŦāļĄāļ”" }]); // āļ›āļĢāļ°āļāļēāļĻāđ€āļāļĐāļĩāļĒāļ“āļ­āļēāļĒāļļāļĢāļēāļŠāļāļēāļĢ async function fetchRetirement(type: string, year: any) { showLoader(); + rows.value = []; await http .get(config.API.retirement(type, year)) .then((res) => { - rows.value = []; let data = res.data.result; rows.value = data.map((items: any) => ({ id: items.id, @@ -335,7 +335,6 @@ onMounted(async () => { map-options :options="columns" option-value="name" - style="min-width: 140px" class="col-xs-12 col-sm-3 col-md-2" /> diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue index 91ea55927..808e2c9bc 100644 --- a/src/modules/07_insignia/components/2_Manage/Tab1.vue +++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue @@ -308,7 +308,7 @@ const filterOption = ref([ }, { id: "fullName", - name: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", + name: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", }, ]); diff --git a/src/modules/07_insignia/views/03_ResultMain.vue b/src/modules/07_insignia/views/03_ResultMain.vue index da524ca7a..f2790ec0c 100644 --- a/src/modules/07_insignia/views/03_ResultMain.vue +++ b/src/modules/07_insignia/views/03_ResultMain.vue @@ -98,7 +98,7 @@ const columns = ref([ { name: "name", align: "left", - label: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", + label: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", field: "name", sortable: true, sort: (a: string, b: string) => diff --git a/src/modules/07_insignia/views/05_BorrowMain.vue b/src/modules/07_insignia/views/05_BorrowMain.vue index c2854387e..d092982f4 100644 --- a/src/modules/07_insignia/views/05_BorrowMain.vue +++ b/src/modules/07_insignia/views/05_BorrowMain.vue @@ -76,7 +76,7 @@ const columns = ref([ { name: "name", align: "left", - label: "āļŠāļ·āđˆāļ­ - āļ™āļēāļĄāļŠāļāļļāļĨ", + label: "āļŠāļ·āđˆāļ­-āļ™āļēāļĄāļŠāļāļļāļĨ", field: "name", sortable: true, headerStyle: "font-size: 14px", diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 5a730c157..95c39fca9 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -128,12 +128,13 @@ const columns = ref([ }, { - name: "salaryDate", + name: "dateAppoint", align: "left", label: "āļ§āļąāļ™āļ—āļĩāđˆāđāļ•āđˆāļ‡āļ•āļąāđ‰āļ‡", sortable: true, - field: "salaryDate", + field: "dateAppoint", headerStyle: "font-size: 14px", + format: (val) => date2Thai(val), style: "font-size: 14px", }, { @@ -191,6 +192,7 @@ const visibleColumns = ref([ "createdAt", "dateRetireLaw", "statustext", + "dateAppoint", ]); /** diff --git a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue similarity index 97% rename from src/modules/09_leave/components/3_WorkTime/DialogForm.vue rename to src/modules/09_leave/components/01_RoundTime/DialogForm.vue index 96dfb155e..e225204db 100644 --- a/src/modules/09_leave/components/3_WorkTime/DialogForm.vue +++ b/src/modules/09_leave/components/01_RoundTime/DialogForm.vue @@ -16,7 +16,7 @@ import DialogHeader from "@/components/DialogHeader.vue"; const $q = useQuasar(); const mixin = useCounterMixin(); -const { dialogConfirm, success, messageError } = mixin; +const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin; const isRead = defineModel("isRead", { required: true }); /** propsData āļˆāļēāļ RoundMain */ const props = defineProps({ @@ -104,22 +104,25 @@ function onSubmit() { /** Function āļŠāļĢāđ‰āļēāļ‡āļĢāļ­āļšāļāļēāļĢāļ›āļāļīāļšāļąāļ•āļīāļ‡āļēāļ™*/ async function postRoundDuty() { + showLoader(); await http .post(config.API.roundDutytime(), formData) - .then(() => { + .then(async () => { + await props.fetchData?.(); + await props.closeDialog?.(); success($q, "āļšāļąāļ™āļ—āļķāļāļ‚āđ‰āļ­āļĄāļđāļĨ"); }) .catch((err) => { messageError($q, err); }) .finally(() => { - props.fetchData?.(); - props.closeDialog?.(); + hideLoader(); }); } /** Functiom āđāļāđ‰āđ„āļ‚āđ‰āļĢāļ­āļšāļāļēāļĢāļ›āļāļīāļšāļąāļ•āļīāļ‡āļēāļ™*/ async function putRoundDuty(id: string) { + showLoader(); const data = { description: formData.description, isDefault: formData.isDefault, @@ -127,15 +130,16 @@ async function putRoundDuty(id: string) { }; await http .put(config.API.roundDutytimeByid(id), data) - .then(() => { + .then(async () => { + await props.fetchData?.(); + await props.closeDialog?.(); success($q, "āļšāļąāļ™āļ—āļķāļāļ‚āđ‰āļ­āļĄāļđāļĨ"); }) .catch((err) => { messageError($q, err); }) .finally(() => { - props.fetchData?.(); - props.closeDialog?.(); + hideLoader(); }); } diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue similarity index 99% rename from src/modules/09_leave/components/1_Work/DialogDetail.vue rename to src/modules/09_leave/components/02_WorkList/DialogDetail.vue index 1a58058d9..2f24fad01 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue @@ -8,7 +8,7 @@ import { useQuasar } from "quasar"; import type { FormDetail } from "@/modules/09_leave/interface/response/work"; /** importComponents*/ -import Map from "@/modules/09_leave/components/1_Work/DialogMap.vue"; +import Map from "@/modules/09_leave/components/02_WorkList/DialogMap.vue"; /** importStores */ import { useCounterMixin } from "@/stores/mixin"; diff --git a/src/modules/09_leave/components/1_Work/DialogEdit.vue b/src/modules/09_leave/components/02_WorkList/DialogEdit.vue similarity index 94% rename from src/modules/09_leave/components/1_Work/DialogEdit.vue rename to src/modules/09_leave/components/02_WorkList/DialogEdit.vue index 4245853cb..b9649d968 100644 --- a/src/modules/09_leave/components/1_Work/DialogEdit.vue +++ b/src/modules/09_leave/components/02_WorkList/DialogEdit.vue @@ -65,7 +65,9 @@ async function onClickSave() { showLoader(); await http .put(config.API.leaveEditCheckin(props.detail?.id), body) - .then(() => { + .then(async () => { + await props.fetchData?.(); + await props.close?.(); success($q, "āļšāļąāļ™āļ—āļķāļāļ‚āđ‰āļ­āļĄāļđāļĨāļŠāļģāđ€āļĢāđ‡āļˆ"); }) .catch((err) => { @@ -73,14 +75,12 @@ async function onClickSave() { }) .finally(() => { hideLoader(); - props.fetchData?.(); - props.close?.(); }); }); } } -function filterFnOptions(val: any, update: Function) { +function filterFnOptions(val: string, update: Function) { update(() => { options.value = optionsMain.value.filter( (v: DataOption) => v.name.indexOf(val) > -1 @@ -143,7 +143,7 @@ watch( :rules="[(val:string) => !!val || `${'āļāļĢāļļāļ“āļēāđ€āļĨāļ·āļ­āļāļŠāļ–āļēāļ™āļ°'}`]" hide-bottom-space use-input - @filter="(inputValue: any,doneFn: Function) => filterFnOptions(inputValue, doneFn)" + @filter="(inputValue: string,doneFn: Function) => filterFnOptions(inputValue, doneFn)" >