new loader
This commit is contained in:
parent
fd7aae2f5d
commit
fe6c712a18
95 changed files with 1189 additions and 950 deletions
|
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue