ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -65,7 +65,7 @@ const dataStore = useDataStore();
|
|||
const { loaderPage } = dataStore;
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||
const { date2Thai, messageError } = mixin;
|
||||
const rows = ref<ResponsePeriodExam[]>([]);
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
|
|
@ -163,12 +163,12 @@ const columns = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
await fetchData();
|
||||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.periodExamType("exam"))
|
||||
.then((res) => {
|
||||
|
|
@ -184,20 +184,24 @@ const fetchData = async () => {
|
|||
yearly: r.year,
|
||||
fee: r.fee,
|
||||
announcementExam: r.announcementExam,
|
||||
dateAnnounce: new Date(r.announcementDate),
|
||||
dateAnnouncement: [
|
||||
new Date(r.announcementStartDate),
|
||||
new Date(r.announcementEndDate),
|
||||
],
|
||||
dateRegister: [
|
||||
new Date(r.registerStartDate),
|
||||
new Date(r.registerEndDate),
|
||||
],
|
||||
dateExam: new Date(r.examDate),
|
||||
datePayment: [
|
||||
new Date(r.paymentStartDate),
|
||||
new Date(r.paymentEndDate),
|
||||
],
|
||||
dateAnnounce:
|
||||
r.announcementDate !== null ? new Date(r.announcementDate) : null,
|
||||
dateAnnouncement:
|
||||
r.announcementStartDate !== null && r.announcementEndDate !== null
|
||||
? [
|
||||
new Date(r.announcementStartDate),
|
||||
new Date(r.announcementEndDate),
|
||||
]
|
||||
: null,
|
||||
dateRegister:
|
||||
r.registerStartDate !== null && r.registerEndDate !== null
|
||||
? [new Date(r.registerStartDate), new Date(r.registerEndDate)]
|
||||
: null,
|
||||
dateExam: r.examDate !== null ? new Date(r.examDate) : null,
|
||||
datePayment:
|
||||
r.paymentStartDate !== null && r.paymentEndDate !== null
|
||||
? [new Date(r.paymentStartDate), new Date(r.paymentEndDate)]
|
||||
: null,
|
||||
organizationName: {
|
||||
id: r.organizationId,
|
||||
name: r.organizationName,
|
||||
|
|
@ -219,7 +223,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue