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

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