แก้ไข loader
This commit is contained in:
parent
f072224851
commit
b663eedb09
147 changed files with 3095 additions and 3256 deletions
|
|
@ -296,7 +296,7 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import ProfileTable from "@/components/information/Table.vue";
|
||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||
|
|
@ -341,8 +341,6 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
const { profileData, changeProfileColumns } = store;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
|
|
@ -351,6 +349,8 @@ const {
|
|||
messageError,
|
||||
typeChangeName,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
|
|
@ -550,7 +550,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileChangeNameId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -574,7 +574,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ const fetchData = async () => {
|
|||
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
||||
*/
|
||||
const fetchPerson = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.person)
|
||||
.then((res) => {
|
||||
|
|
@ -599,7 +599,7 @@ const fetchPerson = async () => {
|
|||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -701,7 +701,7 @@ const saveData = async () => {
|
|||
if (lastName.value != undefined)
|
||||
formData.append("lastName", lastName.value);
|
||||
if (status.value != undefined) formData.append("status", status.value);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileChangeNameId(profileId.value), formData)
|
||||
.then((res) => {
|
||||
|
|
@ -747,7 +747,7 @@ const editData = async () => {
|
|||
formData.append("firstName", firstName.value);
|
||||
if (lastName.value != undefined) formData.append("lastName", lastName.value);
|
||||
if (status.value != undefined) formData.append("status", status.value);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileChangeNameId(id.value), formData)
|
||||
.then((res) => {
|
||||
|
|
@ -775,7 +775,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileChangeNameId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -885,7 +885,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileChangeNameHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -909,7 +909,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue