new loader

This commit is contained in:
Thanit Konmek 2023-06-09 14:25:41 +07:00
parent fd7aae2f5d
commit fe6c712a18
95 changed files with 1189 additions and 950 deletions

View file

@ -247,7 +247,8 @@ const props = defineProps({
const store = useDataStore();
const { loaderPage } = store;
const mixin = useCounterMixin(); //
const { success, dateToISO, date2Thai, messageError } = mixin;
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
mixin;
const $q = useQuasar(); // noti quasar
const modalAdd = ref<boolean>(false); //modal
const modalDelete = ref<boolean>(false); //modal
@ -284,7 +285,7 @@ const dataSixDaysRaw = ref<RequestItemsObject[]>([]);
* เรยกฟงกนทงหมดตอนเรยกใชไฟล
*/
onMounted(async () => {
loaderPage(false);
hideLoader();
const calen = fullCalendar.value.getApi();
const date = new Date(props.dateYear, props.dateMonth);
calen.gotoDate(date);
@ -424,7 +425,7 @@ const onSubmit = async () => {
*/
const fetchData = async () => {
calendarOptions.value.events = [];
loaderPage(true);
showLoader();
await http
.get(
config.API.listHolidayHistoryYearMonth(
@ -577,7 +578,7 @@ const editData = async () => {
});
});
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryEdit(type.value), {
history: _dataHistory.value,
@ -620,7 +621,7 @@ const addDate = async () => {
)
);
} while (new Date(dateStart.value) <= new Date(dateRange.value[1]));
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryAdd(category.value), dataAdd.value)
.then((res) => {
@ -657,7 +658,7 @@ const deleteData = async () => {
new Date(dateStart.value).setDate(new Date(dateStart.value).getDate() + 1)
);
} while (new Date(dateStart.value) <= new Date(dateRange.value[1]));
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryDelete(type.value), dataDelete.value)
.then((res) => {

View file

@ -244,7 +244,15 @@ const props = defineProps({
const store = useDataStore();
const { loaderPage } = store;
const mixin = useCounterMixin(); //
const { success, dateToISO, dateMonth2Thai, weekThai, messageError } = mixin;
const {
success,
dateToISO,
dateMonth2Thai,
weekThai,
messageError,
showLoader,
hideLoader,
} = mixin;
const $q = useQuasar(); // noti quasar
const calendarData = ref<DataDateListsObject[]>([]); //data
const modalAdd = ref<boolean>(false); //modal
@ -329,7 +337,7 @@ const deleteClick = async (val: DataDateListsObject) => {
*/
const fetchData = async () => {
calendarData.value = [];
loaderPage(true);
showLoader();
await http
.get(config.API.listHolidayHistoryYear(props.dateYear))
.then((res) => {
@ -409,7 +417,7 @@ const deleteConfirm = async () => {
} else {
return;
}
loaderPage(true);
showLoader();
await http
.post(
config.API.listHolidayHistoryDelete(currentTab.value),
@ -462,7 +470,7 @@ const editData = async () => {
}
);
}
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryEdit(currentTab.value), {
history: _dataHistory.value,

View file

@ -301,7 +301,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -577,7 +577,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaHistory)
.then((res) => {
@ -620,7 +620,7 @@ const fetchData = async () => {
* รายการลำดบเครองราชฯ
*/
const fetchinsigniaType = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.insigniaType)
.then((res) => {
@ -636,7 +636,7 @@ const fetchinsigniaType = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -644,7 +644,7 @@ const fetchinsigniaType = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaPublishedHistory)
.then((res) => {
@ -676,7 +676,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -685,7 +685,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listInsigniaHistory)
.then((res) => {
@ -705,7 +705,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaPublished)
.then((res) => {
@ -772,7 +772,7 @@ const save = async (publish: boolean) => {
lastUpdateUserId: e.lastUpdateUserId,
insigniaType: e.insigniaType,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listInsigniaHistoryId(idVersion.value), {
id: idVersion.value,
@ -792,7 +792,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaTypeHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaTypePublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listInsigniaTypeHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listInsigniaTypePublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listInsigniaTypeHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationAgencyHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationAgencyPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationAgencyHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationAgencyPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationAgencyHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationFaxHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationFaxPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationFaxHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationFaxPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationFaxHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationGovernmentAgencyHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationGovernmentAgencyPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationGovernmentAgencyHistory)
.then((res) => {
@ -456,7 +456,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationGovernmentAgencyPublished)
.then((res) => {
@ -516,7 +516,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(
config.API.listOrganizationGovernmentAgencyHistoryId(idVersion.value),
@ -539,7 +539,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationLevelHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationLevelPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationLevelHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationLevelPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationLevelHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -214,7 +214,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -402,7 +402,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationOrganizationHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationOrganizationPublishedHistory)
.then((res) => {
@ -466,7 +466,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -475,7 +475,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationOrganizationHistory)
.then((res) => {
@ -495,7 +495,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationOrganizationPublished)
.then((res) => {
@ -556,7 +556,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationOrganizationHistoryId(idVersion.value), {
id: idVersion.value,
@ -576,7 +576,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -255,7 +255,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -491,7 +491,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationShortNameHistory)
.then((res) => {
@ -520,7 +520,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -528,7 +528,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationShortNamePublishedHistory)
.then((res) => {
@ -559,7 +559,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -568,7 +568,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationShortNameHistory)
.then((res) => {
@ -588,7 +588,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationShortNamePublished)
.then((res) => {
@ -654,7 +654,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationShortNameHistoryId(idVersion.value), {
id: idVersion.value,
@ -674,7 +674,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationStatusHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationStatusPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationStatusHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationStatusPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationStatusHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelExternalHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelExternalPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationTelExternalHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelExternalPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationTelExternalHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelInternalHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelInternalPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationTelInternalHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTelInternalPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationTelInternalHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTypeHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTypePublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listOrganizationTypeHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationTypePublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listOrganizationTypeHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -206,7 +206,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -370,7 +370,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listBloodGroupHistory)
.then((res) => {
@ -396,7 +396,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -404,7 +404,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listBloodGroupPublishedHistory)
.then((res) => {
@ -432,7 +432,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -441,7 +441,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listBloodGroupHistory)
.then((res) => {
@ -461,7 +461,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listBloodGroupPublished)
.then((res) => {
@ -521,7 +521,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listBloodGroupHistoryId(idVersion.value), {
id: idVersion.value,
@ -541,7 +541,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -232,7 +232,7 @@ import { useRoute, useRouter } from "vue-router";
import { useDataStore } from "@/stores/data";
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const dataStore = useDataStore();
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
@ -405,7 +405,7 @@ const $q = useQuasar();
*/
const fetchData = async () => {
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listDistrictHistoryId(provinceId.value))
.then((res) => {
@ -432,7 +432,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -440,7 +440,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listDistrictPublishedHistory(provinceId.value))
.then((res) => {
@ -468,7 +468,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -477,7 +477,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listDistrictHistoryId(provinceId.value))
.then((res) => {
@ -497,7 +497,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listProvincePublished)
.then((res) => {
@ -557,7 +557,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listDistrictHistoryId(idVersion.value), {
id: idVersion.value,
@ -578,7 +578,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listEducationLevelHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listEducationLevelPublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listEducationLevelHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listEducationLevelPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listEducationLevelHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listGenderHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listGenderPublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listGenderHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listGenderPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listGenderHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const {
manageData,
@ -381,7 +381,7 @@ const fetchData = async () => {
updateData.value = false;
console.log(result);
// rows.value.splice(0);
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.listPrefixHistory)
// .then((res) => {
@ -407,7 +407,7 @@ const fetchData = async () => {
// })
// .finally(() => {
// updateData.value = false;
// loaderPage(false);
// hideLoader();
// });
};
@ -448,7 +448,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
// loaderPage(true);
// showLoader();
await http
.delete(config.API.listPrefixHistory)
.then((res) => {
@ -468,7 +468,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.listPrefixPublished)
.then((res) => {
@ -528,7 +528,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
// loaderPage(true);
// showLoader();
await http
.post(config.API.listPrefixHistoryId(idVersion.value), {
id: idVersion.value,
@ -548,7 +548,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -215,7 +215,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore; // load api
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -379,7 +379,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listProvinceHistory)
.then((res) => {
@ -405,7 +405,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -413,7 +413,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listProvincePublishedHistory)
.then((res) => {
@ -441,7 +441,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -450,7 +450,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listProvinceHistory)
.then((res) => {
@ -470,7 +470,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listProvincePublished)
.then((res) => {
@ -530,7 +530,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listProvinceHistoryId(idVersion.value), {
id: idVersion.value,
@ -550,7 +550,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listRelationshipHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listRelationshipPublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listRelationshipHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listRelationshipPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listRelationshipHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listReligionHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listReligionPublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listReligionHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listReligionPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listReligionHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -242,7 +242,7 @@ import { useRoute, useRouter } from "vue-router";
import { useDataStore } from "@/stores/data";
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const dataStore = useDataStore();
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
@ -435,7 +435,7 @@ const $q = useQuasar();
*/
const fetchData = async () => {
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(
config.API.listSubDistrictHistoryProvinceId(
@ -468,7 +468,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -476,7 +476,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listSubDistrictPublishedHistory(districtId.value))
.then((res) => {
@ -505,7 +505,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -514,7 +514,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listSubDistrictHistoryId(districtId.value))
.then((res) => {
@ -534,7 +534,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listProvincePublished)
.then((res) => {
@ -597,7 +597,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listSubDistrictHistoryId(idVersion.value), {
id: idVersion.value,
@ -618,7 +618,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutiveHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutivePublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionExecutiveHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutivePublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionExecutiveHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -215,7 +215,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -403,7 +403,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutiveSideHistory)
.then((res) => {
@ -430,7 +430,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutiveSidePublishedHistory)
.then((res) => {
@ -467,7 +467,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -476,7 +476,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionExecutiveSideHistory)
.then((res) => {
@ -496,7 +496,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionExecutiveSidePublished)
.then((res) => {
@ -557,7 +557,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionExecutiveSideHistoryId(idVersion.value), {
id: idVersion.value,
@ -577,7 +577,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -266,7 +266,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -478,7 +478,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLevelHistory)
.then((res) => {
@ -512,7 +512,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -520,7 +520,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLevelPublishedHistory)
.then((res) => {
@ -550,7 +550,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -559,7 +559,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionLevelHistory)
.then((res) => {
@ -579,7 +579,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLevelPublished)
.then((res) => {
@ -643,7 +643,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionLevelHistoryId(idVersion.value), {
id: idVersion.value,
@ -663,7 +663,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLineHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLinePublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionLineHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionLinePublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionLineHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -215,7 +215,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -403,7 +403,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionPathHistory)
.then((res) => {
@ -430,7 +430,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionPathPublishedHistory)
.then((res) => {
@ -467,7 +467,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -476,7 +476,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionPathHistory)
.then((res) => {
@ -496,7 +496,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionPathPublished)
.then((res) => {
@ -557,7 +557,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionPathHistoryId(idVersion.value), {
id: idVersion.value,
@ -577,7 +577,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -215,7 +215,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -403,7 +403,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionSideHistory)
.then((res) => {
@ -430,7 +430,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionSidePublishedHistory)
.then((res) => {
@ -467,7 +467,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -476,7 +476,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionSideHistory)
.then((res) => {
@ -496,7 +496,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionSidePublished)
.then((res) => {
@ -557,7 +557,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionSideHistoryId(idVersion.value), {
id: idVersion.value,
@ -577,7 +577,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionStatusHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionStatusPublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionStatusHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionStatusPublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionStatusHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -203,7 +203,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -367,7 +367,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionTypeHistory)
.then((res) => {
@ -393,7 +393,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -401,7 +401,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionTypePublishedHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -438,7 +438,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionTypeHistory)
.then((res) => {
@ -458,7 +458,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionTypePublished)
.then((res) => {
@ -518,7 +518,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionTypeHistoryId(idVersion.value), {
id: idVersion.value,
@ -538,7 +538,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeGroupHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeGroupPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeeGroupHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeGroupPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionEmployeeGroupHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -365,7 +365,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLevelHistory)
.then((res) => {
@ -391,7 +391,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -399,7 +399,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLevelPublishedHistory)
.then((res) => {
@ -427,7 +427,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -436,7 +436,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeeLevelHistory)
.then((res) => {
@ -456,7 +456,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLevelPublished)
.then((res) => {
@ -516,7 +516,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionEmployeeLevelHistoryId(idVersion.value), {
id: idVersion.value,
@ -536,7 +536,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLineHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLinePublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeeLineHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeLinePublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionEmployeeLineHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -214,7 +214,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -402,7 +402,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionPublishedHistory)
.then((res) => {
@ -466,7 +466,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -475,7 +475,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeePositionHistory)
.then((res) => {
@ -495,7 +495,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionPublished)
.then((res) => {
@ -556,7 +556,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionEmployeePositionHistoryId(idVersion.value), {
id: idVersion.value,
@ -576,7 +576,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -214,7 +214,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -402,7 +402,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionSideHistory)
.then((res) => {
@ -429,7 +429,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionSidePublishedHistory)
.then((res) => {
@ -466,7 +466,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -475,7 +475,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeePositionSideHistory)
.then((res) => {
@ -495,7 +495,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeePositionSidePublished)
.then((res) => {
@ -556,7 +556,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(
config.API.listPositionEmployeePositionSideHistoryId(idVersion.value),
@ -579,7 +579,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -202,7 +202,7 @@ const props = defineProps({
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateText, messageError } = mixin;
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const { manageData, changeManageColumns } = store;
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
@ -366,7 +366,7 @@ const $q = useQuasar();
const fetchData = async () => {
await props.fetchDataComponent();
rows.value.splice(0);
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeStatusHistory)
.then((res) => {
@ -392,7 +392,7 @@ const fetchData = async () => {
})
.finally(() => {
updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -400,7 +400,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeStatusPublishedHistory)
.then((res) => {
@ -428,7 +428,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -437,7 +437,7 @@ const fetchHistory = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.listPositionEmployeeStatusHistory)
.then((res) => {
@ -457,7 +457,7 @@ const clearPublishedData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const publishedData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listPositionEmployeeStatusPublished)
.then((res) => {
@ -517,7 +517,7 @@ const save = async (publish: boolean) => {
lastUpdateFullName: e.lastUpdateFullName,
lastUpdateUserId: e.lastUpdateUserId,
}));
loaderPage(true);
showLoader();
await http
.post(config.API.listPositionEmployeeStatusHistoryId(idVersion.value), {
id: idVersion.value,
@ -537,7 +537,7 @@ const save = async (publish: boolean) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -407,7 +407,7 @@ import { useQuasar } from "quasar";
const $q = useQuasar();
const mixin = useCounterMixin(); //
const { genColor15, messageError } = mixin;
const { genColor15, messageError, showLoader, hideLoader } = mixin;
const store = useManageDataStore();
const dataStore = useDataStore();
const { loaderPage } = dataStore; // load api
@ -598,7 +598,7 @@ const changeList = async (val: number) => {
*/
const fetchDataSummary = async () => {
lists.value = [];
loaderPage(true);
showLoader();
await http
.get(config.API.countDashbordHistory)
.then((res) => {
@ -615,7 +615,7 @@ const fetchDataSummary = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -630,7 +630,7 @@ const fetchDataSummarySubComponent = async () => {
*/
const fetchDataSummarySub = async (val: number) => {
dataNum.value = [];
// loaderPage(true);
// showLoader();
await http
.get(config.API.countDashbordSubHistory(val))
.then((res) => {
@ -648,7 +648,7 @@ const fetchDataSummarySub = async (val: number) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -656,7 +656,7 @@ const fetchDataSummarySub = async (val: number) => {
* สรปวนหย
*/
const fetchDataSummaryCalendar = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.summaryHolidayHistoryYear(yearSum.value))
.then((res) => {
@ -676,7 +676,7 @@ const fetchDataSummaryCalendar = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -365,6 +365,8 @@ const {
date2Thai,
messageError,
dialogMessage,
showLoader,
hideLoader,
} = mixin;
const { loaderPage } = dataStore; //
const store = useManageDataStore();
@ -491,7 +493,7 @@ const onSubmit = async () => {
)
);
} while (new Date(dateStart.value) <= new Date(dateAdd.value[1]));
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayHistoryAdd(category.value), dataAdd.value)
.then((res) => {
@ -503,7 +505,7 @@ const onSubmit = async () => {
})
.finally(() => {
refreshData.value = !refreshData.value;
loaderPage(false);
hideLoader();
});
}
});
@ -528,7 +530,7 @@ const onSubmitCopy = async () => {
);
return;
}
loaderPage(true);
showLoader();
await http
.post(config.API.listHolidayCopy, {
fromYear: dateYearStart.value,

View file

@ -431,7 +431,14 @@ const { loaderPage } = dataStore;
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const { success, modalConfirm, modalError, modalDelete } = mixin;
const {
success,
modalConfirm,
modalError,
modalDelete,
showLoader,
hideLoader,
} = mixin;
const { date2Thai } = mixin;
const store = useOrganizationalDataStore();
const { organizationalData, changeOrganizationalColumns } = store;
@ -809,7 +816,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
});
onMounted(async () => {
loaderPage(false);
hideLoader();
await fetchPosition();
await fetchData();
await fetchHistory();
@ -819,7 +826,7 @@ onMounted(async () => {
* งก get data าส
*/
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.getPostionMasterDraft(true))
.then((res) => {
@ -862,7 +869,7 @@ const fetchData = async () => {
})
.finally(() => {
// updateData.value = false;
loaderPage(false);
hideLoader();
});
};
@ -870,7 +877,7 @@ const fetchData = async () => {
* งชนดอมลประวแกไขขอมลทงหมด
*/
const fetchHistory = async () => {
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.listxxxxxxxxPublishedHistory)
// .then((res) => {
@ -902,7 +909,7 @@ const fetchHistory = async () => {
// statusCode.value = e.response.data.status;
// })
// .finally(async () => {
// loaderPage(false);
// hideLoader();
// });
};
@ -910,7 +917,7 @@ const fetchHistory = async () => {
* get รายการ ตำแหน
*/
const fetchPosition = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.position)
.then((res) => {
@ -1001,7 +1008,7 @@ const fetchPosition = async () => {
})
.catch((e: any) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1150,7 +1157,7 @@ const clickSave = async () => {
*/
const saveData = async () => {
modal.value = false;
loaderPage(true);
showLoader();
await http
.post(config.API.getPositionMaster, {
positionTypeId: positionTypeId.value,
@ -1182,7 +1189,7 @@ const saveData = async () => {
*/
const editData = async () => {
modal.value = false;
loaderPage(true);
showLoader();
await http
.put(config.API.getPositionMasterId(positionMasterId.value), {
positionMasterId: positionMasterId.value,
@ -1215,7 +1222,7 @@ const editData = async () => {
* เมอเรยก api เสรจแลวจะ get data มาใหม
*/
const clearPublishedData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.getPositionMasterSync)
.then((res) => {
@ -1228,7 +1235,7 @@ const clearPublishedData = async () => {
statusCode.value = e.response.data.status;
})
.finally(async () => {
loaderPage(false);
hideLoader();
await fetchHistory();
await fetchData();
});
@ -1240,7 +1247,7 @@ const clearPublishedData = async () => {
*/
const publishedData = async () => {
// editvisible.value = false;
loaderPage(true);
showLoader();
await http
.put(config.API.getPositionMasterPublish)
.then((res) => {
@ -1250,7 +1257,7 @@ const publishedData = async () => {
statusCode.value = e.response.data.status;
})
.finally(async () => {
loaderPage(false);
hideLoader();
await fetchData();
});
};
@ -1344,7 +1351,7 @@ const clickAdd = () => {
* @param row อม row ประวการแกไข
*/
const clickHistory = async (row: RequestItemsObject) => {
loaderPage(true);
showLoader();
await http
.get(config.API.getPositionMasterHistoryId(row.id))
.then((res) => {
@ -1387,7 +1394,7 @@ const clickHistory = async (row: RequestItemsObject) => {
})
.finally(async () => {
modalHistory.value = true;
loaderPage(false);
hideLoader();
});
};
@ -1430,7 +1437,7 @@ const clickIsActive = async (val: string, status: boolean) => {
})
.onOk(async () => {
// edit.value = false;
loaderPage(true);
showLoader();
await http
.delete(config.API.getPositionMasterId(val) + `?Id=${val}`)
.then((res) => {

View file

@ -240,10 +240,14 @@ import { useDataStore } from "@/stores/data";
import http from "@/plugins/http";
import config from "@/app.config";
import type { DataOption } from "../../interface/index/Main";
import { useCounterMixin } from "@/stores/mixin";
const ddNoResultMsg = defineAsyncComponent(
() => import("@/components/DropDownNoResultMsg.vue")
); // Dropdown Filter
const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const $q = useQuasar(); // show dialog
@ -286,12 +290,12 @@ const positionFilter = ref<Array<any>>([]); //for DropDown
const position = ref<Array<any>>([]); //for DropDown
onMounted(async () => {
loaderPage(false);
hideLoader();
await fetchPositionMaster();
});
const fetchPositionMaster = async () => {
loaderPage(true);
showLoader();
await http
// .get(config.API.getPostionMasterDraft(false))
.get(config.API.getPostionMaster(false))
@ -329,7 +333,7 @@ const fetchPositionMaster = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -339,6 +339,8 @@ import type {
} from "../../interface/index/Main";
import { log } from "console";
import { useDataStore } from "@/stores/data";
import { useCounterMixin } from "@/stores/mixin";
// import { organizationSet } from "../interface/index/Main";
const props = defineProps({
@ -348,6 +350,8 @@ const props = defineProps({
const emit = defineEmits(["update:organizprops", "update:formprops"]);
const mixin = useCounterMixin();
const {showLoader, hideLoader } = mixin;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const $q = useQuasar(); // show dialog
@ -386,7 +390,7 @@ const organizationAgencyCode = ref<GovermentOption[]>([]);
const organizationAgencyCodeFilter = ref<GovermentOption[]>([]);
onMounted(async () => {
loaderPage(false);
hideLoader();
await fetchOrganizationOri();
await fetchOrganizationAgencyCode();
await fetchOrganizationGovernmentCode();
@ -405,7 +409,7 @@ onMounted(async () => {
* หนวยงาน
*/
const fetchOrganizationOri = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organization)
.then((res) => {
@ -421,14 +425,14 @@ const fetchOrganizationOri = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* รหสหนวยงาน
*/
const fetchOrganizationAgencyCode = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationCode)
.then((res) => {
@ -450,14 +454,14 @@ const fetchOrganizationAgencyCode = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* รหสสวนราชการ
*/
const fetchOrganizationGovernmentCode = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationShortName)
.then((res) => {
@ -479,14 +483,14 @@ const fetchOrganizationGovernmentCode = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
// /**
// *
// */
// const fetchOrganizationShortName = async () => {
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.organizationShortName)
// .then((res) => {
@ -508,14 +512,14 @@ const fetchOrganizationGovernmentCode = async () => {
// console.log(e);
// })
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
// };
/**
* หนวยงานตนสงก
*/
const fetchOrganizationAgency = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationAgency("หน่วยงาน"))
.then((res) => {
@ -534,14 +538,14 @@ const fetchOrganizationAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* วนราชการตนสงก
*/
const fetchOrganizationGovernmentAgency = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.listOrganizationAgency("ส่วนราชการ"))
.then((res) => {
@ -560,14 +564,14 @@ const fetchOrganizationGovernmentAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* ประเภทหนวยงาน
*/
const fetchOrganizationType = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationType)
.then((res) => {
@ -583,14 +587,14 @@ const fetchOrganizationType = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* ระดบหนวยงาน
*/
const fetchOrganizationLevel = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationLevel)
.then((res) => {
@ -606,14 +610,14 @@ const fetchOrganizationLevel = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรดตอภายใน
*/
const fetchOrganizationTelInternal = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationTelInternal)
.then((res) => {
@ -629,14 +633,14 @@ const fetchOrganizationTelInternal = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรดตอภายนอก
*/
const fetchOrganizationTelExternal = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationTelExternal)
.then((res) => {
@ -652,14 +656,14 @@ const fetchOrganizationTelExternal = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรโทรสาร
*/
const fetchOrganizationFax = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationFax)
.then((res) => {
@ -675,7 +679,7 @@ const fetchOrganizationFax = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -776,7 +780,7 @@ const addOrganizationItem = async () => {
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
let option: GovermentOption[] = [];
loaderPage(true);
showLoader();
await http
.get(config.API.organizationGovernmentCode(val))
.then((res) => {
@ -796,14 +800,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
return option;
};
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
let option: GovermentOption[] = [];
loaderPage(true);
showLoader();
await http
.get(config.API.organizationAgencyCode(val))
.then((res) => {
@ -823,7 +827,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
return option;
};

View file

@ -318,6 +318,7 @@ import { log } from "console";
import { useDataStore } from "@/stores/data";
import type { EnumStringMember } from "@babel/types";
// import { organizationSet } from "../interface/index/Main";
import { useCounterMixin } from "@/stores/mixin";
const props = defineProps({
organizprops: Object as PropType<OrganizaOption>,
@ -328,6 +329,8 @@ const props = defineProps({
},
});
const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const emit = defineEmits(["update:organizprops", "update:formprops"]);
@ -397,7 +400,7 @@ const organization = ref<OrganizaOption>({
emit("update:organizprops", organization.value);
onMounted(async () => {
loaderPage(false);
hideLoader();
// await fillOrgEdit(); // selector(q-select)
await fetchOrganizationOri();
// await fetchOrganizationShortName();
@ -431,7 +434,7 @@ const getClass = (val: boolean) => {
* @param node node that you want to edit data
*/
const fillOrgEdit = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.getOrgDraft(props.org.organizationId))
.then((res) => {
@ -503,7 +506,7 @@ const fillOrgEdit = async () => {
console.log(e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
console.log("success");
};
@ -512,7 +515,7 @@ const fillOrgEdit = async () => {
* หนวยงาน
*/
const fetchOrganizationOri = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organization)
.then((res) => {
@ -528,14 +531,14 @@ const fetchOrganizationOri = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* รหสหนวยงาน
*/
const fetchOrganizationAgencyCode = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationCode)
.then((res) => {
@ -557,14 +560,14 @@ const fetchOrganizationAgencyCode = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* รหสสวนราชการ
*/
const fetchOrganizationGovernmentCode = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationShortName)
.then((res) => {
@ -589,14 +592,14 @@ const fetchOrganizationGovernmentCode = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
// /**
// *
// */
// const fetchOrganizationShortName = async () => {
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.organizationShortName)
// .then((res) => {
@ -618,14 +621,14 @@ const fetchOrganizationGovernmentCode = async () => {
// console.log(e);
// })
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
// };
/**
* หนวยงานตนสงก
*/
const fetchOrganizationAgency = async () => {
loaderPage(true);
showLoader();
await http
// .get(config.API.organizationAgency)
.get(config.API.listOrganizationAgency("หน่วยงาน"))
@ -645,14 +648,14 @@ const fetchOrganizationAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* วนราชการตนสงก
*/
const fetchOrganizationGovernmentAgency = async () => {
loaderPage(true);
showLoader();
await http
// .get(config.API.organizationGovernmentAgency)
.get(config.API.listOrganizationAgency("ส่วนราชการ"))
@ -673,14 +676,14 @@ const fetchOrganizationGovernmentAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* ประเภทหนวยงาน
*/
const fetchOrganizationType = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationType)
.then((res) => {
@ -696,7 +699,7 @@ const fetchOrganizationType = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -704,7 +707,7 @@ const fetchOrganizationType = async () => {
* สถานะหนวยงาน
*/
const fetchOrganizationStatus = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationStatus)
.then((res) => {
@ -720,7 +723,7 @@ const fetchOrganizationStatus = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -728,7 +731,7 @@ const fetchOrganizationStatus = async () => {
* ระดบหนวยงาน
*/
const fetchOrganizationLevel = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationLevel)
.then((res) => {
@ -744,14 +747,14 @@ const fetchOrganizationLevel = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรดตอภายใน
*/
const fetchOrganizationTelInternal = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationTelInternal)
.then((res) => {
@ -767,14 +770,14 @@ const fetchOrganizationTelInternal = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรดตอภายนอก
*/
const fetchOrganizationTelExternal = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationTelExternal)
.then((res) => {
@ -790,14 +793,14 @@ const fetchOrganizationTelExternal = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
/**
* เบอรโทรสาร
*/
const fetchOrganizationFax = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationFax)
.then((res) => {
@ -813,13 +816,13 @@ const fetchOrganizationFax = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
let option: GovermentOption[] = [];
loaderPage(true);
showLoader();
await http
.get(config.API.organizationGovernmentCode(val))
.then((res) => {
@ -839,14 +842,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
return option;
};
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
let option: GovermentOption[] = [];
loaderPage(true);
showLoader();
await http
.get(config.API.organizationAgencyCode(val))
.then((res) => {
@ -866,7 +869,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
return option;
};

View file

@ -146,7 +146,7 @@ const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const router = useRouter();
const route = useRoute();
const { date2Thai, success, dateToISO } = mixin;
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
const govermentOP = ref<DataOption[]>([]);
const govermentOPfilter = ref<DataOption[]>([]);
@ -166,7 +166,7 @@ const clickAccount3 = async () => {
};
const fetchOrganizationAgency = async () => {
loaderPage(true);
showLoader();
await http
// .get(config.API.organizationAgency)
.get(config.API.getOCType)
@ -186,12 +186,12 @@ const fetchOrganizationAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
onMounted(async () => {
loaderPage(false);
hideLoader();
await fetchOrganizationAgency();
});
</script>

View file

@ -706,7 +706,7 @@ const store = useDataStore();
const mixin = useCounterMixin();
const { loaderPage } = store; // load windows api
const { success, messageError, dialogMessage } = mixin;
const { success, messageError, dialogMessage, showLoader, hideLoader } = mixin;
//Notification Component Variable
const $q = useQuasar(); // show dialog
@ -868,12 +868,12 @@ const loadFileServer = async (node: any) => {
manageApiErrorMsg(e);
})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
const isTreeHasDraft = async () => {
// loaderPage(true);
// showLoader();
let orgHasDraft = false;
let orgPoHasDraft = false;
await http
@ -889,7 +889,7 @@ const isTreeHasDraft = async () => {
messageError($q, e);
})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
await http
@ -905,7 +905,7 @@ const isTreeHasDraft = async () => {
messageError($q, e);
})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
if (orgHasDraft || orgPoHasDraft) {
@ -920,7 +920,7 @@ const isTreeHasDraft = async () => {
*/
const fetchTreeRoot = async (isDraft: boolean) => {
// console.log(isDraft);
loaderPage(true);
showLoader();
console.log("Call API14 GetTreeRoot");
isShowEditTree.value = isDraft; // to show same tree that we fetch
let request = "";
@ -947,7 +947,7 @@ const fetchTreeRoot = async (isDraft: boolean) => {
// messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
// if (isDraft) {
// node root on first load
// .then error tree render
@ -964,7 +964,7 @@ const fetchTreeRoot = async (isDraft: boolean) => {
const fetchChildrenByParentId = async (node: any) => {
// console.log(isDraft);
console.log("Call API4");
loaderPage(true);
showLoader();
let request = "";
if (isShowEditTree.value) {
request = config.API.getDraftTreeNode(node.organizationId, node.keyId);
@ -984,7 +984,7 @@ const fetchChildrenByParentId = async (node: any) => {
manageApiErrorMsg(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1000,7 +1000,7 @@ const onLazyLoad = (node: any) => {
*/
console.log("Call LazyLoad");
await fetchChildrenByParentId(node.node);
/** loaderPage(true);
/** showLoader();
let request = "";
if (isShowEditTree.value) {
request = config.API.getDraftTreeNode(
@ -1037,7 +1037,7 @@ const onLazyLoad = (node: any) => {
// messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});*/
node.done(node.node.children); //return q-tree generate children
@ -1092,7 +1092,7 @@ const apiDeleteOrg = () => {
// console.log("isShowEditTree", isShowEditTree.value);
setTimeout(async () => {
//delay for lazyLoad to be able to tricker again
loaderPage(true);
showLoader();
isShowEditTree.value = true;
await http
.delete(config.API.delTreeOrgDraft(delStructureId.value))
@ -1111,7 +1111,7 @@ const apiDeleteOrg = () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
await isTreeHasDraft();
});
}, 20);
@ -1140,7 +1140,7 @@ const apiDeletePosition = () => {
isShowEditTree.value = false;
setTimeout(async () => {
//delay for lazyLoad to be able to tricker again
loaderPage(true);
showLoader();
isShowEditTree.value = true;
await http
.delete(config.API.delTreePositionDraft(delStructureId.value))
@ -1157,7 +1157,7 @@ const apiDeletePosition = () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
await isTreeHasDraft();
});
}, 20);
@ -1170,7 +1170,7 @@ const apiDeletePosition = () => {
* งก clear data แบบราง
*/
const deleteDraft = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.delTreeOrgPoDraft)
.then((res) => {
@ -1182,7 +1182,7 @@ const deleteDraft = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
router.go(0);
await isTreeHasDraft();
});
@ -1192,7 +1192,7 @@ const deleteDraft = async () => {
* งกนเผยแพรแบบราง
*/
const publishDraft = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.publishOrgPoDraft)
.then((res) => {
@ -1218,7 +1218,7 @@ const publishDraft = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
await isTreeHasDraft();
});
};
@ -1317,7 +1317,7 @@ const addStructure = async (node: any) => {
});
// console.log(node.organizationId);
console.log("Call API1");
loaderPage(true);
showLoader();
isShowEditTree.value = true; // editTree & trigger lazyLoad setExpanded
await http
.post(config.API.addTreeDraft, {
@ -1338,7 +1338,7 @@ const addStructure = async (node: any) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
popupAddOrganization.value = false;
await isTreeHasDraft();
@ -1370,7 +1370,7 @@ const editOrgStructure = async (node: any) => {
if (organizCheck == true) {
// console.log(node.organizationId);
console.log("Call API13");
loaderPage(true);
showLoader();
isShowEditTree.value = true; //end prepare for tricker LazyLoad
await http
.put(config.API.editTreeOrgDraft(node.organizationId), {
@ -1409,7 +1409,7 @@ const editOrgStructure = async (node: any) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
popupEditSelectedOrganization.value = false;
await isTreeHasDraft();
});
@ -1435,7 +1435,7 @@ const editPositionStructure = async (node: any) => {
if (positionCheck == true) {
console.log("Call API3");
loaderPage(true);
showLoader();
isShowEditTree.value = true; //end prepare for tricker LazyLoad
await http
.put(config.API.editTreePositionDraft(node.organizationPositionId), {
@ -1457,7 +1457,7 @@ const editPositionStructure = async (node: any) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
popupEditSelectedPosition.value = false;
await isTreeHasDraft();
});
@ -1473,7 +1473,7 @@ const clickHistory = async () => {
modalHistory.value = true;
// rowsHistory.value = rawHistory.value.filter((f: any) => f.id == row.id);
loaderPage(true);
showLoader();
await http
.get(config.API.getTreeHistory)
.then((res) => {
@ -1499,7 +1499,7 @@ const clickHistory = async () => {
// messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -10,7 +10,13 @@
class="shadow-2 rounded-borders page-relative"
style="height: 80vh"
>
<q-drawer v-model="isDrawer" class="bg-grey-1" :width="220" :breakpoint="400" bordered>
<q-drawer
v-model="isDrawer"
class="bg-grey-1"
:width="220"
:breakpoint="400"
bordered
>
<q-btn
size="13px"
class="btn-absolute btnShadow"
@ -114,7 +120,8 @@ const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const router = useRouter();
const route = useRoute();
const { date2Thai, success, dateToISO, modalError } = mixin;
const { date2Thai, success, dateToISO, modalError, showLoader, hideLoader } =
mixin;
const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([]);
@ -462,7 +469,7 @@ onMounted(async () => {
});
const nodeTree = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res: any) => {
@ -481,7 +488,7 @@ const nodeTree = async () => {
})
.catch((e: any) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -495,7 +502,7 @@ const clickTree = () => {
};
const onHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.report2HistoryId(selected.value))
.then((res) => {
@ -518,13 +525,13 @@ const onHistory = async () => {
);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
const doSearch = async () => {
// type
loaderPage(true);
showLoader();
await http
.get(config.API.report2TreeId(selected.value))
.then((res) => {
@ -554,7 +561,7 @@ const doSearch = async () => {
})
.catch((e) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -570,7 +577,7 @@ const onConfirm = async () => {
ok: "ยืนยัน",
persistent: true,
}).onOk(async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.report2DoneId(selected.value))
.then((res) => {
@ -578,7 +585,7 @@ const onConfirm = async () => {
})
.catch((e) => {})
.finally(async () => {
loaderPage(false);
hideLoader();
await doSearch();
});
});

View file

@ -591,7 +591,7 @@ const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const router = useRouter();
const route = useRoute();
const { date2Thai, success, dateToISO } = mixin;
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
const id = ref<string>("");
const myForm = ref<QForm | null>(null); //form data input
@ -669,10 +669,10 @@ const sideWorkOPfilter = ref<DataOption[]>([]);
const levelOPfilter = ref<DataOption[]>([]);
onMounted(async () => {
loaderPage(false);
hideLoader();
if (route.params.id != undefined) {
id.value = route.params.id.toString();
loaderPage(true);
showLoader();
await fetchGoverment();
// await fetchAgency();
@ -685,12 +685,12 @@ onMounted(async () => {
await fetchLevel();
await fetchData();
loaderPage(false);
hideLoader();
}
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.report2Id(id.value))
.then(async (res) => {
@ -723,7 +723,7 @@ const fetchData = async () => {
})
.catch((e) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -739,7 +739,7 @@ const checkSave = async () => {
const saveData = async () => {
// console.log(myData.value);
loaderPage(true);
showLoader();
const body: RequestReport2 = {
organizationShortNameId: myData.value.goverment2,
organizationOrganizationId: myData.value.agency2,
@ -760,7 +760,7 @@ const saveData = async () => {
})
.catch((e) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -770,7 +770,7 @@ const clickBack = () => {
//
const fetchGoverment = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.organizationShortName)
.then((res) => {
@ -796,12 +796,12 @@ const fetchGoverment = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
const updateGoverment = async (id: string) => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.getPositionMasterPositionNumberId(id))
.then((res) => {
@ -890,13 +890,13 @@ const updateGoverment = async (id: string) => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
// //
const fetchPositionNum = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.getPositionMasterPositionNumber)
.then((res) => {
@ -910,13 +910,13 @@ const fetchPositionNum = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
//
const fetchCategory = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionType)
.then((res) => {
@ -930,13 +930,13 @@ const fetchCategory = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
//
const fetchPositionManage = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionExecutive)
.then((res) => {
@ -950,13 +950,13 @@ const fetchPositionManage = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
//
const fetchSideManage = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionExecutiveSide)
.then((res) => {
@ -970,13 +970,13 @@ const fetchSideManage = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
//
const fetchPositionWork = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionPath)
.then((res) => {
@ -990,13 +990,13 @@ const fetchPositionWork = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
///
const fetchSideWork = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionSide)
.then((res) => {
@ -1010,13 +1010,13 @@ const fetchSideWork = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};
//
const fetchLevel = async () => {
// loaderPage(true);
// showLoader();
await http
.get(config.API.positionLevel)
.then((res) => {
@ -1030,7 +1030,7 @@ const fetchLevel = async () => {
})
.catch((e) => {})
.finally(() => {
// loaderPage(false);
// hideLoader();
});
};

View file

@ -351,7 +351,7 @@ const router = useRouter();
const route = useRoute();
const { loaderPage } = dataStore;
const { date2Thai, success, dateToISO } = mixin;
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
const id = ref<string>("");
const previous = ref<boolean>(false);
const next = ref<boolean>(false);
@ -360,7 +360,7 @@ const historyHead = ref<ResponseHistoryHead[]>([]);
const historyData = ref<ResponseHistory[]>([]);
onMounted(async () => {
loaderPage(false);
hideLoader();
if (route.params.id != undefined) {
id.value = route.params.id.toString();
@ -386,7 +386,7 @@ const clickPreviousNext = async (page: string) => {
};
const fetchHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.report2HistoryId(id.value))
.then((res) => {
@ -402,7 +402,7 @@ const fetchHistory = async () => {
})
.catch((e) => {})
.finally(async () => {
loaderPage(false);
hideLoader();
if (historyHead.value.length > 1) {
next.value = true;
previous.value = false;
@ -414,7 +414,7 @@ const fetchHistory = async () => {
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(
config.API.report2HistoryDetailId(
@ -455,7 +455,7 @@ const fetchData = async () => {
})
.catch((e) => {})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
</script>

View file

@ -109,7 +109,7 @@ const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const router = useRouter();
const route = useRoute();
const { date2Thai, success, dateToISO } = mixin;
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
const govermentOP = ref<DataOption[]>([]);
const govermentOPfilter = ref<DataOption[]>([]);
@ -117,7 +117,7 @@ const goverment = ref<string>("");
const tab = ref<string>("audit1");
const fetchOrganizationAgency = async () => {
loaderPage(true);
showLoader();
await http
// .get(config.API.organizationAgency)
.get(config.API.listOrganizationAgency("หน่วยงาน"))
@ -137,12 +137,12 @@ const fetchOrganizationAgency = async () => {
console.log(e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
onMounted(async () => {
loaderPage(false);
hideLoader();
await fetchOrganizationAgency();
});
</script>

View file

@ -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();
});
};

View file

@ -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,

View file

@ -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();

View file

@ -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,

View file

@ -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>

View file

@ -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();
});
};

View file

@ -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();
});
};

View file

@ -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();
});
};

View file

@ -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>

View file

@ -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();
});
};

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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();
});
};

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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();

View file

@ -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();
});
}
});

View file

@ -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();
});
};

View file

@ -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}`);
});

View file

@ -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();
});
};

View file

@ -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,

View file

@ -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();
});
};

View file

@ -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();
});
}
};

View file

@ -216,7 +216,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const name = ref<string>();
@ -352,7 +353,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAssessmentId(profileId.value))
.then((res) => {
@ -373,7 +374,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -459,7 +460,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileAssessmentId(profileId.value), {
id: id.value,
@ -483,7 +484,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileAssessmentId(id.value), {
id: id.value,
@ -515,7 +516,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileAssessmentId(id.value))
.then((res) => {
@ -622,7 +623,7 @@ const clickEditRow = () => {
const clickHistory = async (row: RequestItemsObject) => {
tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ";
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileAssessmentHisId(row.id))
.then((res) => {
@ -643,7 +644,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -224,7 +224,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const issuer = ref<string>();
@ -360,7 +361,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileHonorId(profileId.value))
.then((res) => {
@ -381,7 +382,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -467,7 +468,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileHonorId(profileId.value), {
id: id.value,
@ -491,7 +492,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileHonorId(id.value), {
id: id.value,
@ -523,7 +524,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileHonorId(id.value))
.then((res) => {
@ -633,7 +634,7 @@ const clickHistory = async (row: RequestItemsObject) => {
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
: "ประวัติแก้ไขประกาศเกียรติคุณ";
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileHonorHisId(row.id))
.then((res) => {
@ -654,7 +655,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -293,7 +293,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const level = ref<string>();
@ -545,7 +546,7 @@ const filterSelector = (val: string, update: Function, refData: string) => {
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileDisId(profileId.value))
.then((res) => {
@ -568,7 +569,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -656,7 +657,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileDisId(profileId.value), {
id: id.value,
@ -682,7 +683,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileDisId(id.value), {
id: id.value,
@ -716,7 +717,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileDisId(id.value))
.then((res) => {
@ -826,7 +827,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileDisHisId(row.id))
.then((res) => {
@ -849,7 +850,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -161,7 +161,7 @@ const { loaderPage } = dataStore;
const $q = useQuasar(); // show dialog
const mixin = useCounterMixin();
const route = useRoute();
const { success, messageError } = mixin;
const { success, messageError, showLoader, hideLoader } = mixin;
const profileId = ref<string>(route.params.id.toString());
const edit = ref<boolean>(false);
const uploader = ref<any>();
@ -174,7 +174,7 @@ onMounted(async () => {
});
const getData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profilePaperId(profileId.value))
.then((res) => {
@ -185,12 +185,12 @@ const getData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const deleteData = async (id: string) => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profilePaperId(id))
.then((res) => {
@ -212,7 +212,7 @@ const uploadData = async () => {
});
const formData = new FormData();
formData.append("", newFile);
loaderPage(true);
showLoader();
await http
.post(config.API.profilePaperId(profileId.value), formData)
.then((res) => {

View file

@ -466,7 +466,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { success, dateToISO, date2Thai, messageError } = mixin;
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const levelId = ref<string>();
@ -896,7 +897,7 @@ onMounted(async () => {
});
const fetchLevel = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.educationLevel)
.then((res) => {
@ -912,12 +913,12 @@ const fetchLevel = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchPositionPath = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.positionPath)
.then((res) => {
@ -933,7 +934,7 @@ const fetchPositionPath = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -960,7 +961,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileEduId(profileId.value))
.then((res) => {
@ -994,7 +995,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1097,7 +1098,7 @@ const saveData = async () => {
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
// (r: any) => r.id == positionPathId.value
// );
loaderPage(true);
showLoader();
await http
.post(config.API.profileEduId(profileId.value), {
id: id.value,
@ -1139,7 +1140,7 @@ const editData = async () => {
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
// (r: any) => r.id == positionPathId.value
// );
loaderPage(true);
showLoader();
await http
.put(config.API.profileEduId(id.value), {
id: id.value,
@ -1183,7 +1184,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileEduId(id.value))
.then((res) => {
@ -1311,7 +1312,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileEduHisId(row.id))
.then((res) => {
@ -1345,7 +1346,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -323,7 +323,7 @@ const $q = useQuasar();
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, messageError } = mixin;
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
const edit = ref<boolean>(false);
const addressData = ref<Address>(defaultAddress);
const myform = ref<any>();
@ -561,7 +561,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
*/
const clickHistory = async () => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileAdrsHisId(route.params.id.toString()))
.then((res) => {
@ -589,7 +589,7 @@ const clickHistory = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -610,7 +610,7 @@ const getNewData = async () => {
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAdrsId(route.params.id.toString()))
.then((res) => {
@ -629,7 +629,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -661,7 +661,7 @@ const editData = async () => {
createdAt: new Date(),
createdFullName: "-",
};
loaderPage(true);
showLoader();
await http
.put(config.API.profileAdrsId(route.params.id.toString()), body)
.then((res) => {
@ -731,7 +731,7 @@ const selectSubDistrict = (e: string | null, name: string) => {
};
const fetchProvince = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.province)
.then((res) => {
@ -747,13 +747,13 @@ const fetchProvince = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchDistrict = async (id: string | null, position: string) => {
if (id != null) {
loaderPage(true);
showLoader();
await http
.get(config.API.listDistrict(id))
.then((res) => {
@ -774,14 +774,14 @@ const fetchDistrict = async (id: string | null, position: string) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};
const fetchSubDistrict = async (id: string | null, position: string) => {
if (id != null) {
loaderPage(true);
showLoader();
await http
.get(config.API.listSubDistrict(id))
.then((res) => {
@ -806,7 +806,7 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};

View file

@ -293,7 +293,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const certificateNo = ref<string>();
@ -484,7 +485,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileCertId(profileId.value))
.then((res) => {
@ -507,7 +508,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -595,7 +596,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileCertId(profileId.value), {
id: id.value,
@ -621,7 +622,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileCertId(id.value), {
id: id.value,
@ -655,7 +656,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileCertId(id.value))
.then((res) => {
@ -769,7 +770,7 @@ const clickHistory = async (row: RequestItemsObject) => {
? "ประวัติแก้ไขใบอนุญาตของลูกจ้าง"
: "ประวัติแก้ไขใบอนุญาตประกอบอาชีพ";
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileCertHisId(row.id))
.then((res) => {
@ -792,7 +793,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -792,7 +792,7 @@ const $q = useQuasar();
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, messageError } = mixin;
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
const edit = ref<boolean>(false);
const fix = ref<boolean>(true);
const myform = ref<QForm | null>(null);
@ -857,7 +857,7 @@ const refreshData = async () => {
};
const fetchPrefix = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.prefix)
.then((res) => {
@ -873,7 +873,7 @@ const fetchPrefix = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -901,7 +901,7 @@ const deleteChildren = (items: childrenFamily) => {
const fetchHistory = async () => {
familyDataHistory.value = [];
loaderPage(true);
showLoader();
await http
.get(config.API.profileFamiHisId(route.params.id.toString()))
.then((res) => {
@ -933,7 +933,7 @@ const fetchHistory = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
if (familyDataHistory.value.length == 0) {
// modalError(
// $q,
@ -955,7 +955,7 @@ const fetchHistory = async () => {
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileFamiId(route.params.id.toString()))
.then((res) => {
@ -1000,12 +1000,12 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
const editData = async () => {
loaderPage(true);
showLoader();
const body: ResponseObject = {
couple: familyData.value.same == "1",
couplePrefixId: familyData.value.prefixIdC,

View file

@ -319,7 +319,8 @@ const $q = useQuasar();
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const profileStore = useProfileDataStore();
const { birthDate, retireText } = storeToRefs(profileStore);
const edit = ref<boolean>(false);
@ -540,7 +541,7 @@ watch(retireText, async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileGovId(route.params.id.toString()))
.then((res) => {
@ -564,7 +565,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -574,7 +575,7 @@ const refreshData = async () => {
};
const editData = async () => {
loaderPage(true);
showLoader();
const body: ResponseObject = {
oc: govermentData.value.ocId,
business: govermentData.value.businessId,
@ -623,7 +624,7 @@ const handleDate = async (modelData: Date) => {
};
const fetchCalAgeGov = async (date: Date) => {
loaderPage(true);
showLoader();
const body = {
dateAppoint: date,
};
@ -637,7 +638,7 @@ const fetchCalAgeGov = async (date: Date) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
hideLoader();
});
};
@ -646,7 +647,7 @@ const fetchCalAgeGov = async (date: Date) => {
*/
const clickHistory = async () => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileGovHisId(route.params.id.toString()))
.then((res) => {
@ -677,7 +678,7 @@ const clickHistory = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -417,7 +417,15 @@ const emit = defineEmits(["update:statusEdit"]);
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError, modalError } = mixin;
const {
date2Thai,
success,
dateToISO,
messageError,
modalError,
showLoader,
hideLoader,
} = mixin;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const profileStore = useProfileDataStore();
@ -674,7 +682,7 @@ const onCancel = async () => {
* get รายการ อมลเกยวกบบคคล
*/
const fetchPerson = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.person)
.then((res) => {
@ -731,7 +739,7 @@ const fetchPerson = async () => {
})
.catch((e: any) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -740,7 +748,7 @@ const fetchPerson = async () => {
*/
const clickHistory = async () => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileInforHisId(route.params.id.toString()))
.then((res) => {
@ -781,7 +789,7 @@ const clickHistory = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -851,7 +859,7 @@ const calRetire = async (birth: Date) => {
const body = {
birthDate: dateToISO(birth),
};
loaderPage(true);
showLoader();
await http
.post(config.API.profileCalRetire, body)
.then((res: any) => {
@ -867,12 +875,12 @@ const calRetire = async (birth: Date) => {
changeRetireText(date2Thai(retire));
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileInforId(route.params.id.toString()))
.then(async (res: any) => {
@ -904,7 +912,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -933,7 +941,7 @@ const editData = async () => {
profileType: informaData.value.profileType,
createdFullName: "-",
};
loaderPage(true);
showLoader();
await http
.put(config.API.profileInforId(route.params.id.toString()), body)
.then((res) => {

View file

@ -19,7 +19,8 @@ import Address from "@/modules/04_registry/components/Information/Address.vue";
import Family from "@/modules/04_registry/components/Information/Family.vue";
import Certicate from "@/modules/04_registry/components/Information/Certicate.vue";
// import NotifyError from "@/components/NotifyError.vue";
import { useDataStore } from "@/stores/data";
import { useCounterMixin } from "@/stores/mixin";
const props = defineProps({
statusEdit: {
@ -33,8 +34,8 @@ const props = defineProps({
});
const emit = defineEmits(["update:statusEdit"]);
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin;
const statusEdit = ref<boolean>(false);
const modalNoEdit = ref<boolean>(false);
const modalNoEditTittle = ref<string>("ไม่สามารถไม่สามารถแก้ไขข้อมูลได้?");
@ -49,7 +50,7 @@ watch(props, (count: any, prevCount: any) => {
});
onMounted(() => {
loaderPage(false);
hideLoader();
});
const notiNoEdit = () => {

View file

@ -420,7 +420,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const insigniaId = ref<string>("");
@ -790,7 +791,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
};
const fetchInsignia = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.insignia)
.then((res) => {
@ -811,12 +812,12 @@ const fetchInsignia = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileInsignId(profileId.value))
.then((res) => {
@ -846,7 +847,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -940,7 +941,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileInsignId(profileId.value), {
id: id.value,
@ -972,7 +973,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileInsignId(id.value), {
id: id.value,
@ -1012,7 +1013,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileInsignId(id.value))
.then((res) => {
@ -1134,7 +1135,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileInsignHisId(row.id))
.then((res) => {
@ -1164,7 +1165,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -383,7 +383,7 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, messageError } = mixin;
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
const route = useRoute();
const id = ref<string>("");
const year = ref<number>(0);
@ -748,7 +748,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileLeaveId(profileId.value))
.then((res) => {
@ -778,7 +778,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -873,7 +873,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileLeaveId(profileId.value), {
id: id.value,
@ -906,7 +906,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileLeaveId(id.value), {
id: id.value,
@ -947,7 +947,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileLeaveId(id.value))
.then((res) => {
@ -1072,7 +1072,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileLeaveHisId(row.id))
.then((res) => {
@ -1102,7 +1102,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -194,7 +194,7 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, messageError } = mixin;
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
const route = useRoute();
const id = ref<string>("");
const date = ref<Date>(new Date());
@ -302,7 +302,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileOtherId(profileId.value))
.then((res) => {
@ -322,7 +322,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -407,7 +407,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileOtherId(profileId.value), {
id: id.value,
@ -430,7 +430,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileOtherId(id.value), {
id: id.value,
@ -461,7 +461,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileOtherId(id.value))
.then((res) => {
@ -565,7 +565,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileOtherHisId(row.id))
.then((res) => {
@ -585,7 +585,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -2,7 +2,10 @@
<div class="col-12 row">
<div class="row col-12" style="padding-top: 80px">
<div id="information" name="1" class="row col-12 information">
<Informationvue v-model:statusEdit="statusEdit" :profileType="profileType" />
<Informationvue
v-model:statusEdit="statusEdit"
:profileType="profileType"
/>
</div>
<div id="certicate" name="15" class="row col-12 q-mt-md">
<Certicate v-model:statusEdit="statusEdit" :profileType="profileType" />
@ -20,7 +23,10 @@
<CoinedVue v-model:statusEdit="statusEdit" :profileType="profileType" />
</div>
<div id="assessment" name="6" class="row col-12 q-mt-md">
<AssessmentVue v-model:statusEdit="statusEdit" :profileType="profileType" />
<AssessmentVue
v-model:statusEdit="statusEdit"
:profileType="profileType"
/>
</div>
<div id="position" name="7" class="row col-12 q-mt-md">
<SalaryVue v-model:statusEdit="statusEdit" />
@ -53,7 +59,9 @@
class="bg-grey-2 text-white"
style="z-index: 99; padding: 0% 1% 0% 1%"
>
<div class="row col-12 q-gutter-sm q-pb-sm text-dark no-wrap items-center">
<div
class="row col-12 q-gutter-sm q-pb-sm text-dark no-wrap items-center"
>
<q-btn
flat
round
@ -64,7 +72,12 @@
@click="router.go(-1)"
>
</q-btn>
<q-avatar v-if="imageUrl == null" size="65px" rounded class="containerimage">
<q-avatar
v-if="imageUrl == null"
size="65px"
rounded
class="containerimage"
>
<img
src="@/assets/avatar_user.jpg"
class="bg-grey-3"
@ -108,7 +121,9 @@
</q-avatar>
<div class="row items-center text-dark q-ml-md">
<div class="column">
<div class="text-bold q-pb-xs text-name">{{ fullname }}{{ leaveReason }}</div>
<div class="text-bold q-pb-xs text-name">
{{ fullname }}{{ leaveReason }}
</div>
<div>{{ position }}</div>
</div>
</div>
@ -118,9 +133,13 @@
flat
:color="reasonStatus ? 'primary' : 'pink-5'"
@click="clickRetire()"
:icon="reasonStatus ? 'mdi-home-import-outline' : 'mdi-home-export-outline'"
:icon="
reasonStatus ? 'mdi-home-import-outline' : 'mdi-home-export-outline'
"
>
<q-tooltip>{{ reasonStatus ? "กลับเข้าราชการ" : "ออกราชการ" }}</q-tooltip>
<q-tooltip>{{
reasonStatus ? "กลับเข้าราชการ" : "ออกราชการ"
}}</q-tooltip>
</q-btn>
<q-btn icon="mdi-file-eye-outline" round color="primary" flat>
@ -131,7 +150,9 @@
<q-item-section class="text-blue">..7/..1</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="clickKp7Short()">
<q-item-section class="text-primary">ประวแบบย</q-item-section>
<q-item-section class="text-primary"
>ประวแบบย</q-item-section
>
</q-item>
</q-list>
</q-menu>
@ -233,9 +254,18 @@
<strong>ปโหลดรปภาพ</strong>
</div>
</div>
<div v-for="n in images" :key="n" class="col-3" @click="imageActive(n)">
<div
v-for="n in images"
:key="n"
class="col-3"
@click="imageActive(n)"
>
<div :class="getClass(n)">
<q-img v-if="n.avatar != null" :src="n.avatar" :class="imageClass(n)">
<q-img
v-if="n.avatar != null"
:src="n.avatar"
:class="imageClass(n)"
>
<!-- <div
class="absolute-top bg-transparent cursor-pointer text-right"
style="padding: 5px"
@ -311,7 +341,9 @@
<q-separator />
<q-card-section class="q-p-sm">
<div class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs">
<div
class="row col-12 items-center q-col-gutter-x-xs q-col-gutter-y-xs"
>
<div class="col-xs-6 col-sm-6 col-md-6">
<q-select
class="full-width inputgreen cursor-pointer"
@ -373,7 +405,10 @@
lazy-rules
autogrow
v-model="leaveDetail"
:rules="[(val) => !!val || `${'กรุณากรอกสาเหตุ/เหตุผลของการพ้นจากราชการ'}`]"
:rules="[
(val) =>
!!val || `${'กรุณากรอกสาเหตุ/เหตุผลของการพ้นจากราชการ'}`,
]"
hide-bottom-space
:label="`${'สาเหตุ/เหตุผลของการพ้นจากราชการ'}`"
/>
@ -431,7 +466,13 @@
</q-card-section>
<q-separator />
<q-card-actions align="right">
<q-btn flat round color="public" @click="Retire" icon="mdi-content-save-outline">
<q-btn
flat
round
color="public"
@click="Retire"
icon="mdi-content-save-outline"
>
<q-tooltip>นท</q-tooltip>
</q-btn>
</q-card-actions>
@ -468,7 +509,15 @@ const $q = useQuasar();
const store = useDataStore();
const { changeTab, loaderPage } = store;
const mixin = useCounterMixin();
const { date2Thai, dateToISO, modalConfirm, messageError, dialogMessage } = mixin;
const {
date2Thai,
dateToISO,
modalConfirm,
messageError,
dialogMessage,
showLoader,
hideLoader,
} = mixin;
const route = useRoute();
const router = useRouter();
const imageUrl = ref<any>(null);
@ -544,7 +593,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAvatarId(profileId.value))
.then((res) => {
@ -568,12 +617,12 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const checkProfileData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileCheckId(profileId.value))
.then((res) => {
@ -584,12 +633,12 @@ const checkProfileData = async () => {
router.push("/registry");
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchAvatarHistory = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAvatarHistoryId(profileId.value))
.then((res) => {
@ -608,7 +657,7 @@ const fetchAvatarHistory = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -617,7 +666,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) => {})
@ -644,7 +693,7 @@ const deletePhoto = async (id: string) => {
// undefined,
// false
// );
loaderPage(true);
showLoader();
await http
.delete(config.API.profileAvatarHistoryId(id))
.then((res) => {})
@ -672,7 +721,7 @@ const selectAvatarHistory = async () => {
);
return;
}
loaderPage(true);
showLoader();
await http
.put(config.API.profileAvatarId(profileId.value), {
avatar: activeImage.value.avatarId,
@ -740,7 +789,7 @@ const downloadKP7Short = () => {};
const clickKp7 = async () => {
window.open(config.API.profileReportId(profileId.value));
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.profileReportId(profileId.value))
// .then((res) => {
@ -753,7 +802,7 @@ const clickKp7 = async () => {
// })
// .catch((e) => {messageError($q, e);})
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
};
@ -772,7 +821,7 @@ const downloadFilePDF = async (res: string, fileName: string) => {
const clickKp7Short = async () => {
window.open(config.API.profileKp7ShortId(profileId.value));
// loaderPage(true);
// showLoader();
// await http
// .get(config.API.profileKp7ShortId(profileId.value))
// .then((res) => {
@ -785,7 +834,7 @@ const clickKp7Short = async () => {
// })
// .catch((e) => {messageError($q, e);})
// .finally(() => {
// loaderPage(false);
// hideLoader();
// });
};
@ -809,7 +858,7 @@ const clickRetire = async () => {
const Retire = async () => {
if (reasonStatus.value == true) {
loaderPage(true);
showLoader();
await http
.put(config.API.profileReactive(profileId.value))
.then((res) => {
@ -824,7 +873,7 @@ const Retire = async () => {
router.push("/registry");
});
} else {
loaderPage(true);
showLoader();
await http
.put(config.API.profileDeactive(profileId.value), {
leaveDate: dateToISO(leaveDate.value),

View file

@ -213,7 +213,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const date = ref<Date>(new Date());
@ -351,7 +352,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileNopaidId(profileId.value))
.then((res) => {
@ -372,7 +373,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -458,7 +459,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileNopaidId(profileId.value), {
id: id.value,
@ -482,7 +483,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileNopaidId(id.value), {
id: id.value,
@ -514,7 +515,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileNopaidId(id.value))
.then((res) => {
@ -620,7 +621,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileNopaidHisId(row.id))
.then((res) => {
@ -641,7 +642,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -551,7 +551,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const date = ref<Date>(new Date());
@ -1311,7 +1312,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
};
const nodeTree = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res: any) => {
@ -1325,7 +1326,7 @@ const nodeTree = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1333,7 +1334,7 @@ const nodeTree = async () => {
* get รายการ ตำแหน
*/
const fetchPosition = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.position)
.then((res) => {
@ -1410,12 +1411,12 @@ const fetchPosition = async () => {
})
.catch((e: any) => {})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileSalaryId(profileId.value))
.then((res) => {
@ -1457,7 +1458,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1467,7 +1468,7 @@ const onSelected = async (id: string) => {
const fetchOrganization = async (id: string) => {
if (selected.value != "") {
loaderPage(true);
showLoader();
await http
.get(config.API.organizationName(id))
.then((res) => {
@ -1478,13 +1479,13 @@ const fetchOrganization = async (id: string) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
}
};
const fetchPositionNumber = async (id: string) => {
loaderPage(true);
showLoader();
await http
.get(config.API.getPositionNumberIdByOcId(id))
.then((res) => {
@ -1500,7 +1501,7 @@ const fetchPositionNumber = async (id: string) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -1663,7 +1664,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileSalaryId(profileId.value), {
date: dateToISO(date.value),
@ -1698,7 +1699,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileSalaryId(id.value), {
date: dateToISO(date.value),
@ -1741,7 +1742,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileSalaryId(id.value))
.then((res) => {
@ -1883,7 +1884,7 @@ const clickEditRowRef = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileSalaryHisId(row.id))
.then((res) => {
@ -1925,7 +1926,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -291,7 +291,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const field = ref<string>();
@ -506,7 +507,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileAbiliId(profileId.value))
.then((res) => {
@ -530,7 +531,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -619,7 +620,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileAbiliId(profileId.value), {
id: id.value,
@ -646,7 +647,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileAbiliId(id.value), {
id: id.value,
@ -681,7 +682,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileAbiliId(id.value))
.then((res) => {
@ -793,7 +794,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileAbiliHisId(row.id))
.then((res) => {
@ -817,7 +818,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -431,7 +431,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const name = ref<string>();
@ -751,7 +752,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileTrainId(profileId.value))
.then((res) => {
@ -779,7 +780,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -872,7 +873,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileTrainId(profileId.value), {
id: id.value,
@ -903,7 +904,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileTrainId(id.value), {
id: id.value,
@ -942,7 +943,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileTrainId(id.value))
.then((res) => {
@ -1062,7 +1063,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileTrainHisId(row.id))
.then((res) => {
@ -1090,7 +1091,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -261,7 +261,8 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, success, dateToISO, messageError } = mixin;
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
mixin;
const route = useRoute();
const id = ref<string>("");
const dateStart = ref<Date>(new Date());
@ -426,7 +427,7 @@ onMounted(async () => {
});
const fetchData = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileDutyId(profileId.value))
.then((res) => {
@ -448,7 +449,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};
@ -535,7 +536,7 @@ const clickSave = async () => {
* นทกเพมขอม
*/
const saveData = async () => {
loaderPage(true);
showLoader();
await http
.post(config.API.profileDutyId(profileId.value), {
id: id.value,
@ -560,7 +561,7 @@ const saveData = async () => {
* นทกแกไขขอม
*/
const editData = async () => {
loaderPage(true);
showLoader();
await http
.put(config.API.profileDutyId(id.value), {
id: id.value,
@ -593,7 +594,7 @@ const clickDelete = async () => {
persistent: true,
})
.onOk(async () => {
loaderPage(true);
showLoader();
await http
.delete(config.API.profileDutyId(id.value))
.then((res) => {
@ -701,7 +702,7 @@ const clickEditRow = () => {
*/
const clickHistory = async (row: RequestItemsObject) => {
modalHistory.value = true;
loaderPage(true);
showLoader();
await http
.get(config.API.profileDutyHisId(row.id))
.then((res) => {
@ -723,7 +724,7 @@ const clickHistory = async (row: RequestItemsObject) => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};

View file

@ -151,7 +151,7 @@ const { profileData, changeProfileColumns } = store;
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { date2Thai, messageError } = mixin;
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
const router = useRouter();
const isDrawer = ref<boolean>(true);
const filter = ref<string>(""); //search data table
@ -392,7 +392,7 @@ const clickTree = () => {
};
const nodeTree = async () => {
loaderPage(true);
showLoader();
await http
.get(config.API.profileOrganizRoot)
.then((res: any) => {
@ -469,7 +469,7 @@ const doSearch = async () => {
}
if (selected.value == null || selected.value == "") return;
loaderPage(true);
showLoader();
await http
.post(config.API.searchProfileByOcId(selected.value, profileType.value), {
criterias: cirteria,
@ -501,7 +501,7 @@ const doSearch = async () => {
messageError($q, e);
})
.finally(() => {
loaderPage(false);
hideLoader();
});
};