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

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