แก้ไข loader
This commit is contained in:
parent
f072224851
commit
b663eedb09
147 changed files with 3095 additions and 3256 deletions
|
|
@ -289,7 +289,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -321,10 +321,8 @@ const emit = defineEmits(["update:statusEdit"]);
|
|||
|
||||
const route = useRoute();
|
||||
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>();
|
||||
|
|
@ -582,7 +580,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) => {
|
||||
|
|
@ -610,7 +608,7 @@ const clickHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -630,7 +628,7 @@ const getNewData = async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (route.params.id) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAdrsId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -649,7 +647,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -682,7 +680,7 @@ const editData = async () => {
|
|||
createdAt: new Date(),
|
||||
createdFullName: "-",
|
||||
};
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileAdrsId(route.params.id.toString()), body)
|
||||
.then((res) => {
|
||||
|
|
@ -699,7 +697,7 @@ const editData = async () => {
|
|||
};
|
||||
|
||||
const addData = async () => {
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||
// .then((res) => {
|
||||
|
|
@ -774,7 +772,7 @@ const selectSubDistrict = (e: string | null, name: string) => {
|
|||
};
|
||||
|
||||
const fetchProvince = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.province)
|
||||
.then((res) => {
|
||||
|
|
@ -790,13 +788,13 @@ const fetchProvince = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchDistrict = async (id: string | null, position: string) => {
|
||||
if (id != null && id != "") {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -817,14 +815,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 && id != "") {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.listSubDistrict(id))
|
||||
.then((res) => {
|
||||
|
|
@ -849,7 +847,7 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
||||
|
|
@ -338,10 +338,10 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -598,7 +598,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAssessmentId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -624,7 +624,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -717,7 +717,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileAssessmentId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -747,7 +747,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileAssessmentId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -784,7 +784,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileAssessmentId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -901,7 +901,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) => {
|
||||
|
|
@ -927,7 +927,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,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";
|
||||
|
|
@ -290,10 +290,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -487,7 +486,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileCertId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -510,7 +509,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -599,7 +598,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileCertId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -625,7 +624,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileCertId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -659,7 +658,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileCertId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -773,7 +772,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
? "ประวัติแก้ไขใบอนุญาตของลูกจ้าง"
|
||||
: "ประวัติแก้ไขใบอนุญาตประกอบอาชีพ";
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileCertHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -796,7 +795,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||
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";
|
||||
|
|
@ -294,10 +294,10 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -490,7 +490,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileHonorId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -514,7 +514,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -604,7 +604,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileHonorId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -632,7 +632,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileHonorId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -667,7 +667,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileHonorId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -781,7 +781,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
|
||||
: "ประวัติแก้ไขประกาศเกียรติคุณ";
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileHonorHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -805,7 +805,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||
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";
|
||||
|
|
@ -307,10 +307,10 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -590,7 +590,7 @@ const filterSelector = (val: string, update: Function, refData: string) => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileDisId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -615,7 +615,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -706,7 +706,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileDisId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -735,7 +735,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileDisId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -771,7 +771,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileDisId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -883,7 +883,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileDisHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -908,7 +908,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ import { onMounted, computed, ref, watch } from "vue";
|
|||
import { useQuasar, QForm } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import HeaderTop from "@/components/information/top.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -156,12 +156,10 @@ const props = defineProps({
|
|||
});
|
||||
const emit = defineEmits(["update:statusEdit"]);
|
||||
|
||||
const dataStore = useDataStore();
|
||||
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 ? route.params.id.toString() : ""
|
||||
);
|
||||
|
|
@ -177,7 +175,7 @@ onMounted(async () => {
|
|||
|
||||
const getData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profilePaperId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -188,13 +186,13 @@ 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) => {
|
||||
|
|
@ -219,7 +217,7 @@ const uploadData = async () => {
|
|||
formData.append("avatar", newFile);
|
||||
formData.append("moss", "newFile");
|
||||
console.log(formData);
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profilePaperId(profileId.value), formData)
|
||||
.then((res) => {
|
||||
|
|
|
|||
|
|
@ -582,7 +582,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";
|
||||
|
|
@ -609,10 +609,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -1047,7 +1046,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchLevel = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.educationLevel)
|
||||
.then((res) => {
|
||||
|
|
@ -1063,12 +1062,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) => {
|
||||
|
|
@ -1085,7 +1084,7 @@ const fetchPositionPath = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1113,7 +1112,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileEduId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1150,7 +1149,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1258,7 +1257,7 @@ const saveData = async () => {
|
|||
// (r: any) => r.id == isEducation.value
|
||||
// );
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileEduId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -1308,7 +1307,7 @@ const editData = async () => {
|
|||
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
||||
// (r: any) => r.id == isEducation.value
|
||||
// );
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileEduId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -1359,7 +1358,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileEduId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1493,7 +1492,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileEduHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -1530,7 +1529,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1089,7 +1089,6 @@
|
|||
import { ref, onMounted } from "vue";
|
||||
import type { QForm } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
import { useQuasar } from "quasar";
|
||||
import type {
|
||||
Family,
|
||||
|
|
@ -1124,10 +1123,8 @@ const emit = defineEmits(["update:statusEdit"]);
|
|||
|
||||
const route = useRoute();
|
||||
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);
|
||||
|
|
@ -1233,7 +1230,7 @@ const refreshData = async () => {
|
|||
};
|
||||
|
||||
const fetchPrefix = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.prefix)
|
||||
.then((res) => {
|
||||
|
|
@ -1249,7 +1246,7 @@ const fetchPrefix = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1279,7 +1276,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) => {
|
||||
|
|
@ -1317,7 +1314,7 @@ const fetchHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
if (familyDataHistory.value.length == 0) {
|
||||
// modalError(
|
||||
// $q,
|
||||
|
|
@ -1340,7 +1337,7 @@ const fetchHistory = async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (route.params.id) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileFamiId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -1393,13 +1390,13 @@ 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,
|
||||
|
|
@ -1441,7 +1438,7 @@ const editData = async () => {
|
|||
};
|
||||
|
||||
const addData = async () => {
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||
// .then((res) => {
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import type { Goverment } from "@/components/information/interface/profileType";
|
||||
import { defaultGoverment } from "@/components/information/interface/profileType";
|
||||
|
|
@ -363,10 +363,10 @@ const emit = defineEmits(["update:statusEdit"]);
|
|||
|
||||
const route = useRoute();
|
||||
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 = useComponentProfileDataStore();
|
||||
const { birthDate, retireText } = storeToRefs(profileStore);
|
||||
const edit = ref<boolean>(false);
|
||||
|
|
@ -611,7 +611,7 @@ watch(retireText, async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileGovId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -637,7 +637,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -647,7 +647,7 @@ const refreshData = async () => {
|
|||
};
|
||||
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileGovId(route.params.id.toString()), {
|
||||
dateAppoint: dateToISO(govermentData.value.containDate),
|
||||
|
|
@ -682,7 +682,7 @@ const handleDate = async (modelData: Date) => {
|
|||
};
|
||||
|
||||
const fetchCalAgeGov = async (date: Date) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
const body = {
|
||||
dateAppoint: date,
|
||||
};
|
||||
|
|
@ -696,7 +696,7 @@ const fetchCalAgeGov = async (date: Date) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -705,7 +705,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) => {
|
||||
|
|
@ -738,7 +738,7 @@ const clickHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -409,7 +409,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
import type {
|
||||
Information,
|
||||
|
|
@ -447,9 +447,16 @@ const emit = defineEmits(["update:statusEdit"]);
|
|||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
|
||||
const profileStore = useComponentProfileDataStore();
|
||||
const { changeRetireText, changeBirth } = profileStore;
|
||||
const edit = ref<boolean>(false);
|
||||
|
|
@ -736,7 +743,7 @@ const onCancel = async () => {
|
|||
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
||||
*/
|
||||
const fetchPerson = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.person)
|
||||
.then((res) => {
|
||||
|
|
@ -793,7 +800,7 @@ const fetchPerson = async () => {
|
|||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -819,7 +826,7 @@ const changeCardID = (value: string | number | null) => {
|
|||
};
|
||||
|
||||
const checkCitizen = async (id: string) => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileCitizenId(id))
|
||||
.then((res) => {
|
||||
|
|
@ -844,7 +851,7 @@ const checkCitizen = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -853,7 +860,7 @@ const checkCitizen = async (id: string) => {
|
|||
*/
|
||||
const clickHistory = async () => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileInforHisId(route.params.id.toString()))
|
||||
.then((res) => {
|
||||
|
|
@ -894,7 +901,7 @@ const clickHistory = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -970,7 +977,7 @@ const calRetire = async (birth: Date) => {
|
|||
birthDate: dateToISO(birth),
|
||||
};
|
||||
if (dateToISO(dateBefore.value) != dateToISO(birth)) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileCalRetire, body)
|
||||
.then((res: any) => {
|
||||
|
|
@ -986,14 +993,14 @@ const calRetire = async (birth: Date) => {
|
|||
changeRetireText(date2Thai(retire));
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
if (route.params.id) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileInforId(route.params.id.toString()))
|
||||
.then(async (res: any) => {
|
||||
|
|
@ -1031,7 +1038,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
// loaderPage(false);
|
||||
// hideLoader();
|
||||
await props.fetchDataProfile();
|
||||
});
|
||||
}
|
||||
|
|
@ -1058,7 +1065,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) => {
|
||||
|
|
@ -1076,7 +1083,7 @@ const editData = async () => {
|
|||
};
|
||||
|
||||
const addData = async () => {
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
// await http
|
||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||
// .then((res) => {
|
||||
|
|
|
|||
|
|
@ -457,7 +457,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";
|
||||
|
|
@ -488,10 +488,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>("");
|
||||
|
|
@ -913,7 +912,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
|||
};
|
||||
|
||||
const fetchInsignia = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.insignia)
|
||||
.then((res) => {
|
||||
|
|
@ -934,13 +933,13 @@ const fetchInsignia = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileInsignId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -973,7 +972,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1071,7 +1070,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileInsignId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -1107,7 +1106,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileInsignId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -1150,7 +1149,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileInsignId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1276,7 +1275,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileInsignHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -1309,7 +1308,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||
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";
|
||||
|
|
@ -380,8 +380,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,
|
||||
|
|
@ -390,6 +388,8 @@ const {
|
|||
statusLeave,
|
||||
dialogMessage,
|
||||
dateToISO,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
|
||||
|
|
@ -718,7 +718,7 @@ onMounted(async () => {
|
|||
const fetchData = async () => {
|
||||
rows.value = [];
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileLeaveId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -743,7 +743,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -773,7 +773,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileLeaveHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -798,7 +798,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -969,7 +969,7 @@ const saveData = async () => {
|
|||
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
||||
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileLeaveId(profileId.value), {
|
||||
dateStartLeave: dateToISO(dateRange.value[0]),
|
||||
|
|
@ -1000,7 +1000,7 @@ const saveData = async () => {
|
|||
const editData = async () => {
|
||||
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
||||
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileLeaveId(id.value), {
|
||||
dateStartLeave: dateToISO(dateRange.value[0]),
|
||||
|
|
@ -1025,7 +1025,7 @@ const editData = async () => {
|
|||
};
|
||||
|
||||
const deleteData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileLeaveId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1192,7 +1192,7 @@ const addData = async () => {
|
|||
const clickTotal = async () => {
|
||||
rowsTotal.value = [];
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileLeaveTotalId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1211,7 +1211,7 @@ const clickTotal = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,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";
|
||||
|
|
@ -191,10 +191,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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());
|
||||
|
|
@ -305,7 +304,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOtherId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -325,7 +324,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -412,7 +411,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileOtherId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -436,7 +435,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileOtherId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -467,7 +466,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileOtherId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -571,7 +570,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOtherHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -591,7 +590,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -258,7 +258,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";
|
||||
|
|
@ -283,10 +283,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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());
|
||||
|
|
@ -481,7 +480,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value != "") {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNopaidId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -505,7 +504,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -595,7 +594,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileNopaidId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -623,7 +622,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileNopaidId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -658,7 +657,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileNopaidId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -768,7 +767,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileNopaidHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -792,7 +791,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -552,7 +552,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";
|
||||
|
|
@ -581,10 +581,10 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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());
|
||||
|
|
@ -1410,7 +1410,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
};
|
||||
|
||||
const nodeTree = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res: any) => {
|
||||
|
|
@ -1424,7 +1424,7 @@ const nodeTree = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1432,7 +1432,7 @@ const nodeTree = async () => {
|
|||
* get รายการ ตำแหน่ง
|
||||
*/
|
||||
const fetchPosition = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.position)
|
||||
.then((res) => {
|
||||
|
|
@ -1509,13 +1509,13 @@ const fetchPosition = async () => {
|
|||
})
|
||||
.catch((e: any) => {})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1558,7 +1558,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -1569,7 +1569,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) => {
|
||||
|
|
@ -1580,13 +1580,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) => {
|
||||
|
|
@ -1602,7 +1602,7 @@ const fetchPositionNumber = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1767,7 +1767,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileSalaryId(profileId.value), {
|
||||
date: dateToISO(date.value),
|
||||
|
|
@ -1804,7 +1804,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileSalaryId(id.value), {
|
||||
date: dateToISO(date.value),
|
||||
|
|
@ -1848,7 +1848,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileSalaryId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1992,7 +1992,7 @@ const clickEditRowRef = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -2035,7 +2035,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -563,7 +563,6 @@ 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";
|
||||
|
|
@ -592,10 +591,16 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
const { profileData, changeProfileColumns } = store;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const date = ref<Date>(new Date());
|
||||
|
|
@ -1281,14 +1286,14 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchDataSelector = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await fetchEmployeePosition();
|
||||
await fetchEmployeePositionSide();
|
||||
await fetchEmployeeLevel();
|
||||
await fetchEmployeeGroup();
|
||||
await fetchAgency();
|
||||
await nodeTree();
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
};
|
||||
// ตำแหน่ง
|
||||
const fetchEmployeePosition = async () => {
|
||||
|
|
@ -1383,7 +1388,7 @@ const fetchAgency = async () => {
|
|||
};
|
||||
|
||||
const nodeTree = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res: any) => {
|
||||
|
|
@ -1397,7 +1402,7 @@ const nodeTree = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1469,7 +1474,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1509,13 +1514,13 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fetchPositionNumber = async (id: string) => {
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
if (id == null || id == "") return;
|
||||
await http
|
||||
.get(config.API.getPositionNumberIdByOcId(id))
|
||||
|
|
@ -1532,7 +1537,7 @@ const fetchPositionNumber = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1696,7 +1701,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
||||
amount: amount.value,
|
||||
|
|
@ -1731,7 +1736,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileSalaryEmployeeId(id.value), {
|
||||
amount: amount.value,
|
||||
|
|
@ -1765,7 +1770,7 @@ const editData = async () => {
|
|||
* ลบข้อมูล
|
||||
*/
|
||||
const fetchDataDelete = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileSalaryId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1935,7 +1940,7 @@ const clickEditRowRef = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsEmployee) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -1974,7 +1979,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -538,7 +538,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";
|
||||
|
|
@ -567,10 +567,16 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
const { profileData, changeProfileColumns } = store;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
dateToISO,
|
||||
messageError,
|
||||
dialogMessage,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const date = ref<Date>(new Date());
|
||||
|
|
@ -1310,14 +1316,14 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchDataSelector = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await fetchEmployeePosition();
|
||||
await fetchEmployeePositionSide();
|
||||
await fetchEmployeeLevel();
|
||||
await fetchEmployeeGroup();
|
||||
await fetchAgency();
|
||||
await nodeTree();
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
};
|
||||
// ตำแหน่ง
|
||||
const fetchEmployeePosition = async () => {
|
||||
|
|
@ -1412,7 +1418,7 @@ const fetchAgency = async () => {
|
|||
};
|
||||
|
||||
const nodeTree = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.then((res: any) => {
|
||||
|
|
@ -1426,7 +1432,7 @@ const nodeTree = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1498,7 +1504,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1537,13 +1543,13 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const fetchPositionNumber = async (id: string) => {
|
||||
// loaderPage(true);
|
||||
// showLoader();
|
||||
if (id == null || id == "") return;
|
||||
await http
|
||||
.get(config.API.getPositionNumberIdByOcId(id))
|
||||
|
|
@ -1560,7 +1566,7 @@ const fetchPositionNumber = async (id: string) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -1725,7 +1731,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
||||
amount: amount.value,
|
||||
|
|
@ -1760,7 +1766,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileSalaryEmployeeId(id.value), {
|
||||
amount: amount.value,
|
||||
|
|
@ -1794,7 +1800,7 @@ const editData = async () => {
|
|||
* ลบข้อมูล
|
||||
*/
|
||||
const fetchDataDelete = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileSalaryId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1964,7 +1970,7 @@ const clickEditRowRef = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsEmployee) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileSalaryHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -2003,7 +2009,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ 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";
|
||||
|
|
@ -189,10 +188,10 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -355,7 +354,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAbiliId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -377,7 +376,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -466,7 +465,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileAbiliId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -492,7 +491,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileAbiliId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -525,7 +524,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileAbiliId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -633,7 +632,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileAbiliHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -655,7 +654,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -403,7 +403,6 @@ import { onMounted, ref, watch } from "vue";
|
|||
import { useRoute } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||
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";
|
||||
|
|
@ -428,10 +427,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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>();
|
||||
|
|
@ -754,7 +752,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileTrainId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -782,7 +780,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -877,7 +875,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileTrainId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -909,7 +907,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileTrainId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -948,7 +946,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileTrainId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -1068,7 +1066,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileTrainHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -1096,7 +1094,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,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";
|
||||
|
|
@ -329,10 +329,9 @@ const props = defineProps({
|
|||
const $q = useQuasar();
|
||||
const store = useComponentProfileDataStore();
|
||||
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());
|
||||
|
|
@ -555,7 +554,7 @@ onMounted(async () => {
|
|||
|
||||
const fetchData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileDutyId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -580,7 +579,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -671,7 +670,7 @@ const clickSave = async () => {
|
|||
*/
|
||||
const saveData = async () => {
|
||||
if (profileId.value) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.profileDutyId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -700,7 +699,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.profileDutyId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -736,7 +735,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.profileDutyId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -848,7 +847,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileDutyHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -873,7 +872,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue