Compare commits
No commits in common. "2b95db0e5d359b9d20f2e9cd21867bb32512ec57" and "c7c2b4f4bb4eaf9183f66e718949db2edbfeb363" have entirely different histories.
2b95db0e5d
...
c7c2b4f4bb
21 changed files with 52 additions and 674 deletions
|
|
@ -39,15 +39,11 @@ export default {
|
||||||
`${registryNew}${type}/nopaid/${dataId}`,
|
`${registryNew}${type}/nopaid/${dataId}`,
|
||||||
profileNewNoPaidHisById: (dataId: string, type: string) =>
|
profileNewNoPaidHisById: (dataId: string, type: string) =>
|
||||||
`${registryNew}${type}/nopaid/history/${dataId}`,
|
`${registryNew}${type}/nopaid/history/${dataId}`,
|
||||||
profileNewNoPaidUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/nopaid/update-delete/`,
|
|
||||||
|
|
||||||
// เครื่องราชฯ
|
// เครื่องราชฯ
|
||||||
profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
|
profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
|
||||||
profileNewInsignByProfileId: (profileId: string, type: string) =>
|
profileNewInsignByProfileId: (profileId: string, type: string) =>
|
||||||
`${registryNew}${type}/insignia/${profileId}`,
|
`${registryNew}${type}/insignia/${profileId}`,
|
||||||
profileNewInsignUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/insignia/update-delete/`,
|
|
||||||
|
|
||||||
orgInsigniaActive: () => `${org}/insignia/insignia-type/active`,
|
orgInsigniaActive: () => `${org}/insignia/insignia-type/active`,
|
||||||
|
|
||||||
|
|
@ -64,8 +60,6 @@ export default {
|
||||||
`${registryNew}${type}/honor/${dataId}`,
|
`${registryNew}${type}/honor/${dataId}`,
|
||||||
profileNewHonorHisById: (dataId: string, type: string) =>
|
profileNewHonorHisById: (dataId: string, type: string) =>
|
||||||
`${registryNew}${type}/honor/admin/history/${dataId}`,
|
`${registryNew}${type}/honor/admin/history/${dataId}`,
|
||||||
profileNewHonorUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/honor/update-delete/`,
|
|
||||||
|
|
||||||
// ผลการประเมินการปฏิบัติราชการ
|
// ผลการประเมินการปฏิบัติราชการ
|
||||||
profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
|
profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
|
||||||
|
|
@ -75,10 +69,9 @@ export default {
|
||||||
`${registryNew}${type}/assessments/${dataId}`,
|
`${registryNew}${type}/assessments/${dataId}`,
|
||||||
profileNewAssessmentsHisById: (dataId: string, type: string) =>
|
profileNewAssessmentsHisById: (dataId: string, type: string) =>
|
||||||
`${registryNew}${type}/assessments/admin/history/${dataId}`,
|
`${registryNew}${type}/assessments/admin/history/${dataId}`,
|
||||||
profileDevelopmentUpdateDelete: (type: string) =>
|
profileDevelopmentUpdateDelete: `${registryNew}/development/update-delete/`,
|
||||||
`${registryNew}${type}/development/update-delete/`,
|
|
||||||
profileNewAssessmentsUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/assessments/update-delete/`,
|
|
||||||
// การฝึกอบรม
|
// การฝึกอบรม
|
||||||
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
|
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
|
||||||
profileNewTrainingByProfileId: (profileId: string, type: string) =>
|
profileNewTrainingByProfileId: (profileId: string, type: string) =>
|
||||||
|
|
@ -87,8 +80,7 @@ export default {
|
||||||
`${registryNew}${type}/training/${trainingId}`,
|
`${registryNew}${type}/training/${trainingId}`,
|
||||||
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
|
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
|
||||||
`${registryNew}${type}/training/admin/history/${trainingId}`,
|
`${registryNew}${type}/training/admin/history/${trainingId}`,
|
||||||
profileTrainingUpdate: (type: string) =>
|
profileTrainingUpdate: `${registryNew}/training/update-delete/`,
|
||||||
`${registryNew}${type}/training/update-delete/`,
|
|
||||||
|
|
||||||
// ประวัติการศึกษา
|
// ประวัติการศึกษา
|
||||||
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
|
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
|
||||||
|
|
@ -101,8 +93,6 @@ export default {
|
||||||
`${registryNew}${type}/educations/${educationId}`,
|
`${registryNew}${type}/educations/${educationId}`,
|
||||||
profileNewEducationHisByEducationId: (educationsId: string, type: string) =>
|
profileNewEducationHisByEducationId: (educationsId: string, type: string) =>
|
||||||
`${registryNew}${type}/educations/admin/history/${educationsId}`,
|
`${registryNew}${type}/educations/admin/history/${educationsId}`,
|
||||||
profileEducationUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/educations/update-delete/`,
|
|
||||||
|
|
||||||
// ความสามารถพิเศษ
|
// ความสามารถพิเศษ
|
||||||
profileNewAbility: (type: string) => `${registryNew}${type}/ability`,
|
profileNewAbility: (type: string) => `${registryNew}${type}/ability`,
|
||||||
|
|
@ -112,8 +102,6 @@ export default {
|
||||||
`${registryNew}${type}/ability/${abilityId}`,
|
`${registryNew}${type}/ability/${abilityId}`,
|
||||||
profileNewAbilityHisByAbilityId: (abilityId: string, type: string) =>
|
profileNewAbilityHisByAbilityId: (abilityId: string, type: string) =>
|
||||||
`${registryNew}${type}/ability/admin/history/${abilityId}`,
|
`${registryNew}${type}/ability/admin/history/${abilityId}`,
|
||||||
profileAbilityUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/ability/update-delete/`,
|
|
||||||
|
|
||||||
// ใบอนุญาตประกอบวิชาชีพ
|
// ใบอนุญาตประกอบวิชาชีพ
|
||||||
profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
|
profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
|
||||||
|
|
@ -125,8 +113,6 @@ export default {
|
||||||
certificateId: string,
|
certificateId: string,
|
||||||
type: string
|
type: string
|
||||||
) => `${registryNew}${type}/certificate/admin/history/${certificateId}`,
|
) => `${registryNew}${type}/certificate/admin/history/${certificateId}`,
|
||||||
profileCertificateUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/certificate/update-delete/`,
|
|
||||||
|
|
||||||
// ข้อมูลอื่นๆ
|
// ข้อมูลอื่นๆ
|
||||||
profileNewOther: (type: string) => `${registryNew}${type}/other`,
|
profileNewOther: (type: string) => `${registryNew}${type}/other`,
|
||||||
|
|
@ -136,8 +122,6 @@ export default {
|
||||||
`${registryNew}${type}/other/${dataId}`,
|
`${registryNew}${type}/other/${dataId}`,
|
||||||
profileNewOtherHisById: (dataId: string, type: string) =>
|
profileNewOtherHisById: (dataId: string, type: string) =>
|
||||||
`${registryNew}${type}/other/admin/history/${dataId}`,
|
`${registryNew}${type}/other/admin/history/${dataId}`,
|
||||||
profileOtherUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/other/update-delete/`,
|
|
||||||
|
|
||||||
// ข้อมูลครอบครัว
|
// ข้อมูลครอบครัว
|
||||||
profileNewFamily: (type: string) => `${registryNew}${type}/family`,
|
profileNewFamily: (type: string) => `${registryNew}${type}/family`,
|
||||||
|
|
@ -158,8 +142,6 @@ export default {
|
||||||
`${registryNew}${type}/discipline/admin/history/${disciplineId}`,
|
`${registryNew}${type}/discipline/admin/history/${disciplineId}`,
|
||||||
disciplineListCard: (profileId: string, type: string) =>
|
disciplineListCard: (profileId: string, type: string) =>
|
||||||
`${registryNew}${type}/discipline/admin/${profileId}`, // noPermission
|
`${registryNew}${type}/discipline/admin/${profileId}`, // noPermission
|
||||||
profileNewDisciplineUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/discipline/update-delete/`,
|
|
||||||
|
|
||||||
// ปฏิบัติราชการพิเศษ
|
// ปฏิบัติราชการพิเศษ
|
||||||
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
|
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
|
||||||
|
|
@ -169,8 +151,6 @@ export default {
|
||||||
`${registryNew}${type}/duty/${dutyId}`,
|
`${registryNew}${type}/duty/${dutyId}`,
|
||||||
profileNewDutyHisByDutyId: (dutyId: string, type: string) =>
|
profileNewDutyHisByDutyId: (dutyId: string, type: string) =>
|
||||||
`${registryNew}${type}/duty/admin/history/${dutyId}`,
|
`${registryNew}${type}/duty/admin/history/${dutyId}`,
|
||||||
profileDutyUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/duty/update-delete/`,
|
|
||||||
|
|
||||||
//ข้อมูลราชการ
|
//ข้อมูลราชการ
|
||||||
profileNewGovernment: (type: string) => `${registryNew}${type}/government`,
|
profileNewGovernment: (type: string) => `${registryNew}${type}/government`,
|
||||||
|
|
@ -191,8 +171,6 @@ export default {
|
||||||
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
|
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
|
||||||
leaveListCard: (id: string, type: string) =>
|
leaveListCard: (id: string, type: string) =>
|
||||||
`${registryNew}${type}/leave/admin/${id}`, //noPermission
|
`${registryNew}${type}/leave/admin/${id}`, //noPermission
|
||||||
profileNewLeaveUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/leave/update-delete/`,
|
|
||||||
|
|
||||||
/** ตำแหน่ง*/
|
/** ตำแหน่ง*/
|
||||||
profileSalaryPositionNew: (type: string) =>
|
profileSalaryPositionNew: (type: string) =>
|
||||||
|
|
@ -227,16 +205,12 @@ export default {
|
||||||
`${registryNew}${type}/changeName/${changeNameId}`,
|
`${registryNew}${type}/changeName/${changeNameId}`,
|
||||||
profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
|
profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
|
||||||
`${registryNew}${type}/changeName/history/${changeNameId}`,
|
`${registryNew}${type}/changeName/history/${changeNameId}`,
|
||||||
profileNewChangeNameUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/changeName/update-delete/`,
|
|
||||||
|
|
||||||
//ข้อมูลครอบครับ
|
//ข้อมูลครอบครับ
|
||||||
profileFamily: (empType: string, type: string) =>
|
profileFamily: (empType: string, type: string) =>
|
||||||
`${registryNew}${empType}/family/${type}`,
|
`${registryNew}${empType}/family/${type}`,
|
||||||
profileFamilyHistory: (id: string, empType: string, type: string) =>
|
profileFamilyHistory: (id: string, empType: string, type: string) =>
|
||||||
`${registryNew}${empType}/family/${type}/history/${id}`,
|
`${registryNew}${empType}/family/${type}/history/${id}`,
|
||||||
profileFamilyUpdateDelete: (empType: string, type: string) =>
|
|
||||||
`${registryNew}${empType}/family/${type}/update-delete/`,
|
|
||||||
|
|
||||||
//ลูกจ้างชั่วคราว
|
//ลูกจ้างชั่วคราว
|
||||||
positionEmployee: (id: string) => `${registryNew}-employee/position/${id}`,
|
positionEmployee: (id: string) => `${registryNew}-employee/position/${id}`,
|
||||||
|
|
@ -261,8 +235,7 @@ export default {
|
||||||
`${registryNew}${type}/actposition/${id}`,
|
`${registryNew}${type}/actposition/${id}`,
|
||||||
profileActpositionHistory: (id: string, type: string) =>
|
profileActpositionHistory: (id: string, type: string) =>
|
||||||
`${registryNew}${type}/actposition/history/${id}`,
|
`${registryNew}${type}/actposition/history/${id}`,
|
||||||
profileActpositionUpdateDelete: (type: string) =>
|
profileActpositionUpdateDelete: `${registryNew}/actposition/update-delete/`,
|
||||||
`${registryNew}${type}/actposition/update-delete/`,
|
|
||||||
|
|
||||||
//ช่วยราชการ
|
//ช่วยราชการ
|
||||||
profileAssistance: (type: string, id: string) =>
|
profileAssistance: (type: string, id: string) =>
|
||||||
|
|
@ -270,6 +243,4 @@ export default {
|
||||||
profileAssistanceHistory: (id: string, type: string) =>
|
profileAssistanceHistory: (id: string, type: string) =>
|
||||||
`${registryNew}${type}/assistance/history/${id}`,
|
`${registryNew}${type}/assistance/history/${id}`,
|
||||||
profileAssistanceReturn: `${env.API_URI}/placement/repatriation`,
|
profileAssistanceReturn: `${env.API_URI}/placement/repatriation`,
|
||||||
profileAssistanceUpdateDelete: (type: string) =>
|
|
||||||
`${registryNew}${type}/assistance/update-delete/`,
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const { createPathUploadFlie, getPathUploadFlie, uploadFile } =
|
const { createPathUploadFlie, getPathUploadFlie, uploadFile } =
|
||||||
useRegistryNewDataStore();
|
useRegistryNewDataStore();
|
||||||
|
|
@ -361,23 +360,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileCertificateUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData(id.value);
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
* ทำงานเมื่อ Components ถูกเรียกใช้งาน
|
||||||
*/
|
*/
|
||||||
|
|
@ -513,17 +495,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -581,17 +552,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -356,8 +356,8 @@ async function fetchData(id: string) {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewTrainingByProfileId(id, empType.value))
|
.get(config.API.profileNewTrainingByProfileId(id, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
rows.value = await res.data.result;
|
||||||
rowsMain.value = await res.data.result;
|
rowsMain.value = await res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -405,7 +405,7 @@ function onDelete(rowId: string) {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
try {
|
try {
|
||||||
await http.patch(config.API.profileTrainingUpdate(empType.value) + `${rowId}`);
|
await http.patch(config.API.profileTrainingUpdate + `${rowId}`);
|
||||||
await fetchData(id.value);
|
await fetchData(id.value);
|
||||||
await success($q, "ลบข้อมูลสำเร็จ");
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
@ -567,11 +567,7 @@ onMounted(() => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
|
||||||
isLeave == false &&
|
|
||||||
checkPermission($route)?.attrIsDelete &&
|
|
||||||
!props.row.developmentId
|
|
||||||
"
|
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
round
|
round
|
||||||
|
|
@ -618,11 +614,7 @@ onMounted(() => {
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
|
||||||
isLeave == false &&
|
|
||||||
checkPermission($route)?.attrIsDelete &&
|
|
||||||
!props.row.developmentId
|
|
||||||
"
|
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="red"
|
color="red"
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const isUpload = ref<boolean>(false);
|
const isUpload = ref<boolean>(false);
|
||||||
|
|
@ -318,8 +317,8 @@ async function fetchData() {
|
||||||
const res = await http.get(
|
const res = await http.get(
|
||||||
config.API.profileNewInsignByProfileId(profileId.value, empType.value)
|
config.API.profileNewInsignByProfileId(profileId.value, empType.value)
|
||||||
);
|
);
|
||||||
|
rows.value = res.data.result;
|
||||||
rowsMain.value = res.data.result;
|
rowsMain.value = res.data.result;
|
||||||
serchDataTable();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
messageError($q, error);
|
messageError($q, error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
@ -334,6 +333,8 @@ async function getInsigniaActive() {
|
||||||
.get(config.API.orgInsigniaActive())
|
.get(config.API.orgInsigniaActive())
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
mapInsigniaOption(data);
|
mapInsigniaOption(data);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -645,23 +646,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewInsignUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
|
|
@ -789,18 +773,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -852,7 +824,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
flat
|
flat
|
||||||
|
|
@ -861,18 +832,7 @@ onMounted(async () => {
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="onClickOpenDialog(true, props.row)"
|
@click="onClickOpenDialog(true, props.row)"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
|
|
@ -204,8 +203,8 @@ async function fetchData() {
|
||||||
const res = await http.get(
|
const res = await http.get(
|
||||||
config.API.profileNewHonorByProfileId(profileId.value, empType.value)
|
config.API.profileNewHonorByProfileId(profileId.value, empType.value)
|
||||||
);
|
);
|
||||||
|
rows.value = res.data.result;
|
||||||
rowsMain.value = res.data.result;
|
rowsMain.value = res.data.result;
|
||||||
serchDataTable();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
messageError($q, error);
|
messageError($q, error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
@ -215,7 +214,7 @@ async function fetchData() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* บันทึกข้อมูลประกาศเกียรติคุณ
|
* บันทึกข้อมูลประกาศเกียรติคุณ
|
||||||
* @param editStatus แก้ไข,เพิ่ม
|
* @param editStatus แก่ไข,เพิ่ม
|
||||||
*/
|
*/
|
||||||
async function addEditData(editStatus: boolean = false) {
|
async function addEditData(editStatus: boolean = false) {
|
||||||
if (!profileId.value) return;
|
if (!profileId.value) return;
|
||||||
|
|
@ -446,23 +445,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewHonorUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
|
|
@ -585,18 +567,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -656,19 +626,7 @@ onMounted(() => {
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="onClickOpenDialog(true, props.row)"
|
@click="onClickOpenDialog(true, props.row)"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -356,9 +356,8 @@ async function fetchData() {
|
||||||
empType.value
|
empType.value
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
rows.value = res.data.result;
|
||||||
rowsMain.value = res.data.result;
|
rowsMain.value = res.data.result;
|
||||||
serchDataTable();
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
messageError($q, error);
|
messageError($q, error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
@ -518,17 +517,11 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ลบข้อมูลการพัฒนารายบุคคล (Individual Development Plan)
|
|
||||||
* @param rowId ที่ต้องการลบข้อมูล
|
|
||||||
*/
|
|
||||||
function onDelete(rowId: string) {
|
function onDelete(rowId: string) {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
try {
|
try {
|
||||||
await http.patch(
|
await http.patch(config.API.profileDevelopmentUpdateDelete + `${rowId}`);
|
||||||
config.API.profileDevelopmentUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
empType.value !== "-temp" && (await getDevelop());
|
empType.value !== "-temp" && (await getDevelop());
|
||||||
await success($q, "ลบข้อมูลสำเร็จ");
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
@ -539,27 +532,6 @@ function onDelete(rowId: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ผลการประเมินการปฏิบัติราชการ
|
|
||||||
* @param rowId ที่ต้องการลบข้อมูล
|
|
||||||
*/
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewAssessmentsUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
empType.value !== "-temp" && (await getDevelop());
|
empType.value !== "-temp" && (await getDevelop());
|
||||||
|
|
@ -696,18 +668,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
|
|
@ -745,18 +705,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมุล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมุล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ function fetchDataEmployment(id: string) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function เปิด dialog Form ข้อมูลการจ้าง
|
* function เปิด dialog Form ข้อมูลการจ้าง
|
||||||
* @param statusEdit สถานะการ สร้าง หรือ แก้ไข
|
* @param statusEdit สถานะการ สร้าง หรือ แก่ไข
|
||||||
* @param id รายการการจ้าง
|
* @param id รายการการจ้าง
|
||||||
*/
|
*/
|
||||||
function onOpenDialog(statusEdit: boolean = false, id: string = "") {
|
function onOpenDialog(statusEdit: boolean = false, id: string = "") {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, reactive } from "vue";
|
import { ref, onMounted, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
|
|
@ -35,7 +36,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
|
|
@ -290,8 +290,8 @@ async function fetchData(id: string) {
|
||||||
http
|
http
|
||||||
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
|
.get(config.API.profileNewDisciplineByProfileId(id, empType.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
rows.value = res.data.result;
|
||||||
rowsMain.value = res.data.result;
|
rowsMain.value = res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -435,7 +435,7 @@ function openDialogHistory(idOrder: string) {
|
||||||
id.value = idOrder;
|
id.value = idOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** fetch ข้อมูลประวัติการแก้ไขข้อมูลวินัย*/
|
/** fetch ข้อมูลประวัติการแก่ไขข้อมูลวินัย*/
|
||||||
async function fetchDataHistory() {
|
async function fetchDataHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
||||||
|
|
@ -461,23 +461,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewDisciplineUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await fetchData(profileId.value);
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData(profileId.value);
|
fetchData(profileId.value);
|
||||||
|
|
@ -604,17 +587,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -661,9 +633,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogHistory(props.row.id)"
|
@click="openDialogHistory(props.row.id)"
|
||||||
|
><q-tooltip>ประวิติแก้ไขวินัย</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวิติแก้ไขวินัย</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
color="edit"
|
color="edit"
|
||||||
|
|
@ -671,20 +642,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogEdit(props.row)"
|
@click="openDialogEdit(props.row)"
|
||||||
|
><q-tooltip>แก้ไข</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไข</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ const {
|
||||||
dateToISO,
|
dateToISO,
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
|
|
@ -209,7 +208,7 @@ async function getData() {
|
||||||
.get(config.API.profileNewLeaveById(profileId.value, empType.value))
|
.get(config.API.profileNewLeaveById(profileId.value, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
const baseData = data.map((item: DataLeave) => ({
|
rows.value = data.map((item: DataLeave) => ({
|
||||||
...item,
|
...item,
|
||||||
id: item.id,
|
id: item.id,
|
||||||
typeLeave: item.leaveType.name,
|
typeLeave: item.leaveType.name,
|
||||||
|
|
@ -219,9 +218,7 @@ async function getData() {
|
||||||
numLeave: item.leaveDays,
|
numLeave: item.leaveDays,
|
||||||
typeLeaveId: item.leaveTypeId,
|
typeLeaveId: item.leaveTypeId,
|
||||||
}));
|
}));
|
||||||
rowsMain.value = baseData;
|
rowsMain.value = rows.value;
|
||||||
|
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -477,23 +474,6 @@ function clickEditRowType() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewLeaveUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await getData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -617,17 +597,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -654,9 +623,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogHistory(props.row.id)"
|
@click="openDialogHistory(props.row.id)"
|
||||||
|
><q-tooltip>ประวิติแก้ไขการลา</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวิติแก้ไขการลา</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
color="edit"
|
color="edit"
|
||||||
|
|
@ -664,20 +632,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogEdit(props.row)"
|
@click="openDialogEdit(props.row)"
|
||||||
|
><q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
|
|
@ -52,7 +51,7 @@ const isLeave = defineModel<boolean>("isLeave", {
|
||||||
const id = ref<string>(""); //id ที่ต้องการแก้ไข
|
const id = ref<string>(""); //id ที่ต้องการแก้ไข
|
||||||
const modal = ref<boolean>(false); //แสดง popup ข้อมูลปฏิบัติราชการพิเศษ
|
const modal = ref<boolean>(false); //แสดง popup ข้อมูลปฏิบัติราชการพิเศษ
|
||||||
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการแก้ไขข้อมูลปฏิบัติราชการพิเศษ
|
const modalHistory = ref<boolean>(false); //แสดง popup ประวัติการแก้ไขข้อมูลปฏิบัติราชการพิเศษ
|
||||||
const edit = ref<boolean>(false); //สถานะการแก้ไข
|
const edit = ref<boolean>(false); //สถานะการแก่ไข
|
||||||
//ฟอร์มข้อมูลปฏิบัติราชการพิเศษ
|
//ฟอร์มข้อมูลปฏิบัติราชการพิเศษ
|
||||||
const dutyData = reactive<RequestItemsObject>({
|
const dutyData = reactive<RequestItemsObject>({
|
||||||
profileId: profileId.value,
|
profileId: profileId.value,
|
||||||
|
|
@ -193,8 +192,8 @@ async function fetchData(id: string) {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewDutyByProfileId(id, empType.value))
|
.get(config.API.profileNewDutyByProfileId(id, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
rows.value = await res.data.result;
|
||||||
rowsMain.value = await res.data.result;
|
rowsMain.value = await res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -448,24 +447,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileDutyUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await fetchData(profileId.value);
|
|
||||||
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งา*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งา*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData(profileId.value);
|
fetchData(profileId.value);
|
||||||
|
|
@ -590,17 +571,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -647,8 +617,7 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogHistory(props.row.id)"
|
@click="openDialogHistory(props.row.id)"
|
||||||
>
|
><q-tooltip>ประวัติแก้ไขปฏิบัติราชการพิเศษ</q-tooltip>
|
||||||
<q-tooltip>ประวัติแก้ไขปฏิบัติราชการพิเศษ</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
|
|
@ -657,19 +626,7 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogEdit(props.row)"
|
@click="openDialogEdit(props.row)"
|
||||||
>
|
><q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,9 +299,7 @@ function onDelete(rowId: string) {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
try {
|
try {
|
||||||
await http.patch(
|
await http.patch(config.API.profileActpositionUpdateDelete + `${rowId}`);
|
||||||
config.API.profileActpositionUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData();
|
await fetchData();
|
||||||
await success($q, "ลบข้อมูลสำเร็จ");
|
await success($q, "ลบข้อมูลสำเร็จ");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
|
|
@ -225,8 +224,8 @@ async function fetchData() {
|
||||||
.get(config.API.profileAssistance(empType.value, profileId.value))
|
.get(config.API.profileAssistance(empType.value, profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
rows.value = data;
|
||||||
rowsMain.value = data;
|
rowsMain.value = data;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -439,23 +438,6 @@ async function onReturner(refId: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileAssistanceUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await fetchData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData();
|
fetchData();
|
||||||
});
|
});
|
||||||
|
|
@ -601,22 +583,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ส่งตัวกลับ</q-tooltip>
|
<q-tooltip>ส่งตัวกลับ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
!isLeave &&
|
|
||||||
checkPermission($route)?.attrIsDelete &&
|
|
||||||
!props.row.commandId
|
|
||||||
"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td v-for="col in props.cols" :key="col.id">
|
<q-td v-for="col in props.cols" :key="col.id">
|
||||||
<div
|
<div
|
||||||
|
|
@ -701,22 +667,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>ส่งตัวกลับ</q-tooltip>
|
<q-tooltip>ส่งตัวกลับ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="
|
|
||||||
!isLeave &&
|
|
||||||
checkPermission($route)?.attrIsDelete &&
|
|
||||||
!props.row.commandId
|
|
||||||
"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -616,7 +616,7 @@ async function fetchDataTenure() {
|
||||||
/**
|
/**
|
||||||
* function เลือกประเภทตำแหน่ง
|
* function เลือกประเภทตำแหน่ง
|
||||||
* @param val id ประเภทตำแหน่ง
|
* @param val id ประเภทตำแหน่ง
|
||||||
* @param status แก้ไข , เพิ่ม
|
* @param status แก่ไข , เพิ่ม
|
||||||
*/
|
*/
|
||||||
async function updateSelectType(val: string, status: boolean = false) {
|
async function updateSelectType(val: string, status: boolean = false) {
|
||||||
const listLevel = val
|
const listLevel = val
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
@ -127,8 +126,8 @@ async function getData() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewOtherByProfileId(profileId.value, empType.value))
|
.get(config.API.profileNewOtherByProfileId(profileId.value, empType.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
rows.value = res.data.result;
|
||||||
rowsMain.value = res.data.result;
|
rowsMain.value = res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -163,7 +162,7 @@ function openDialogHistory(idOrder: string) {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันดึงข้อมูลประวัติการแก้ไขข้อมูล*/
|
/** ฟังก์ชันดึงข้อมูลประวัติการแก่ไขข้อมูล*/
|
||||||
async function fetchDataHistory() {
|
async function fetchDataHistory() {
|
||||||
showLoader();
|
showLoader();
|
||||||
try {
|
try {
|
||||||
|
|
@ -243,23 +242,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileOtherUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await getData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
|
|
@ -379,18 +361,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -413,9 +383,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogHistory(props.row.id)"
|
@click="openDialogHistory(props.row.id)"
|
||||||
|
><q-tooltip>ประวิติแก้ไขอื่นๆ</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขอื่นๆ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
||||||
color="edit"
|
color="edit"
|
||||||
|
|
@ -423,20 +392,8 @@ onMounted(() => {
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
@click="openDialogEdit(props.row)"
|
@click="openDialogEdit(props.row)"
|
||||||
|
><q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const modal = ref<boolean>(false); // แสดงฟอร์มแก้ไข
|
||||||
const informaData = ref<ResponseObject>(); // ข้อมูลส่วนคัว
|
const informaData = ref<ResponseObject>(); // ข้อมูลส่วนคัว
|
||||||
const modalHistory = ref<boolean>(false); // แสดงช้อมูลรายการประวัติการแก้ไข
|
const modalHistory = ref<boolean>(false); // แสดงช้อมูลรายการประวัติการแก้ไข
|
||||||
const age = ref<string | null>(""); //อายุ
|
const age = ref<string | null>(""); //อายุ
|
||||||
const formData = reactive<RequestObject>(store.defaultProfile); //ฟอร์มข้อมูลการแก้ไข
|
const formData = reactive<RequestObject>(store.defaultProfile); //ฟอร์มข้อมูลการแก่้ไข
|
||||||
const emailVerify = ref<string | null>("");
|
const emailVerify = ref<string | null>("");
|
||||||
|
|
||||||
/** ข้อมูล Label*/
|
/** ข้อมูล Label*/
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ const {
|
||||||
hideLoader,
|
hideLoader,
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
dialogRemove,
|
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
|
|
@ -190,8 +189,8 @@ async function fetchData(id: string) {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewChangeNameByProfileId(id, empType.value))
|
.get(config.API.profileNewChangeNameByProfileId(id, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
rows.value = await res.data.result;
|
||||||
rowsMain.value = await res.data.result;
|
rowsMain.value = await res.data.result;
|
||||||
searchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -359,7 +358,7 @@ function closeDialog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ค้นหาข้อมูลรายการประวัติการเปลีียนชื่อ-นามสกุล*/
|
/** ฟังก์ค้นหาข้อมูลรายการประวัติการเปลีียนชื่อ-นามสกุล*/
|
||||||
function searchDataTable() {
|
function serchDataTable() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filterSearch.value,
|
filterSearch.value,
|
||||||
rowsMain.value,
|
rowsMain.value,
|
||||||
|
|
@ -367,23 +366,6 @@ function searchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewChangeNameUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await fetchData(profileId.value);
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ดูการเปลี่ยนแปลงของข้อมูลฟอร์ท เปลี่ยนชื่อ-นามสกุล*/
|
/** ดูการเปลี่ยนแปลงของข้อมูลฟอร์ท เปลี่ยนชื่อ-นามสกุล*/
|
||||||
watch(
|
watch(
|
||||||
() => [
|
() => [
|
||||||
|
|
@ -468,7 +450,7 @@ onMounted(async () => {
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
v-model="filterSearch"
|
v-model="filterSearch"
|
||||||
@keydown.enter.prevent="searchDataTable"
|
@keydown.enter.prevent="serchDataTable"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
|
|
@ -504,7 +486,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-th auto-width />
|
|
||||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
<span class="text-weight-medium">{{ col.label }}</span>
|
||||||
</q-th>
|
</q-th>
|
||||||
|
|
@ -514,19 +495,6 @@ onMounted(async () => {
|
||||||
|
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
|
||||||
v-if="checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
<q-td
|
<q-td
|
||||||
v-for="(col, index) in props.cols"
|
v-for="(col, index) in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
dialogRemove,
|
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
|
|
||||||
/** props*/
|
/** props*/
|
||||||
|
|
@ -368,7 +367,7 @@ function closeDialog() {
|
||||||
/**
|
/**
|
||||||
* function แก้ไขข้อมูล
|
* function แก้ไขข้อมูล
|
||||||
* @param type ประเภทของบุคคล
|
* @param type ประเภทของบุคคล
|
||||||
* @param isStatusEdit สถานะแก้ไข
|
* @param isStatusEdit สถานะแก่้ไข
|
||||||
* @param data ข้อมูลเดิม
|
* @param data ข้อมูลเดิม
|
||||||
*/
|
*/
|
||||||
function onOpenDialogForm(
|
function onOpenDialogForm(
|
||||||
|
|
@ -376,6 +375,8 @@ function onOpenDialogForm(
|
||||||
isStatusEdit: boolean = false,
|
isStatusEdit: boolean = false,
|
||||||
data: any = undefined
|
data: any = undefined
|
||||||
) {
|
) {
|
||||||
|
console.log(data);
|
||||||
|
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
typeForm.value = type;
|
typeForm.value = type;
|
||||||
isEdit.value = isStatusEdit;
|
isEdit.value = isStatusEdit;
|
||||||
|
|
@ -508,24 +509,6 @@ async function fetchDataHistory() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileFamilyUpdateDelete(empType.value, "children") +
|
|
||||||
`${id}`
|
|
||||||
);
|
|
||||||
await fetchDataChildren();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
@ -847,19 +830,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(item.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const id = ref<string>(route.params.id.toString()); //id profile
|
const id = ref<string>(route.params.id.toString()); //id profile
|
||||||
|
|
@ -577,23 +576,6 @@ async function fetchDataHistory() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileEducationUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData(id.value);
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ฟังก์ค้นหาข้อมูลรายการประวัติการศึกษา */
|
/** ฟังก์ค้นหาข้อมูลรายการประวัติการศึกษา */
|
||||||
function serchDataTable() {
|
function serchDataTable() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
|
|
@ -754,18 +736,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -793,7 +763,7 @@ onMounted(async () => {
|
||||||
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขประวัติการศึกษา</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -803,18 +773,6 @@ onMounted(async () => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const id = ref<string>(route.params.id.toString()); //id profile
|
const id = ref<string>(route.params.id.toString()); //id profile
|
||||||
|
|
@ -253,8 +252,8 @@ async function fetchData(id: string) {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewAbilityByProfileId(id, empType.value))
|
.get(config.API.profileNewAbilityByProfileId(id, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
rows.value = await res.data.result;
|
||||||
rowsMain.value = await res.data.result;
|
rowsMain.value = await res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
@ -404,23 +403,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(rowId: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileAbilityUpdateDelete(empType.value) + `${rowId}`
|
|
||||||
);
|
|
||||||
await fetchData(id.value);
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
fetchData(id.value);
|
fetchData(id.value);
|
||||||
|
|
@ -547,18 +529,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -608,7 +578,7 @@ onMounted(() => {
|
||||||
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขความสามารถพิเศษ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="isLeave == false && checkPermission($route)?.attrIsUpdate"
|
v-if="isLeave == false"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
|
|
@ -623,18 +593,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-list>
|
<q-list>
|
||||||
|
|
|
||||||
|
|
@ -596,7 +596,7 @@ async function fetchDataOptionExecutive() {
|
||||||
/**
|
/**
|
||||||
* function เลือกประเภทตำแหน่ง
|
* function เลือกประเภทตำแหน่ง
|
||||||
* @param val id ประเภทตำแหน่ง
|
* @param val id ประเภทตำแหน่ง
|
||||||
* @param status แก้ไข , เพิ่ม
|
* @param status แก่ไข , เพิ่ม
|
||||||
*/
|
*/
|
||||||
async function updateSelectType(val: string, status: boolean = false) {
|
async function updateSelectType(val: string, status: boolean = false) {
|
||||||
const listLevel = val
|
const listLevel = val
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ const {
|
||||||
pathRegistryEmp,
|
pathRegistryEmp,
|
||||||
onSearchDataTable,
|
onSearchDataTable,
|
||||||
convertDateToAPI,
|
convertDateToAPI,
|
||||||
dialogRemove,
|
|
||||||
} = useCounterMixin();
|
} = useCounterMixin();
|
||||||
const { createPathUploadFlie, getPathUploadFlie, uploadFile } =
|
const { createPathUploadFlie, getPathUploadFlie, uploadFile } =
|
||||||
useRegistryNewDataStore();
|
useRegistryNewDataStore();
|
||||||
|
|
@ -296,8 +295,8 @@ async function getData() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNewNoPaidByProfileId(profileId.value, empType.value))
|
.get(config.API.profileNewNoPaidByProfileId(profileId.value, empType.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
rows.value = await res.data.result;
|
||||||
rowsMain.value = await res.data.result;
|
rowsMain.value = await res.data.result;
|
||||||
serchDataTable();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -336,23 +335,6 @@ function serchDataTable() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDelete(id: string) {
|
|
||||||
dialogRemove($q, async () => {
|
|
||||||
showLoader();
|
|
||||||
try {
|
|
||||||
await http.patch(
|
|
||||||
config.API.profileNewNoPaidUpdateDelete(empType.value) + `${id}`
|
|
||||||
);
|
|
||||||
await getData();
|
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
|
||||||
} catch (err) {
|
|
||||||
messageError($q, err);
|
|
||||||
} finally {
|
|
||||||
hideLoader();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน */
|
/** ทำงานเมื่อ Components ถูกเรียกใช้งาน */
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -478,18 +460,6 @@ onMounted(() => {
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
|
|
@ -547,19 +517,7 @@ onMounted(() => {
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click="onClickOpenDialog(true, props.row)"
|
@click="onClickOpenDialog(true, props.row)"
|
||||||
>
|
>
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
||||||
</q-btn>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-if="!isLeave && checkPermission($route)?.attrIsDelete"
|
|
||||||
color="red"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
icon="delete"
|
|
||||||
@click="handleDelete(props.row.id)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ลบข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue