new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -274,7 +274,7 @@ const subdistrictCOptions = ref<DataOption[]>([]);
|
|||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
||||
watch(myform, async (count: any, prevCount: any) => {
|
||||
|
|
@ -319,7 +319,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ const fetchDistrict = async (id: string, position: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ const fetchSubDistrict = async (id: string, position: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,15 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { dateThaiRange, modalDelete, modalConfirm, dateToISO, success } = mixin;
|
||||
const {
|
||||
dateThaiRange,
|
||||
modalDelete,
|
||||
modalConfirm,
|
||||
dateToISO,
|
||||
success,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const store = useExamDataStore();
|
||||
const { examData, changeExamColumns } = store;
|
||||
const id = ref<string>("");
|
||||
|
|
@ -318,7 +326,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateCareer(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -336,7 +344,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -415,7 +423,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
|||
*/
|
||||
const clickDeleteRow = async () => {
|
||||
if (rawItem.value != null) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
||||
.then(() => {
|
||||
|
|
@ -451,7 +459,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateAdminCareer(candidateId.value), {
|
||||
name: location.value,
|
||||
|
|
@ -476,7 +484,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateAdminCareer(id.value), {
|
||||
name: location.value,
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ const name = ref<string>("");
|
|||
const files = ref<UploadType[]>([]);
|
||||
const file = ref<File[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
|
|
@ -180,7 +180,7 @@ const fileAdd = async (val: any) => {
|
|||
};
|
||||
|
||||
const getData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateUpload(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -191,7 +191,7 @@ const getData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ const deleteData = async (id: string) => {
|
|||
const params = {
|
||||
documentId: id,
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.candidateUpload(candidateId.value), {
|
||||
params,
|
||||
|
|
@ -211,7 +211,7 @@ const deleteData = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await getData();
|
||||
});
|
||||
};
|
||||
|
|
@ -223,7 +223,7 @@ const uploadData = async () => {
|
|||
});
|
||||
const formData = new FormData();
|
||||
formData.append("", newFile);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateUpload(candidateId.value), formData)
|
||||
.then((res) => {
|
||||
|
|
@ -233,7 +233,7 @@ const uploadData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
name.value = "";
|
||||
uploader.value.reset();
|
||||
await getData();
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ const rows = ref<RequestItemsObject[]>([]);
|
|||
const route = useRoute();
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
const filter = ref<string>(""); //search data table
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateEducation(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -343,12 +343,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetcheducationLevel = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.educationLevel)
|
||||
.then((res) => {
|
||||
|
|
@ -363,7 +363,7 @@ const fetcheducationLevel = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
|||
*/
|
||||
const clickDeleteRow = async () => {
|
||||
if (rawItem.value != null) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.candidateAdminEducation(rawItem.value.id))
|
||||
.then(() => {
|
||||
|
|
@ -480,7 +480,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateAdminEducation(candidateId.value), {
|
||||
educationLevelId: educationLevelId.value,
|
||||
|
|
@ -505,7 +505,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateAdminEducation(id.value), {
|
||||
educationLevelId: educationLevelId.value,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { messageError, date2Thai } = mixin;
|
||||
const { messageError, date2Thai, showLoader, hideLoader } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const fullName = ref<string>("");
|
||||
|
|
@ -136,7 +136,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchCard = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateCard(props.candidateId))
|
||||
.then((res) => {
|
||||
|
|
@ -178,7 +178,7 @@ const fetchCard = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ const $q = useQuasar();
|
|||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const edit = ref<boolean>(true);
|
||||
const myform = ref<any>({});
|
||||
const route = useRoute();
|
||||
|
|
@ -323,7 +323,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateFamily(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -350,7 +350,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -430,7 +430,8 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, calAge, modalError, success } = mixin;
|
||||
const { date2Thai, calAge, modalError, success, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const districtOptions = ref<DataOption[]>([]);
|
||||
const route = useRoute();
|
||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
|
|
@ -463,7 +464,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateInformation(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -494,12 +495,12 @@ const fetchData = async () => {
|
|||
keycloak.tokenParsed == null ? "" : keycloak.tokenParsed.family_name;
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchImgData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateProfile(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -510,7 +511,7 @@ const fetchImgData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -542,7 +543,7 @@ const selectProvince = (val: string) => {
|
|||
};
|
||||
|
||||
const fetchDistrict = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -557,7 +558,7 @@ const fetchDistrict = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ const candidateId = ref<string>(route.params.candidateId.toString());
|
|||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const emit = defineEmits(["update:form"]);
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateOccupation(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -327,7 +327,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@
|
|||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
<div class="q-px-sm">
|
||||
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
||||
<Family
|
||||
:prefixOptions="prefixOptions"
|
||||
:status="status"
|
||||
v-model:form="formFamily"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||
|
|
@ -94,7 +98,7 @@ const formAddress = ref<any>({});
|
|||
const formFamily = ref<any>({});
|
||||
const formOccupation = ref<any>({});
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const emit = defineEmits([
|
||||
"update:formInformation",
|
||||
|
|
@ -120,14 +124,14 @@ watch(formOccupation, async (count: Object, prevCount: Object) => {
|
|||
});
|
||||
|
||||
onMounted(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
fetchPrefix();
|
||||
fetchRelationship();
|
||||
fetchProvince();
|
||||
});
|
||||
|
||||
const fetchPrefix = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
|
|
@ -142,12 +146,12 @@ const fetchPrefix = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchRelationship = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.relationship)
|
||||
.then((res) => {
|
||||
|
|
@ -162,12 +166,12 @@ const fetchRelationship = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchProvince = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
|
|
@ -182,7 +186,7 @@ const fetchProvince = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ const table = ref<any>(null);
|
|||
const files = ref<File[]>([]);
|
||||
const filterRef = ref<any>(null);
|
||||
const examId = ref<string>(route.params.examId.toString());
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const props = defineProps({
|
||||
inputfilter: String,
|
||||
inputvisible: Array,
|
||||
|
|
@ -278,7 +278,7 @@ const uploadFile = async () => {
|
|||
};
|
||||
|
||||
const uploadDataSeat = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("", files.value[0]);
|
||||
await http
|
||||
|
|
@ -290,14 +290,14 @@ const uploadDataSeat = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
files.value = [];
|
||||
props.fetchData();
|
||||
});
|
||||
};
|
||||
|
||||
const uploadDataPoint = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("", files.value[0]);
|
||||
await http
|
||||
|
|
@ -310,14 +310,14 @@ const uploadDataPoint = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
files.value = [];
|
||||
props.fetchData();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadFile = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamDownload(examId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -330,12 +330,12 @@ const downloadFile = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadFileDetail = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamDownloadDetail(examId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -348,7 +348,7 @@ const downloadFileDetail = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ const router = useRouter();
|
|||
const route = useRoute();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const year = ref<string>("");
|
||||
const round = ref<string>("");
|
||||
const name = ref<string>("");
|
||||
|
|
@ -337,7 +337,7 @@ const pagesNumber = computed(() => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
|
|
@ -346,7 +346,7 @@ const clickDetail = (examID: string) => {
|
|||
};
|
||||
|
||||
const downloadExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -362,12 +362,12 @@ const downloadExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportPassExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -383,12 +383,12 @@ const downloadPassExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassResultExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportPassResultExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -404,12 +404,12 @@ const downloadPassResultExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.getExamResultById(importId.value), {
|
||||
examAttribute: "",
|
||||
|
|
@ -437,7 +437,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -26,12 +26,16 @@
|
|||
{{ profile_id }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="prefix !== null">คำนำหน้านาม</div>
|
||||
<div class="col-6 text-grey-7" v-if="prefix !== null">
|
||||
คำนำหน้านาม
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="prefix !== null">
|
||||
{{ prefix }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="fullname !== null">ชื่อ-นามสกุล</div>
|
||||
<div class="col-6 text-grey-7" v-if="fullname !== null">
|
||||
ชื่อ-นามสกุล
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="fullname !== null">
|
||||
{{ fullname }}
|
||||
</div>
|
||||
|
|
@ -55,17 +59,23 @@
|
|||
{{ position_name }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="university !== null">สถานศึกษา</div>
|
||||
<div class="col-6 text-grey-7" v-if="university !== null">
|
||||
สถานศึกษา
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="university !== null">
|
||||
{{ university }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="degree !== null">วุฒิการศึกษา</div>
|
||||
<div class="col-6 text-grey-7" v-if="degree !== null">
|
||||
วุฒิการศึกษา
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="degree !== null">
|
||||
{{ degree }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="major !== null">สาขาวิชาเอก</div>
|
||||
<div class="col-6 text-grey-7" v-if="major !== null">
|
||||
สาขาวิชาเอก
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="major !== null">
|
||||
{{ major }}
|
||||
</div>
|
||||
|
|
@ -118,7 +128,11 @@
|
|||
>ดาวน์โหลดผลคะแนน</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="downloadCertificate()">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCertificate()"
|
||||
>
|
||||
<q-item-section class="text-blue"
|
||||
>ดาวน์โหลดเอกสารรับรอง</q-item-section
|
||||
>
|
||||
|
|
@ -138,12 +152,18 @@
|
|||
</q-btn>
|
||||
</div>
|
||||
<div class="row items-center q-gutter-y-sm col-12">
|
||||
<div class="col-xs-4 col-sm-5 text-weight-medium text-grey-7">ประเภท</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">คะแนนเต็ม</div>
|
||||
<div class="col-xs-4 col-sm-5 text-weight-medium text-grey-7">
|
||||
ประเภท
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">
|
||||
คะแนนเต็ม
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">
|
||||
คะแนนที่ได้
|
||||
</div>
|
||||
<div class="col-xs-2 col-sm-2 text-primary text-weight-bold"></div>
|
||||
<div
|
||||
class="col-xs-2 col-sm-2 text-primary text-weight-bold"
|
||||
></div>
|
||||
|
||||
<div class="col-xs-4 col-sm-5 text-grey-7">ภาค ก</div>
|
||||
<div class="col-xs-3 col-sm-2 q-pr-xs">
|
||||
|
|
@ -181,10 +201,16 @@
|
|||
</div>
|
||||
<div class="col-xs-2 col-sm-2 q-pr-xs text-grey-7">คะแนน</div>
|
||||
|
||||
<div class="col-xs-4 col-sm-5 text-weight-bold q-pt-sm">ผลการสอบ</div>
|
||||
<div class="col-xs-8 col-sm-6 q-pr-xs text-weight-bold text-subtitle1">
|
||||
<div class="col-xs-4 col-sm-5 text-weight-bold q-pt-sm">
|
||||
ผลการสอบ
|
||||
</div>
|
||||
<div
|
||||
class="col-xs-8 col-sm-6 q-pr-xs text-weight-bold text-subtitle1"
|
||||
>
|
||||
<span
|
||||
:class="examResultinscore != 'ผ่าน' ? 'text-red' : 'text-positive'"
|
||||
:class="
|
||||
examResultinscore != 'ผ่าน' ? 'text-red' : 'text-positive'
|
||||
"
|
||||
>{{ examResultinscore }}</span
|
||||
>
|
||||
</div>
|
||||
|
|
@ -194,7 +220,9 @@
|
|||
{{ number }}
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-sm-5 text-grey-7">วันหมดอายุบัญชีสอบแข่งขัน</div>
|
||||
<div class="col-xs-6 col-sm-5 text-grey-7">
|
||||
วันหมดอายุบัญชีสอบแข่งขัน
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-7 q-pr-xs">
|
||||
{{ score_expired }}
|
||||
</div>
|
||||
|
|
@ -241,7 +269,7 @@ const examCount = ref<string>("");
|
|||
const number = ref<string>("");
|
||||
const score_expired = ref<string>("");
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const examID = ref<string>("62150001");
|
||||
const prefix = ref<string>("นาย");
|
||||
const fullname = ref<string>("เกียรติศักดิ์ บัณฑิต");
|
||||
|
|
@ -253,7 +281,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getExamDetail(importId.value, examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -290,12 +318,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadScore = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.downloadScoreReport(importId.value, examId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -311,12 +339,12 @@ const downloadScore = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadCertificate = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.downloadExamReport(importId.value, examId.value, 2), {
|
||||
responseType: "blob",
|
||||
|
|
@ -332,7 +360,7 @@ const downloadCertificate = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -316,7 +316,10 @@
|
|||
<q-dialog v-model="modalCandidate" persistent>
|
||||
<q-card style="width: 600px">
|
||||
<q-form ref="myFormScore">
|
||||
<DialogHeader :tittle="textTittleCandidate" :close="clickCloseCandidate" />
|
||||
<DialogHeader
|
||||
:tittle="textTittleCandidate"
|
||||
:close="clickCloseCandidate"
|
||||
/>
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="col-12 row items-center q-col-gutter-sm">
|
||||
|
|
@ -379,7 +382,7 @@ const name = ref<string>("");
|
|||
const year = ref<number>(new Date().getFullYear() + 543);
|
||||
const order = ref<number>(1);
|
||||
const mixin = useCounterMixin();
|
||||
const { success, dateToISO, dateText } = mixin;
|
||||
const { success, dateToISO, dateText, showLoader, hideLoader } = mixin;
|
||||
const files = ref<any>(null);
|
||||
const files_score = ref<any>(null);
|
||||
const files_candidate = ref<any>(null);
|
||||
|
|
@ -551,7 +554,7 @@ const visibleColumnsHistory = ref<String[]>([
|
|||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
|
|
@ -564,7 +567,7 @@ const textDate = (value: Date) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getCandidates)
|
||||
.then((res) => {
|
||||
|
|
@ -586,7 +589,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -620,7 +623,7 @@ const clickEditPeriod = (id: string) => {
|
|||
|
||||
const clickHistory = async (id: string) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getImportHistory(id))
|
||||
.then((res) => {
|
||||
|
|
@ -649,7 +652,7 @@ const clickHistory = async (id: string) => {
|
|||
statusCode.value = e.response.data.status;
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -664,7 +667,7 @@ const clickDelete = (id: string) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.deleteCandidates(id))
|
||||
.then((res) => {
|
||||
|
|
@ -675,7 +678,7 @@ const clickDelete = (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
|
|
@ -704,7 +707,7 @@ const clickCloseCandidate = async () => {
|
|||
const checkSaveCandidate = async () => {
|
||||
const fd = new FormData();
|
||||
fd.append("attachment", files_candidate.value[0]);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.uploadCandidates(selected_row_id.value), fd)
|
||||
.then((res) => {
|
||||
|
|
@ -717,14 +720,14 @@ const checkSaveCandidate = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const checkSaveScore = async () => {
|
||||
const fd = new FormData();
|
||||
fd.append("attachment", files_score.value[0]);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.saveScores(selected_row_id.value), fd)
|
||||
.then((res) => {
|
||||
|
|
@ -737,7 +740,7 @@ const checkSaveScore = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -747,7 +750,7 @@ const checkSave = async () => {
|
|||
fd.append("year", year.value.toString());
|
||||
fd.append("order", order.value.toString());
|
||||
fd.append("name", name.value);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.saveCandidates, fd)
|
||||
.then((res) => {
|
||||
|
|
@ -759,7 +762,7 @@ const checkSave = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@
|
|||
label="ชื่อรอบการสอบแข่งขัน/ชื่อประกาศ"
|
||||
dense
|
||||
lazy-rules
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อรอบการสอบแข่งขัน/ชื่อประกาศ'}`]"
|
||||
:rules="[
|
||||
(val) =>
|
||||
!!val || `${'กรุณากรอกชื่อรอบการสอบแข่งขัน/ชื่อประกาศ'}`,
|
||||
]"
|
||||
></q-input>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4 col-md-1" v-if="announcementExam">
|
||||
|
|
@ -83,7 +86,9 @@
|
|||
dense
|
||||
lazy-rules
|
||||
input-class="text-right"
|
||||
:rules="[(val) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`]"
|
||||
:rules="[
|
||||
(val) => val >= 0 || `${'กรุณากรอกค่าธรรมเนียมให้ถูกต้อง'}`,
|
||||
]"
|
||||
></q-input>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-3" v-if="announcementExam">
|
||||
|
|
@ -295,7 +300,9 @@
|
|||
@removed="fileRemoveImg"
|
||||
>
|
||||
<template v-slot:header="scope">
|
||||
<div class="row no-wrap items-center q-pa-sm q-gutter-xs text-white">
|
||||
<div
|
||||
class="row no-wrap items-center q-pa-sm q-gutter-xs text-white"
|
||||
>
|
||||
<q-btn
|
||||
v-if="scope.queuedFiles.length > 0"
|
||||
icon="clear_all"
|
||||
|
|
@ -316,7 +323,10 @@
|
|||
>
|
||||
<q-tooltip>ลบไฟล์ที่อัปโหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-spinner v-if="scope.isUploading" class="q-uploader__spinner" />
|
||||
<q-spinner
|
||||
v-if="scope.isUploading"
|
||||
class="q-uploader__spinner"
|
||||
/>
|
||||
<div class="col">
|
||||
<div class="q-uploader__title">
|
||||
{{ "[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 10MB]" }}
|
||||
|
|
@ -360,7 +370,11 @@
|
|||
v-if="fileImgs.length != 0"
|
||||
>
|
||||
<q-list separator>
|
||||
<q-item v-for="file in fileImgs" :key="file.id" class="q-my-xs">
|
||||
<q-item
|
||||
v-for="file in fileImgs"
|
||||
:key="file.id"
|
||||
class="q-my-xs"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label class="full-width ellipsis">
|
||||
{{ file.fileName }}
|
||||
|
|
@ -421,7 +435,9 @@
|
|||
@removed="fileRemoveDoc"
|
||||
>
|
||||
<template v-slot:header="scope">
|
||||
<div class="row no-wrap items-center q-pa-sm q-gutter-xs text-white">
|
||||
<div
|
||||
class="row no-wrap items-center q-pa-sm q-gutter-xs text-white"
|
||||
>
|
||||
<q-btn
|
||||
v-if="scope.queuedFiles.length > 0"
|
||||
icon="clear_all"
|
||||
|
|
@ -442,7 +458,10 @@
|
|||
>
|
||||
<q-tooltip>ลบไฟล์ที่อัปโหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-spinner v-if="scope.isUploading" class="q-uploader__spinner" />
|
||||
<q-spinner
|
||||
v-if="scope.isUploading"
|
||||
class="q-uploader__spinner"
|
||||
/>
|
||||
<div class="col">
|
||||
<div class="q-uploader__title">
|
||||
{{ "[ไฟล์ jpg,png,pdf,csv,doc ขนาดไม่เกิน 10MB]" }}
|
||||
|
|
@ -486,7 +505,11 @@
|
|||
v-if="fileDocs.length != 0"
|
||||
>
|
||||
<q-list separator>
|
||||
<q-item v-for="file in fileDocs" :key="file.id" class="q-my-xs">
|
||||
<q-item
|
||||
v-for="file in fileDocs"
|
||||
:key="file.id"
|
||||
class="q-my-xs"
|
||||
>
|
||||
<q-item-section>
|
||||
<q-item-label class="full-width ellipsis">
|
||||
{{ file.fileName }}
|
||||
|
|
@ -534,7 +557,9 @@
|
|||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="text-bold text-subtitle2 q-pb-sm q-pt-md">รายละเอียด</div>
|
||||
<div class="text-bold text-subtitle2 q-pb-sm q-pt-md">
|
||||
รายละเอียด
|
||||
</div>
|
||||
<q-editor
|
||||
v-model="editor"
|
||||
:dense="$q.screen.lt.md"
|
||||
|
|
@ -544,7 +569,14 @@
|
|||
class="editor"
|
||||
:toolbar="[
|
||||
['left', 'center', 'right', 'justify'],
|
||||
['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
|
||||
[
|
||||
'bold',
|
||||
'italic',
|
||||
'strike',
|
||||
'underline',
|
||||
'subscript',
|
||||
'superscript',
|
||||
],
|
||||
['token', 'hr', 'link', 'custom_btn'],
|
||||
['print', 'fullscreen'],
|
||||
[
|
||||
|
|
@ -637,7 +669,8 @@ const $q = useQuasar(); // show dialog
|
|||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { date2Thai, success, dateToISO, notifyError } = mixin;
|
||||
const { date2Thai, success, dateToISO, notifyError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const myForm = ref<QForm | null>(null); //form data input
|
||||
const name = ref<string>("");
|
||||
const note = ref<string>("");
|
||||
|
|
@ -733,7 +766,7 @@ watch(organizationName, (count: DataOption, prevCount: DataOption) => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
if (route.params.id != undefined) {
|
||||
edit.value = true;
|
||||
id.value = route.params.id.toString();
|
||||
|
|
@ -748,7 +781,7 @@ const clickBack = () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getPeriodById(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -785,7 +818,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -797,7 +830,9 @@ const fileUploadDoc = async (files: any) => {
|
|||
|
||||
const fileRemoveDoc = async (files: any) => {
|
||||
files.forEach((file: any) => {
|
||||
const index = fileDocDataUpload.value.findIndex((x: any) => x.__key == file.__key);
|
||||
const index = fileDocDataUpload.value.findIndex(
|
||||
(x: any) => x.__key == file.__key
|
||||
);
|
||||
if (index > -1) {
|
||||
fileDocDataUpload.value.splice(index, 1);
|
||||
}
|
||||
|
|
@ -810,7 +845,7 @@ const uploadDocData = async () => {
|
|||
fileDocDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodRecruitDoc(id.value), formData)
|
||||
.then((res) => {})
|
||||
|
|
@ -818,7 +853,7 @@ const uploadDocData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
clickBack();
|
||||
});
|
||||
|
|
@ -834,7 +869,7 @@ const uploadImgData = async () => {
|
|||
fileImgDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodRecruitImg(id.value), formData)
|
||||
.then((res) => {})
|
||||
|
|
@ -842,7 +877,7 @@ const uploadImgData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -855,7 +890,9 @@ const fileUploadImg = async (files: any) => {
|
|||
|
||||
const fileRemoveImg = async (files: any) => {
|
||||
files.forEach((file: any) => {
|
||||
const index = fileImgDataUpload.value.findIndex((x: any) => x.__key == file.__key);
|
||||
const index = fileImgDataUpload.value.findIndex(
|
||||
(x: any) => x.__key == file.__key
|
||||
);
|
||||
if (index > -1) {
|
||||
fileImgDataUpload.value.splice(index, 1);
|
||||
}
|
||||
|
|
@ -906,7 +943,7 @@ const sendData = () => {
|
|||
};
|
||||
|
||||
const deleteDocData = async (docId: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.periodDeleteDoc(docId))
|
||||
.then(async () => {
|
||||
|
|
@ -916,12 +953,12 @@ const deleteDocData = async (docId: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const deleteImgData = async (docId: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.periodDeleteImg(docId))
|
||||
.then(async () => {
|
||||
|
|
@ -931,12 +968,12 @@ const deleteImgData = async (docId: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const addData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.savePeriod, sendData())
|
||||
.then(async (res) => {
|
||||
|
|
@ -949,12 +986,12 @@ const addData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const editData = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.editPeriod(id), sendData())
|
||||
.then(async () => {
|
||||
|
|
@ -965,7 +1002,7 @@ const editData = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ const pass = ref<number>(0);
|
|||
const notpass = ref<number>(0);
|
||||
const importId = ref<string>(route.params.id as string); // Period Import Id
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const filter = ref<string>(""); //search data table
|
||||
const visibleColumns = ref<String[]>([
|
||||
"examID",
|
||||
|
|
@ -317,12 +317,12 @@ const clickDetail = (examID: string) => {
|
|||
};
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const downloadExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportDisableExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -338,12 +338,12 @@ const downloadExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportDisablePassExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -359,12 +359,12 @@ const downloadPassExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadPassResultExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.exportDisablePassResultExam(importId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -380,12 +380,12 @@ const downloadPassResultExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.getDisableExamResultById(importId.value), {
|
||||
examAttribute: "",
|
||||
|
|
@ -416,7 +416,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -26,12 +26,16 @@
|
|||
{{ profile_id }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="prefix !== null">คำนำหน้านาม</div>
|
||||
<div class="col-6 text-grey-7" v-if="prefix !== null">
|
||||
คำนำหน้านาม
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="prefix !== null">
|
||||
{{ prefix }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="fullname !== null">ชื่อ-นามสกุล</div>
|
||||
<div class="col-6 text-grey-7" v-if="fullname !== null">
|
||||
ชื่อ-นามสกุล
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="fullname !== null">
|
||||
{{ fullname }}
|
||||
</div>
|
||||
|
|
@ -55,17 +59,23 @@
|
|||
{{ position_name }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="university !== null">สถานศึกษา</div>
|
||||
<div class="col-6 text-grey-7" v-if="university !== null">
|
||||
สถานศึกษา
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="university !== null">
|
||||
{{ university }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="degree !== null">วุฒิการศึกษา</div>
|
||||
<div class="col-6 text-grey-7" v-if="degree !== null">
|
||||
วุฒิการศึกษา
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="degree !== null">
|
||||
{{ degree }}
|
||||
</div>
|
||||
|
||||
<div class="col-6 text-grey-7" v-if="major !== null">สาขาวิชาเอก</div>
|
||||
<div class="col-6 text-grey-7" v-if="major !== null">
|
||||
สาขาวิชาเอก
|
||||
</div>
|
||||
<div class="col-6 text-black" v-if="major !== null">
|
||||
{{ major }}
|
||||
</div>
|
||||
|
|
@ -118,7 +128,11 @@
|
|||
>ดาวน์โหลดผลคะแนน</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click="downloadCertificate()">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="downloadCertificate()"
|
||||
>
|
||||
<q-item-section class="text-blue"
|
||||
>ดาวน์โหลดเอกสารรับรอง</q-item-section
|
||||
>
|
||||
|
|
@ -138,12 +152,18 @@
|
|||
</q-btn>
|
||||
</div>
|
||||
<div class="row items-center q-gutter-y-sm col-12">
|
||||
<div class="col-xs-4 col-sm-5 text-weight-medium text-grey-7">ประเภท</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">คะแนนเต็ม</div>
|
||||
<div class="col-xs-4 col-sm-5 text-weight-medium text-grey-7">
|
||||
ประเภท
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">
|
||||
คะแนนเต็ม
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2 text-primary text-weight-bold">
|
||||
คะแนนที่ได้
|
||||
</div>
|
||||
<div class="col-xs-2 col-sm-2 text-primary text-weight-bold"></div>
|
||||
<div
|
||||
class="col-xs-2 col-sm-2 text-primary text-weight-bold"
|
||||
></div>
|
||||
|
||||
<div class="col-xs-4 col-sm-5 text-grey-7">ภาค ก</div>
|
||||
<div class="col-xs-3 col-sm-2 q-pr-xs">
|
||||
|
|
@ -181,10 +201,16 @@
|
|||
</div>
|
||||
<div class="col-xs-2 col-sm-2 q-pr-xs text-grey-7">คะแนน</div>
|
||||
|
||||
<div class="col-xs-4 col-sm-5 text-weight-bold q-pt-sm">ผลการสอบ</div>
|
||||
<div class="col-xs-8 col-sm-6 q-pr-xs text-weight-bold text-subtitle1">
|
||||
<div class="col-xs-4 col-sm-5 text-weight-bold q-pt-sm">
|
||||
ผลการสอบ
|
||||
</div>
|
||||
<div
|
||||
class="col-xs-8 col-sm-6 q-pr-xs text-weight-bold text-subtitle1"
|
||||
>
|
||||
<span
|
||||
:class="examResultinscore != 'ผ่าน' ? 'text-red' : 'text-positive'"
|
||||
:class="
|
||||
examResultinscore != 'ผ่าน' ? 'text-red' : 'text-positive'
|
||||
"
|
||||
>{{ examResultinscore }}</span
|
||||
>
|
||||
</div>
|
||||
|
|
@ -222,7 +248,7 @@ const dataStore = useDataStore();
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError } = mixin;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
const { loaderPage } = dataStore;
|
||||
const date = ref<any>();
|
||||
const profile_id = ref<string>("");
|
||||
|
|
@ -263,7 +289,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDisableExamDetail(importId.value, examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -303,12 +329,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadScore = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.downloadDisableScoreReport(importId.value, examId.value), {
|
||||
responseType: "blob",
|
||||
|
|
@ -324,16 +350,19 @@ const downloadScore = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadCertificate = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.downloadDisableExamReport(importId.value, examId.value, 2), {
|
||||
responseType: "blob",
|
||||
})
|
||||
.get(
|
||||
config.API.downloadDisableExamReport(importId.value, examId.value, 2),
|
||||
{
|
||||
responseType: "blob",
|
||||
}
|
||||
)
|
||||
.then((res) => {
|
||||
var a = document.createElement("a");
|
||||
a.href = URL.createObjectURL(res.data);
|
||||
|
|
@ -345,7 +374,7 @@ const downloadCertificate = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ const name = ref<string>("");
|
|||
const year = ref<number>(new Date().getFullYear() + 543);
|
||||
const round = ref<number>(1);
|
||||
const mixin = useCounterMixin();
|
||||
const { success, dateText, messageError } = mixin;
|
||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||
const files = ref<any>(null);
|
||||
const files_score = ref<any>(null);
|
||||
const files_candidate = ref<any>(null);
|
||||
|
|
@ -549,7 +549,7 @@ const visibleColumnsHistory = ref<String[]>([
|
|||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
|
|
@ -570,7 +570,7 @@ const textDate = (value: Date) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDisableCandidates)
|
||||
.then((res) => {
|
||||
|
|
@ -592,7 +592,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -618,7 +618,7 @@ const clickEditPeriod = (id: string) => {
|
|||
|
||||
const clickHistory = async (id: string) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDisableImportHistory(id))
|
||||
.then((res) => {
|
||||
|
|
@ -644,7 +644,7 @@ const clickHistory = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -659,7 +659,7 @@ const clickDelete = (id: string) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.deleteDisableCandidates(id))
|
||||
.then((res) => {
|
||||
|
|
@ -670,7 +670,7 @@ const clickDelete = (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
|
|
@ -699,7 +699,7 @@ const clickCloseCandidate = async () => {
|
|||
const checkSaveCandidate = async () => {
|
||||
const fd = new FormData();
|
||||
fd.append("attachment", files_candidate.value[0]);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.uploadDisableCandidates(selected_row_id.value), fd)
|
||||
.then((res) => {
|
||||
|
|
@ -712,14 +712,14 @@ const checkSaveCandidate = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const checkSaveScore = async () => {
|
||||
const fd = new FormData();
|
||||
fd.append("attachment", files_score.value[0]);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.saveDisableScores(selected_row_id.value), fd)
|
||||
.then((res) => {
|
||||
|
|
@ -732,7 +732,7 @@ const checkSaveScore = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -742,7 +742,7 @@ const checkSave = async () => {
|
|||
fd.append("year", year.value.toString());
|
||||
fd.append("round", round.value.toString());
|
||||
fd.append("name", name.value);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.saveDisableCandidates, fd)
|
||||
.then((res) => {
|
||||
|
|
@ -754,7 +754,7 @@ const checkSave = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -671,7 +671,15 @@ const $q = useQuasar(); // show dialog
|
|||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { date2Thai, success, dateToISO, notifyError, messageError } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
notifyError,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const myForm = ref<QForm | null>(null); //form data input
|
||||
const name = ref<string>("");
|
||||
const note = ref<string>("");
|
||||
|
|
@ -719,7 +727,7 @@ onMounted(async () => {
|
|||
if (route.params.id != undefined) {
|
||||
edit.value = true;
|
||||
id.value = route.params.id.toString();
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
} else {
|
||||
edit.value = false;
|
||||
|
|
@ -731,7 +739,7 @@ const clickBack = () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.getDisablePeriodById(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -764,7 +772,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -808,7 +816,7 @@ const sendData = () => {
|
|||
};
|
||||
|
||||
const addData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.saveDisablePeriod, sendData())
|
||||
.then(async (res) => {
|
||||
|
|
@ -823,12 +831,12 @@ const addData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const editData = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.editDisablePeriod(id), sendData())
|
||||
.then(async () => {
|
||||
|
|
@ -841,7 +849,7 @@ const editData = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -868,7 +876,7 @@ const uploadImgData = async () => {
|
|||
fileImgDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodExamImg(id.value), formData)
|
||||
.then((res) => {})
|
||||
|
|
@ -876,7 +884,7 @@ const uploadImgData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -885,7 +893,7 @@ const deleteDocData = async (docId: string) => {
|
|||
const params = {
|
||||
documentId: docId,
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.periodExamDoc(id.value.toString()), {
|
||||
params,
|
||||
|
|
@ -898,7 +906,7 @@ const deleteDocData = async (docId: string) => {
|
|||
})
|
||||
.finally(async () => {
|
||||
await fetchData();
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -929,7 +937,7 @@ const uploadDocData = async () => {
|
|||
fileDocDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodExamDoc(id.value), formData)
|
||||
.then((res) => {})
|
||||
|
|
@ -937,7 +945,7 @@ const uploadDocData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
clickBack();
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ const { loaderPage } = dataStore;
|
|||
const router = useRouter();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { success, dateToISO, messageError } = mixin;
|
||||
const { success, dateToISO, messageError, showLoader, hideLoader } = 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 () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateId(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -174,12 +174,12 @@ const fetchStatus = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const confirm = async (status: boolean, reason: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
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 () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||
router.push(`/qualify/manage/${examId.value}`);
|
||||
});
|
||||
};
|
||||
|
||||
const reject = async (reason: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateRejectRegister(candidateId.value), {
|
||||
reason: reason,
|
||||
|
|
@ -207,7 +207,7 @@ const reject = async (reason: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
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;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateId(candidateId.value), {
|
||||
prefixId: defaultInformation.value.prefixId,
|
||||
|
|
@ -329,7 +329,7 @@ const clickSave = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ const dataStore = useDataStore();
|
|||
const { loaderPage } = dataStore;
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, messageError } = mixin;
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||
const rows = ref<ResponsePeriodExam[]>([]);
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
|
|
@ -163,12 +163,12 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamType("exam"))
|
||||
.then((res) => {
|
||||
|
|
@ -219,7 +219,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ const fee = ref<number>();
|
|||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { success, messageError } = mixin;
|
||||
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||
const route = useRoute();
|
||||
const examId = ref<string>(route.params.examId.toString());
|
||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
|
|
@ -308,13 +308,13 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchPaymentExam();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidatePayment(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -325,12 +325,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchPaymentExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamPayment(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -342,12 +342,12 @@ const fetchPaymentExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const confirm = async (status: boolean, reason: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateCheckPayment(candidateId.value), {
|
||||
status: status,
|
||||
|
|
@ -358,7 +358,7 @@ const confirm = async (status: boolean, reason: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
success($q, "ตรวจสอบข้อมูลชำระเงินสำเร็จ");
|
||||
router.push(`/qualify/manage/${examId.value}`);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -102,7 +102,14 @@ const { loaderPage } = dataStore;
|
|||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
const { date2Thai, success, typeCategoryExam, messageError } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
typeCategoryExam,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const filter = ref<string>(""); //search data table
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
|
|
@ -223,12 +230,12 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamType("all"))
|
||||
.then((res) => {
|
||||
|
|
@ -305,7 +312,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -335,7 +342,7 @@ const clickAdd = () => {
|
|||
};
|
||||
|
||||
const deleteData = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.periodExamId(id))
|
||||
.then((res) => {
|
||||
|
|
@ -345,7 +352,7 @@ const deleteData = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchData();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -976,7 +976,8 @@ const $q = useQuasar(); // show dialog
|
|||
const mixin = useCounterMixin();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const myForm = ref<QForm | null>(null); //form data input
|
||||
const name = ref<string>("");
|
||||
const note = ref<string>("");
|
||||
|
|
@ -1099,7 +1100,7 @@ watch(organizationName, (count: DataOption, prevCount: DataOption) => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
if (route.params.id != undefined) {
|
||||
edit.value = true;
|
||||
id.value = route.params.id.toString();
|
||||
|
|
@ -1122,7 +1123,7 @@ const clickBack = () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1196,7 +1197,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1204,7 +1205,7 @@ const fetchData = async () => {
|
|||
* get รายการ รหัสหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationShortName = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.organizationShortName)
|
||||
.then((res) => {
|
||||
|
|
@ -1222,7 +1223,7 @@ const fetchOrganizationShortName = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1230,7 +1231,7 @@ const fetchOrganizationShortName = async () => {
|
|||
* get รายการ หน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationOrganization = async (val: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.organization)
|
||||
.then((res) => {
|
||||
|
|
@ -1248,7 +1249,7 @@ const fetchOrganizationOrganization = async (val: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1256,7 +1257,7 @@ const fetchOrganizationOrganization = async (val: string) => {
|
|||
* get รายการ ตำแหน่งในสายงาน
|
||||
*/
|
||||
const fetchPositionPath = async (val: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.positionPath)
|
||||
.then((res) => {
|
||||
|
|
@ -1274,7 +1275,7 @@ const fetchPositionPath = async (val: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1355,7 +1356,7 @@ const sendData = () => {
|
|||
};
|
||||
|
||||
const addData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.periodExam, sendData())
|
||||
.then(async (res) => {
|
||||
|
|
@ -1370,12 +1371,12 @@ const addData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const editData = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodExamId(id), sendData())
|
||||
.then(async (res) => {
|
||||
|
|
@ -1388,7 +1389,7 @@ const editData = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1415,13 +1416,13 @@ const uploadDocData = async () => {
|
|||
fileDocDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodExamDoc(id.value), formData)
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
clickBack();
|
||||
|
|
@ -1451,13 +1452,13 @@ const uploadImgData = async () => {
|
|||
fileImgDataUpload.value.forEach((file: any) => {
|
||||
formData.append("", file);
|
||||
});
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.periodExamImg(id.value), formData)
|
||||
.then((res) => {})
|
||||
.catch((e) => {})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1466,7 +1467,7 @@ const deleteDocData = async (docId: string) => {
|
|||
const params = {
|
||||
documentId: docId,
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.periodExamDoc(id.value.toString()), {
|
||||
params,
|
||||
|
|
|
|||
|
|
@ -282,7 +282,14 @@ import { useQuasar } from "quasar";
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { genColor15, dateToISO, date2Thai, messageError } = mixin;
|
||||
const {
|
||||
genColor15,
|
||||
dateToISO,
|
||||
date2Thai,
|
||||
messageError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const router = useRouter();
|
||||
|
|
@ -465,7 +472,7 @@ watch(status, (count: String, prevCount: String) => {
|
|||
});
|
||||
|
||||
onMounted(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
await fetchDataCom();
|
||||
});
|
||||
|
||||
|
|
@ -484,7 +491,7 @@ const fetchDataCom = async () => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateOfPeriodExam(status.value, examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -511,12 +518,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchPeriodExam = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.periodExamStatus(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -531,7 +538,7 @@ const fetchPeriodExam = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -540,7 +547,7 @@ const fetchPeriodExam = async () => {
|
|||
*/
|
||||
const fetchDataSummary = async () => {
|
||||
dataNum.value = [];
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.countDashbordPeriodExam(examId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -558,12 +565,12 @@ const fetchDataSummary = async () => {
|
|||
dataNum.value = [];
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const downloadFileDashboard = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(
|
||||
config.API.periodExamDownloadDashboard(examId.value),
|
||||
|
|
@ -587,7 +594,7 @@ const downloadFileDashboard = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ const $q = useQuasar();
|
|||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const store = useDataStore();
|
||||
const { loaderPage } = store;
|
||||
const { date2Thai, messageError } = mixin;
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||
const previous = ref<boolean>(false);
|
||||
const next = ref<boolean>(false);
|
||||
const addDialog = ref<boolean>(false);
|
||||
|
|
@ -870,7 +870,7 @@ const saveEdit = async () => {
|
|||
};
|
||||
|
||||
const saveDataAgency = async (data: DataLink[]) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.cmsAgency, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -883,7 +883,7 @@ const saveDataAgency = async (data: DataLink[]) => {
|
|||
};
|
||||
|
||||
const saveDataGoverment = async (data: DataLink[]) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
|
||||
await http
|
||||
.post(config.API.cmsGoverment, data)
|
||||
|
|
@ -897,7 +897,7 @@ const saveDataGoverment = async (data: DataLink[]) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.cms)
|
||||
.then((res) => {
|
||||
|
|
@ -952,12 +952,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const takeLogo = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("FileData", imageFileLogo.value);
|
||||
await http
|
||||
|
|
@ -974,7 +974,7 @@ const takeLogo = async () => {
|
|||
};
|
||||
|
||||
const takeBanner = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
const formData = new FormData();
|
||||
formData.append("FileData", imageFile.value);
|
||||
await http
|
||||
|
|
@ -999,7 +999,7 @@ const sendDataDetail = async () => {
|
|||
description: web.value.descripstion,
|
||||
shortName: web.value.by,
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.cmsDeatail, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -1026,7 +1026,7 @@ const sendDataAbout = async () => {
|
|||
zipCode: address.value.code,
|
||||
telephone: address.value.tel,
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.cmsAbout, data)
|
||||
.then((res) => {})
|
||||
|
|
@ -1042,7 +1042,7 @@ const sendDataAbout = async () => {
|
|||
};
|
||||
|
||||
const fetchProvince = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
|
|
@ -1057,13 +1057,13 @@ const fetchProvince = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchDistrict = async (id: string | null) => {
|
||||
if (id !== null) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -1078,14 +1078,14 @@ const fetchDistrict = async (id: string | null) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fetchSubDistrict = async (id: string | null) => {
|
||||
if (id !== null) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listSubDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -1104,7 +1104,7 @@ const fetchSubDistrict = async (id: string | null) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue