Merge branch 'develop' into working

# Conflicts:
#	src/interface/request/main/main.ts
#	src/modules/08_registryEmployee/router.ts
#	src/modules/08_registryEmployee/views/Main.vue
This commit is contained in:
Tanyalak 2023-08-16 17:06:58 +07:00
commit 06c3d36c7a
333 changed files with 64333 additions and 12866 deletions

View file

@ -137,11 +137,9 @@
<div class="row items-center text-dark q-ml-md">
<div class="column">
<div class="text-bold q-pb-xs text-name">
{{ "แก้ไข้ข้อมูลทะเบียนประวัติลูกจ้างชั่วคราว" }}
</div>
<div class="text-bold q-pb-xs text-sub">
{{ "ลูกจ้างชั่วคราว" }}
{{ fullname }}{{ leaveReason }}
</div>
<div>{{ position }}</div>
</div>
</div>
<q-space />
@ -523,9 +521,17 @@ import config from "@/app.config";
const $q = useQuasar();
const store = useDataStore();
const { changeTab, loaderPage } = store;
const { changeTab } = store;
const mixin = useCounterMixin();
const { date2Thai, dateToISO, messageError, dialogMessage, success } = mixin;
const {
date2Thai,
dateToISO,
messageError,
dialogMessage,
success,
showLoader,
hideLoader,
} = mixin;
const route = useRoute();
const router = useRouter();
const imageUrl = ref<any>(null);
@ -605,7 +611,7 @@ onMounted(async () => {
const fetchData = async () => {
if (profileId.value !== "") {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAvatarId(profileId.value))
.then((res) => {
@ -629,14 +635,14 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};
const checkProfileData = async () => {
if (profileId.value !== "") {
loaderPage(true);
showLoader();
await http
.get(config.API.profileCheckId(profileId.value))
.then((res) => {
@ -647,14 +653,14 @@ const checkProfileData = async () => {
router.push("/registry");
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};
const fetchAvatarHistory = async () => {
if (profileId.value !== "") {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAvatarHistoryId(profileId.value))
.then((res) => {
@ -674,7 +680,7 @@ const fetchAvatarHistory = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};
@ -685,7 +691,7 @@ const uploadImage = async (e: any) => {
if (input.length > 0) {
const formData = new FormData();
formData.append("FileData", input[0]);
loaderPage(true);
showLoader();
await http
.post(config.API.profileAvatarId(profileId.value), formData)
.then((res) => {})
@ -702,7 +708,7 @@ const uploadImage = async (e: any) => {
};
const fetchDataDelete = async (id: string) => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileAvatarHistoryId(id))
.then((res) => {
@ -748,7 +754,7 @@ const selectAvatarHistory = async () => {
return;
}
if (profileId.value !== "") {
loaderPage(true);
showLoader();
await http
.put(config.API.profileAvatarId(profileId.value), {
avatar: activeImage.value.avatarId,
@ -819,7 +825,7 @@ const clickKp7 = async () => {
if (profileId.value !== "") {
window.open(config.API.profileReportId(profileId.value));
}
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.profileReportId(profileId.value))
// .then((res) => {
@ -832,7 +838,7 @@ const clickKp7 = async () => {
// })
// .catch((e) => {messageError($q, e);})
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
};
@ -853,7 +859,7 @@ const clickKp7Short = async () => {
if (profileId.value !== "") {
window.open(config.API.profileKp7ShortId(profileId.value));
}
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.profileKp7ShortId(profileId.value))
// .then((res) => {
@ -866,7 +872,7 @@ const clickKp7Short = async () => {
// })
// .catch((e) => {messageError($q, e);})
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
};
@ -896,7 +902,7 @@ const clickRetire = async () => {
const Retire = async () => {
if (profileId.value !== "") {
if (reasonStatus.value == true) {
loaderPage(true);
showLoader();
await http
.put(config.API.profileReactive(profileId.value))
.then((res) => {
@ -911,7 +917,7 @@ const Retire = async () => {
router.push("/registry");
});
} else {
loaderPage(true);
showLoader();
await http
.put(config.API.profileDeactive(profileId.value), {
leaveDate: dateToISO(leaveDate.value),