ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -145,7 +145,7 @@ const { loaderPage } = dataStore;
|
|||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { success, dateToISO, messageError, showLoader, hideLoader } = mixin;
|
||||
const { success, dateToISO, messageError } = mixin;
|
||||
const route = useRoute();
|
||||
const examId = ref<string>(route.params.examId.toString());
|
||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
|
|
@ -163,7 +163,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchStatus = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.candidateId(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -174,12 +174,12 @@ const fetchStatus = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const confirm = async (status: boolean, reason: string) => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.put(config.API.candidateCheckRegister(candidateId.value), {
|
||||
status: status,
|
||||
|
|
@ -190,14 +190,14 @@ const confirm = async (status: boolean, reason: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||
router.push(`/qualify/manage/${examId.value}`);
|
||||
});
|
||||
};
|
||||
|
||||
const reject = async (reason: string) => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.put(config.API.candidateRejectRegister(candidateId.value), {
|
||||
reason: reason,
|
||||
|
|
@ -207,7 +207,7 @@ const reject = async (reason: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||
router.push(`/qualify/manage/${examId.value}`);
|
||||
});
|
||||
|
|
@ -253,7 +253,7 @@ const clickSave = async () => {
|
|||
type.value = defaultOccupation.value.employee;
|
||||
if (defaultOccupation.value.status == "other")
|
||||
type.value = defaultOccupation.value.other;
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.candidateId(candidateId.value), {
|
||||
prefixId: defaultInformation.value.prefixId,
|
||||
|
|
@ -329,7 +329,7 @@ const clickSave = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue