แก้ไข 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">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -321,10 +321,8 @@ const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, messageError } = mixin;
|
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const addressData = ref<Address>(defaultAddress);
|
const addressData = ref<Address>(defaultAddress);
|
||||||
const myform = ref<any>();
|
const myform = ref<any>();
|
||||||
|
|
@ -582,7 +580,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async () => {
|
const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAdrsHisId(route.params.id.toString()))
|
.get(config.API.profileAdrsHisId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -610,7 +608,7 @@ const clickHistory = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -630,7 +628,7 @@ const getNewData = async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAdrsId(route.params.id.toString()))
|
.get(config.API.profileAdrsId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -649,7 +647,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -682,7 +680,7 @@ const editData = async () => {
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
createdFullName: "-",
|
createdFullName: "-",
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileAdrsId(route.params.id.toString()), body)
|
.put(config.API.profileAdrsId(route.params.id.toString()), body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -699,7 +697,7 @@ const editData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
@ -774,7 +772,7 @@ const selectSubDistrict = (e: string | null, name: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchProvince = async () => {
|
const fetchProvince = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.province)
|
.get(config.API.province)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -790,13 +788,13 @@ const fetchProvince = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchDistrict = async (id: string | null, position: string) => {
|
const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
if (id != null && id != "") {
|
if (id != null && id != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listDistrict(id))
|
.get(config.API.listDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -817,14 +815,14 @@ const fetchDistrict = async (id: string | null, position: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchSubDistrict = async (id: string | null, position: string) => {
|
const fetchSubDistrict = async (id: string | null, position: string) => {
|
||||||
if (id != null && id != "") {
|
if (id != null && id != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listSubDistrict(id))
|
.get(config.API.listSubDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -849,7 +847,7 @@ const fetchSubDistrict = async (id: string | null, position: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
||||||
|
|
@ -338,10 +338,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useProfileDataStore();
|
const store = useProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const name = ref<string>();
|
const name = ref<string>();
|
||||||
|
|
@ -598,7 +598,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAssessmentId(profileId.value))
|
.get(config.API.profileAssessmentId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -624,7 +624,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -717,7 +717,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileAssessmentId(profileId.value), {
|
.post(config.API.profileAssessmentId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -747,7 +747,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileAssessmentId(id.value), {
|
.put(config.API.profileAssessmentId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -784,7 +784,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileAssessmentId(id.value))
|
.delete(config.API.profileAssessmentId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -901,7 +901,7 @@ const clickEditRow = () => {
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ";
|
tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ";
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAssessmentHisId(row.id))
|
.get(config.API.profileAssessmentHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -927,7 +927,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -290,10 +290,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const certificateNo = ref<string>();
|
const certificateNo = ref<string>();
|
||||||
|
|
@ -487,7 +486,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileCertId(profileId.value))
|
.get(config.API.profileCertId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -510,7 +509,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -599,7 +598,7 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileCertId(profileId.value), {
|
.post(config.API.profileCertId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -625,7 +624,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileCertId(id.value), {
|
.put(config.API.profileCertId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -659,7 +658,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileCertId(id.value))
|
.delete(config.API.profileCertId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -773,7 +772,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
? "ประวัติแก้ไขใบอนุญาตของลูกจ้าง"
|
? "ประวัติแก้ไขใบอนุญาตของลูกจ้าง"
|
||||||
: "ประวัติแก้ไขใบอนุญาตประกอบอาชีพ";
|
: "ประวัติแก้ไขใบอนุญาตประกอบอาชีพ";
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileCertHisId(row.id))
|
.get(config.API.profileCertHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -796,7 +795,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -294,10 +294,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const issuer = ref<string>();
|
const issuer = ref<string>();
|
||||||
|
|
@ -490,7 +490,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileHonorId(profileId.value))
|
.get(config.API.profileHonorId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -514,7 +514,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -604,7 +604,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileHonorId(profileId.value), {
|
.post(config.API.profileHonorId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -632,7 +632,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileHonorId(id.value), {
|
.put(config.API.profileHonorId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -667,7 +667,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileHonorId(id.value))
|
.delete(config.API.profileHonorId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -781,7 +781,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
|
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
|
||||||
: "ประวัติแก้ไขประกาศเกียรติคุณ";
|
: "ประวัติแก้ไขประกาศเกียรติคุณ";
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileHonorHisId(row.id))
|
.get(config.API.profileHonorHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -805,7 +805,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -307,10 +307,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const level = ref<string>();
|
const level = ref<string>();
|
||||||
|
|
@ -590,7 +590,7 @@ const filterSelector = (val: string, update: Function, refData: string) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileDisId(profileId.value))
|
.get(config.API.profileDisId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -615,7 +615,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -706,7 +706,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileDisId(profileId.value), {
|
.post(config.API.profileDisId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -735,7 +735,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileDisId(id.value), {
|
.put(config.API.profileDisId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -771,7 +771,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileDisId(id.value))
|
.delete(config.API.profileDisId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -883,7 +883,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileDisHisId(row.id))
|
.get(config.API.profileDisHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -908,7 +908,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ import { onMounted, computed, ref, watch } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import HeaderTop from "@/components/information/top.vue";
|
import HeaderTop from "@/components/information/top.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -156,12 +156,10 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
const emit = defineEmits(["update:statusEdit"]);
|
const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError } = mixin;
|
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const profileId = ref<string>(
|
const profileId = ref<string>(
|
||||||
route.params.id ? route.params.id.toString() : ""
|
route.params.id ? route.params.id.toString() : ""
|
||||||
);
|
);
|
||||||
|
|
@ -177,7 +175,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profilePaperId(profileId.value))
|
.get(config.API.profilePaperId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -188,13 +186,13 @@ const getData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profilePaperId(id))
|
.delete(config.API.profilePaperId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -219,7 +217,7 @@ const uploadData = async () => {
|
||||||
formData.append("avatar", newFile);
|
formData.append("avatar", newFile);
|
||||||
formData.append("moss", "newFile");
|
formData.append("moss", "newFile");
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profilePaperId(profileId.value), formData)
|
.post(config.API.profilePaperId(profileId.value), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -582,7 +582,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -609,10 +609,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateToISO, date2Thai, messageError } = mixin;
|
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const levelId = ref<string>();
|
const levelId = ref<string>();
|
||||||
|
|
@ -1047,7 +1046,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchLevel = async () => {
|
const fetchLevel = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.educationLevel)
|
.get(config.API.educationLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1063,12 +1062,12 @@ const fetchLevel = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPositionPath = async () => {
|
const fetchPositionPath = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionPath)
|
.get(config.API.positionPath)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1085,7 +1084,7 @@ const fetchPositionPath = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1113,7 +1112,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileEduId(profileId.value))
|
.get(config.API.profileEduId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1150,7 +1149,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1258,7 +1257,7 @@ const saveData = async () => {
|
||||||
// (r: any) => r.id == isEducation.value
|
// (r: any) => r.id == isEducation.value
|
||||||
// );
|
// );
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileEduId(profileId.value), {
|
.post(config.API.profileEduId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -1308,7 +1307,7 @@ const editData = async () => {
|
||||||
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
// const filterPositionPath = OpsFilter.value.positionPathOptions.filter(
|
||||||
// (r: any) => r.id == isEducation.value
|
// (r: any) => r.id == isEducation.value
|
||||||
// );
|
// );
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileEduId(id.value), {
|
.put(config.API.profileEduId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -1359,7 +1358,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileEduId(id.value))
|
.delete(config.API.profileEduId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1493,7 +1492,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileEduHisId(row.id))
|
.get(config.API.profileEduHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1530,7 +1529,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1089,7 +1089,6 @@
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
Family,
|
Family,
|
||||||
|
|
@ -1124,10 +1123,8 @@ const emit = defineEmits(["update:statusEdit"]);
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, messageError } = mixin;
|
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const fix = ref<boolean>(true);
|
const fix = ref<boolean>(true);
|
||||||
const myform = ref<QForm | null>(null);
|
const myform = ref<QForm | null>(null);
|
||||||
|
|
@ -1233,7 +1230,7 @@ const refreshData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPrefix = async () => {
|
const fetchPrefix = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.prefix)
|
.get(config.API.prefix)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1249,7 +1246,7 @@ const fetchPrefix = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1279,7 +1276,7 @@ const deleteChildren = (items: childrenFamily) => {
|
||||||
|
|
||||||
const fetchHistory = async () => {
|
const fetchHistory = async () => {
|
||||||
familyDataHistory.value = [];
|
familyDataHistory.value = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileFamiHisId(route.params.id.toString()))
|
.get(config.API.profileFamiHisId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1317,7 +1314,7 @@ const fetchHistory = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (familyDataHistory.value.length == 0) {
|
if (familyDataHistory.value.length == 0) {
|
||||||
// modalError(
|
// modalError(
|
||||||
// $q,
|
// $q,
|
||||||
|
|
@ -1340,7 +1337,7 @@ const fetchHistory = async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileFamiId(route.params.id.toString()))
|
.get(config.API.profileFamiId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1393,13 +1390,13 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const body: ResponseObject = {
|
const body: ResponseObject = {
|
||||||
couple: familyData.value.same == "1",
|
couple: familyData.value.same == "1",
|
||||||
couplePrefixId: familyData.value.prefixIdC,
|
couplePrefixId: familyData.value.prefixIdC,
|
||||||
|
|
@ -1441,7 +1438,7 @@ const editData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type { Goverment } from "@/components/information/interface/profileType";
|
import type { Goverment } from "@/components/information/interface/profileType";
|
||||||
import { defaultGoverment } 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 route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const profileStore = useComponentProfileDataStore();
|
const profileStore = useComponentProfileDataStore();
|
||||||
const { birthDate, retireText } = storeToRefs(profileStore);
|
const { birthDate, retireText } = storeToRefs(profileStore);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
|
@ -611,7 +611,7 @@ watch(retireText, async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileGovId(route.params.id.toString()))
|
.get(config.API.profileGovId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -637,7 +637,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -647,7 +647,7 @@ const refreshData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileGovId(route.params.id.toString()), {
|
.put(config.API.profileGovId(route.params.id.toString()), {
|
||||||
dateAppoint: dateToISO(govermentData.value.containDate),
|
dateAppoint: dateToISO(govermentData.value.containDate),
|
||||||
|
|
@ -682,7 +682,7 @@ const handleDate = async (modelData: Date) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchCalAgeGov = async (date: Date) => {
|
const fetchCalAgeGov = async (date: Date) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
dateAppoint: date,
|
dateAppoint: date,
|
||||||
};
|
};
|
||||||
|
|
@ -696,7 +696,7 @@ const fetchCalAgeGov = async (date: Date) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -705,7 +705,7 @@ const fetchCalAgeGov = async (date: Date) => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async () => {
|
const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileGovHisId(route.params.id.toString()))
|
.get(config.API.profileGovHisId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -738,7 +738,7 @@ const clickHistory = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
Information,
|
Information,
|
||||||
|
|
@ -447,9 +447,16 @@ const emit = defineEmits(["update:statusEdit"]);
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
const {
|
||||||
const dataStore = useDataStore();
|
date2Thai,
|
||||||
const { loaderPage } = dataStore;
|
success,
|
||||||
|
dateToISO,
|
||||||
|
messageError,
|
||||||
|
dialogMessage,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const profileStore = useComponentProfileDataStore();
|
const profileStore = useComponentProfileDataStore();
|
||||||
const { changeRetireText, changeBirth } = profileStore;
|
const { changeRetireText, changeBirth } = profileStore;
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
|
|
@ -736,7 +743,7 @@ const onCancel = async () => {
|
||||||
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
||||||
*/
|
*/
|
||||||
const fetchPerson = async () => {
|
const fetchPerson = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.person)
|
.get(config.API.person)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -793,7 +800,7 @@ const fetchPerson = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -819,7 +826,7 @@ const changeCardID = (value: string | number | null) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkCitizen = async (id: string) => {
|
const checkCitizen = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileCitizenId(id))
|
.get(config.API.profileCitizenId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -844,7 +851,7 @@ const checkCitizen = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -853,7 +860,7 @@ const checkCitizen = async (id: string) => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async () => {
|
const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileInforHisId(route.params.id.toString()))
|
.get(config.API.profileInforHisId(route.params.id.toString()))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -894,7 +901,7 @@ const clickHistory = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -970,7 +977,7 @@ const calRetire = async (birth: Date) => {
|
||||||
birthDate: dateToISO(birth),
|
birthDate: dateToISO(birth),
|
||||||
};
|
};
|
||||||
if (dateToISO(dateBefore.value) != dateToISO(birth)) {
|
if (dateToISO(dateBefore.value) != dateToISO(birth)) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileCalRetire, body)
|
.post(config.API.profileCalRetire, body)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
@ -986,14 +993,14 @@ const calRetire = async (birth: Date) => {
|
||||||
changeRetireText(date2Thai(retire));
|
changeRetireText(date2Thai(retire));
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileInforId(route.params.id.toString()))
|
.get(config.API.profileInforId(route.params.id.toString()))
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
|
|
@ -1031,7 +1038,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
await props.fetchDataProfile();
|
await props.fetchDataProfile();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1058,7 +1065,7 @@ const editData = async () => {
|
||||||
profileType: informaData.value.profileType,
|
profileType: informaData.value.profileType,
|
||||||
createdFullName: "-",
|
createdFullName: "-",
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileInforId(route.params.id.toString()), body)
|
.put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1076,7 +1083,7 @@ const editData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
// .put(config.API.profileInforId(route.params.id.toString()), body)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -488,10 +488,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const insigniaId = ref<string>("");
|
const insigniaId = ref<string>("");
|
||||||
|
|
@ -913,7 +912,7 @@ const filterSelector = (val: any, update: Function, refData: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchInsignia = async () => {
|
const fetchInsignia = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.insignia)
|
.get(config.API.insignia)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -934,13 +933,13 @@ const fetchInsignia = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileInsignId(profileId.value))
|
.get(config.API.profileInsignId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -973,7 +972,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1071,7 +1070,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileInsignId(profileId.value), {
|
.post(config.API.profileInsignId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -1107,7 +1106,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileInsignId(id.value), {
|
.put(config.API.profileInsignId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -1150,7 +1149,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileInsignId(id.value))
|
.delete(config.API.profileInsignId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1276,7 +1275,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileInsignHisId(row.id))
|
.get(config.API.profileInsignHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1309,7 +1308,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -380,8 +380,6 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
|
@ -390,6 +388,8 @@ const {
|
||||||
statusLeave,
|
statusLeave,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
dateToISO,
|
dateToISO,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
|
|
@ -718,7 +718,7 @@ onMounted(async () => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileLeaveId(profileId.value))
|
.get(config.API.profileLeaveId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -743,7 +743,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -773,7 +773,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
|
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileLeaveHisId(row.id))
|
.get(config.API.profileLeaveHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -798,7 +798,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -969,7 +969,7 @@ const saveData = async () => {
|
||||||
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
||||||
|
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileLeaveId(profileId.value), {
|
.post(config.API.profileLeaveId(profileId.value), {
|
||||||
dateStartLeave: dateToISO(dateRange.value[0]),
|
dateStartLeave: dateToISO(dateRange.value[0]),
|
||||||
|
|
@ -1000,7 +1000,7 @@ const saveData = async () => {
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
const sum = Number(numLeave.value) + Number(numUsedLeave.value);
|
||||||
|
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileLeaveId(id.value), {
|
.put(config.API.profileLeaveId(id.value), {
|
||||||
dateStartLeave: dateToISO(dateRange.value[0]),
|
dateStartLeave: dateToISO(dateRange.value[0]),
|
||||||
|
|
@ -1025,7 +1025,7 @@ const editData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async () => {
|
const deleteData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileLeaveId(id.value))
|
.delete(config.API.profileLeaveId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1192,7 +1192,7 @@ const addData = async () => {
|
||||||
const clickTotal = async () => {
|
const clickTotal = async () => {
|
||||||
rowsTotal.value = [];
|
rowsTotal.value = [];
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileLeaveTotalId(profileId.value))
|
.get(config.API.profileLeaveTotalId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1211,7 +1211,7 @@ const clickTotal = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -341,8 +341,6 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
|
|
@ -351,6 +349,8 @@ const {
|
||||||
messageError,
|
messageError,
|
||||||
typeChangeName,
|
typeChangeName,
|
||||||
dialogMessage,
|
dialogMessage,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
|
|
@ -550,7 +550,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileChangeNameId(profileId.value))
|
.get(config.API.profileChangeNameId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -574,7 +574,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -582,7 +582,7 @@ const fetchData = async () => {
|
||||||
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
* get รายการ ข้อมูลเกี่ยวกับบุคคล
|
||||||
*/
|
*/
|
||||||
const fetchPerson = async () => {
|
const fetchPerson = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.person)
|
.get(config.API.person)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -599,7 +599,7 @@ const fetchPerson = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -701,7 +701,7 @@ const saveData = async () => {
|
||||||
if (lastName.value != undefined)
|
if (lastName.value != undefined)
|
||||||
formData.append("lastName", lastName.value);
|
formData.append("lastName", lastName.value);
|
||||||
if (status.value != undefined) formData.append("status", status.value);
|
if (status.value != undefined) formData.append("status", status.value);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileChangeNameId(profileId.value), formData)
|
.post(config.API.profileChangeNameId(profileId.value), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -747,7 +747,7 @@ const editData = async () => {
|
||||||
formData.append("firstName", firstName.value);
|
formData.append("firstName", firstName.value);
|
||||||
if (lastName.value != undefined) formData.append("lastName", lastName.value);
|
if (lastName.value != undefined) formData.append("lastName", lastName.value);
|
||||||
if (status.value != undefined) formData.append("status", status.value);
|
if (status.value != undefined) formData.append("status", status.value);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileChangeNameId(id.value), formData)
|
.put(config.API.profileChangeNameId(id.value), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -775,7 +775,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileChangeNameId(id.value))
|
.delete(config.API.profileChangeNameId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -885,7 +885,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileChangeNameHisId(row.id))
|
.get(config.API.profileChangeNameHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -909,7 +909,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -191,10 +191,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, messageError } = mixin;
|
const { date2Thai, success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
|
|
@ -305,7 +304,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOtherId(profileId.value))
|
.get(config.API.profileOtherId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -325,7 +324,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -412,7 +411,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileOtherId(profileId.value), {
|
.post(config.API.profileOtherId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -436,7 +435,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileOtherId(id.value), {
|
.put(config.API.profileOtherId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -467,7 +466,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileOtherId(id.value))
|
.delete(config.API.profileOtherId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -571,7 +570,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOtherHisId(row.id))
|
.get(config.API.profileOtherHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -591,7 +590,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -283,10 +283,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
|
|
@ -481,7 +480,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value != "") {
|
if (profileId.value != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNopaidId(profileId.value))
|
.get(config.API.profileNopaidId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -505,7 +504,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -595,7 +594,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileNopaidId(profileId.value), {
|
.post(config.API.profileNopaidId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -623,7 +622,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileNopaidId(id.value), {
|
.put(config.API.profileNopaidId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -658,7 +657,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileNopaidId(id.value))
|
.delete(config.API.profileNopaidId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -768,7 +767,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileNopaidHisId(row.id))
|
.get(config.API.profileNopaidHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -792,7 +791,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -581,10 +581,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
|
|
@ -1410,7 +1410,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const nodeTree = async () => {
|
const nodeTree = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOrganizRoot)
|
.get(config.API.profileOrganizRoot)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
@ -1424,7 +1424,7 @@ const nodeTree = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1432,7 +1432,7 @@ const nodeTree = async () => {
|
||||||
* get รายการ ตำแหน่ง
|
* get รายการ ตำแหน่ง
|
||||||
*/
|
*/
|
||||||
const fetchPosition = async () => {
|
const fetchPosition = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.position)
|
.get(config.API.position)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1509,13 +1509,13 @@ const fetchPosition = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryId(profileId.value))
|
.get(config.API.profileSalaryId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1558,7 +1558,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1569,7 +1569,7 @@ const onSelected = async (id: string) => {
|
||||||
|
|
||||||
const fetchOrganization = async (id: string) => {
|
const fetchOrganization = async (id: string) => {
|
||||||
if (selected.value != "") {
|
if (selected.value != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationName(id))
|
.get(config.API.organizationName(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1580,13 +1580,13 @@ const fetchOrganization = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPositionNumber = async (id: string) => {
|
const fetchPositionNumber = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionNumberIdByOcId(id))
|
.get(config.API.getPositionNumberIdByOcId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1602,7 +1602,7 @@ const fetchPositionNumber = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1767,7 +1767,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileSalaryId(profileId.value), {
|
.post(config.API.profileSalaryId(profileId.value), {
|
||||||
date: dateToISO(date.value),
|
date: dateToISO(date.value),
|
||||||
|
|
@ -1804,7 +1804,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileSalaryId(id.value), {
|
.put(config.API.profileSalaryId(id.value), {
|
||||||
date: dateToISO(date.value),
|
date: dateToISO(date.value),
|
||||||
|
|
@ -1848,7 +1848,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileSalaryId(id.value))
|
.delete(config.API.profileSalaryId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1992,7 +1992,7 @@ const clickEditRowRef = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryHisId(row.id))
|
.get(config.API.profileSalaryHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -2035,7 +2035,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,6 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -592,10 +591,16 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
success,
|
||||||
|
dateToISO,
|
||||||
|
messageError,
|
||||||
|
dialogMessage,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
|
|
@ -1281,14 +1286,14 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchDataSelector = async () => {
|
const fetchDataSelector = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await fetchEmployeePosition();
|
await fetchEmployeePosition();
|
||||||
await fetchEmployeePositionSide();
|
await fetchEmployeePositionSide();
|
||||||
await fetchEmployeeLevel();
|
await fetchEmployeeLevel();
|
||||||
await fetchEmployeeGroup();
|
await fetchEmployeeGroup();
|
||||||
await fetchAgency();
|
await fetchAgency();
|
||||||
await nodeTree();
|
await nodeTree();
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
};
|
};
|
||||||
// ตำแหน่ง
|
// ตำแหน่ง
|
||||||
const fetchEmployeePosition = async () => {
|
const fetchEmployeePosition = async () => {
|
||||||
|
|
@ -1383,7 +1388,7 @@ const fetchAgency = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const nodeTree = async () => {
|
const nodeTree = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOrganizRoot)
|
.get(config.API.profileOrganizRoot)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
@ -1397,7 +1402,7 @@ const nodeTree = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1469,7 +1474,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1509,13 +1514,13 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPositionNumber = async (id: string) => {
|
const fetchPositionNumber = async (id: string) => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
if (id == null || id == "") return;
|
if (id == null || id == "") return;
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionNumberIdByOcId(id))
|
.get(config.API.getPositionNumberIdByOcId(id))
|
||||||
|
|
@ -1532,7 +1537,7 @@ const fetchPositionNumber = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1696,7 +1701,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
||||||
amount: amount.value,
|
amount: amount.value,
|
||||||
|
|
@ -1731,7 +1736,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileSalaryEmployeeId(id.value), {
|
.put(config.API.profileSalaryEmployeeId(id.value), {
|
||||||
amount: amount.value,
|
amount: amount.value,
|
||||||
|
|
@ -1765,7 +1770,7 @@ const editData = async () => {
|
||||||
* ลบข้อมูล
|
* ลบข้อมูล
|
||||||
*/
|
*/
|
||||||
const fetchDataDelete = async () => {
|
const fetchDataDelete = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileSalaryId(id.value))
|
.delete(config.API.profileSalaryId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1935,7 +1940,7 @@ const clickEditRowRef = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsEmployee) => {
|
const clickHistory = async (row: RequestItemsEmployee) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryHisId(row.id))
|
.get(config.API.profileSalaryHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1974,7 +1979,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -567,10 +567,16 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError, dialogMessage } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
success,
|
||||||
|
dateToISO,
|
||||||
|
messageError,
|
||||||
|
dialogMessage,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const date = ref<Date>(new Date());
|
const date = ref<Date>(new Date());
|
||||||
|
|
@ -1310,14 +1316,14 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchDataSelector = async () => {
|
const fetchDataSelector = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await fetchEmployeePosition();
|
await fetchEmployeePosition();
|
||||||
await fetchEmployeePositionSide();
|
await fetchEmployeePositionSide();
|
||||||
await fetchEmployeeLevel();
|
await fetchEmployeeLevel();
|
||||||
await fetchEmployeeGroup();
|
await fetchEmployeeGroup();
|
||||||
await fetchAgency();
|
await fetchAgency();
|
||||||
await nodeTree();
|
await nodeTree();
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
};
|
};
|
||||||
// ตำแหน่ง
|
// ตำแหน่ง
|
||||||
const fetchEmployeePosition = async () => {
|
const fetchEmployeePosition = async () => {
|
||||||
|
|
@ -1412,7 +1418,7 @@ const fetchAgency = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const nodeTree = async () => {
|
const nodeTree = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOrganizRoot)
|
.get(config.API.profileOrganizRoot)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
@ -1426,7 +1432,7 @@ const nodeTree = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1498,7 +1504,7 @@ const filterSelector = (val: any, update: Function, filtername: string) => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
.get(config.API.profileSalaryEmployeeId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1537,13 +1543,13 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPositionNumber = async (id: string) => {
|
const fetchPositionNumber = async (id: string) => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
if (id == null || id == "") return;
|
if (id == null || id == "") return;
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionNumberIdByOcId(id))
|
.get(config.API.getPositionNumberIdByOcId(id))
|
||||||
|
|
@ -1560,7 +1566,7 @@ const fetchPositionNumber = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1725,7 +1731,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
.post(config.API.profileSalaryEmployeeId(profileId.value), {
|
||||||
amount: amount.value,
|
amount: amount.value,
|
||||||
|
|
@ -1760,7 +1766,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileSalaryEmployeeId(id.value), {
|
.put(config.API.profileSalaryEmployeeId(id.value), {
|
||||||
amount: amount.value,
|
amount: amount.value,
|
||||||
|
|
@ -1794,7 +1800,7 @@ const editData = async () => {
|
||||||
* ลบข้อมูล
|
* ลบข้อมูล
|
||||||
*/
|
*/
|
||||||
const fetchDataDelete = async () => {
|
const fetchDataDelete = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileSalaryId(id.value))
|
.delete(config.API.profileSalaryId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1964,7 +1970,7 @@ const clickEditRowRef = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsEmployee) => {
|
const clickHistory = async (row: RequestItemsEmployee) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileSalaryHisId(row.id))
|
.get(config.API.profileSalaryHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -2003,7 +2009,7 @@ const clickHistory = async (row: RequestItemsEmployee) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,6 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -189,10 +188,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const field = ref<string>();
|
const field = ref<string>();
|
||||||
|
|
@ -355,7 +354,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAbiliId(profileId.value))
|
.get(config.API.profileAbiliId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -377,7 +376,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -466,7 +465,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileAbiliId(profileId.value), {
|
.post(config.API.profileAbiliId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -492,7 +491,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileAbiliId(id.value), {
|
.put(config.API.profileAbiliId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -525,7 +524,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileAbiliId(id.value))
|
.delete(config.API.profileAbiliId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -633,7 +632,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAbiliHisId(row.id))
|
.get(config.API.profileAbiliHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -655,7 +654,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,6 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -428,10 +427,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const name = ref<string>();
|
const name = ref<string>();
|
||||||
|
|
@ -754,7 +752,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileTrainId(profileId.value))
|
.get(config.API.profileTrainId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -782,7 +780,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -877,7 +875,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileTrainId(profileId.value), {
|
.post(config.API.profileTrainId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -909,7 +907,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileTrainId(id.value), {
|
.put(config.API.profileTrainId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -948,7 +946,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileTrainId(id.value))
|
.delete(config.API.profileTrainId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1068,7 +1066,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileTrainHisId(row.id))
|
.get(config.API.profileTrainHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1096,7 +1094,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
import { useComponentProfileDataStore } from "@/components/information/store/store";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/components/information/Table.vue";
|
import ProfileTable from "@/components/information/Table.vue";
|
||||||
import DialogHeader from "@/components/information/DialogHeader.vue";
|
import DialogHeader from "@/components/information/DialogHeader.vue";
|
||||||
import DialogFooter from "@/components/information/DialogFooter.vue";
|
import DialogFooter from "@/components/information/DialogFooter.vue";
|
||||||
|
|
@ -329,10 +329,9 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useComponentProfileDataStore();
|
const store = useComponentProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const dateStart = ref<Date>(new Date());
|
const dateStart = ref<Date>(new Date());
|
||||||
|
|
@ -555,7 +554,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileDutyId(profileId.value))
|
.get(config.API.profileDutyId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -580,7 +579,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -671,7 +670,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileDutyId(profileId.value), {
|
.post(config.API.profileDutyId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -700,7 +699,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileDutyId(id.value), {
|
.put(config.API.profileDutyId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -736,7 +735,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileDutyId(id.value))
|
.delete(config.API.profileDutyId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -848,7 +847,7 @@ const clickEditRow = () => {
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileDutyHisId(row.id))
|
.get(config.API.profileDutyHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -873,7 +872,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,8 @@
|
||||||
color="red"
|
color="red"
|
||||||
@click="cancelClick()"
|
@click="cancelClick()"
|
||||||
label="ยกเลิกแก้ไข"
|
label="ยกเลิกแก้ไข"
|
||||||
> <!-- icon="mdi-undo"
|
>
|
||||||
|
<!-- icon="mdi-undo"
|
||||||
<q-tooltip>ยกเลิก</q-tooltip> -->
|
<q-tooltip>ยกเลิก</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -130,7 +131,8 @@
|
||||||
color="red"
|
color="red"
|
||||||
@click="deleteClick()"
|
@click="deleteClick()"
|
||||||
label="ลบวันหยุด"
|
label="ลบวันหยุด"
|
||||||
> <!-- icon="mdi-delete"
|
>
|
||||||
|
<!-- icon="mdi-delete"
|
||||||
<q-tooltip>ลบ</q-tooltip> -->
|
<q-tooltip>ลบ</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -215,7 +217,6 @@ import type {
|
||||||
DataDateRowObject,
|
DataDateRowObject,
|
||||||
DataDateAddObject,
|
DataDateAddObject,
|
||||||
} from "@/modules/01_metadata/interface/request/Calendar";
|
} from "@/modules/01_metadata/interface/request/Calendar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dateYear: {
|
dateYear: {
|
||||||
|
|
@ -240,8 +241,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const store = useDataStore();
|
|
||||||
const { loaderPage } = store;
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
|
const { success, dateToISO, date2Thai, messageError, showLoader, hideLoader } =
|
||||||
mixin;
|
mixin;
|
||||||
|
|
|
||||||
|
|
@ -156,13 +156,8 @@
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="text-primary">
|
<q-card-actions align="right" class="text-primary">
|
||||||
<q-btn
|
<q-btn unelevated label="บันทึก" color="public" type="submit">
|
||||||
unelevated
|
<!-- icon="mdi-content-save-outline"
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
type="submit"
|
|
||||||
|
|
||||||
> <!-- icon="mdi-content-save-outline"
|
|
||||||
<q-tooltip>บันทึก</q-tooltip> -->
|
<q-tooltip>บันทึก</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -221,7 +216,6 @@ import type {
|
||||||
DataDateListsObject,
|
DataDateListsObject,
|
||||||
TabsObject,
|
TabsObject,
|
||||||
} from "@/modules/01_metadata/interface/request/Calendar";
|
} from "@/modules/01_metadata/interface/request/Calendar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dateYear: {
|
dateYear: {
|
||||||
|
|
@ -241,8 +235,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const store = useDataStore();
|
|
||||||
const { loaderPage } = store;
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const {
|
const {
|
||||||
success,
|
success,
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,6 @@ import type {
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/insignia/Insignia";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/insignia/Insignia";
|
||||||
import type { DataOption } from "@/modules/01_metadata/interface/index/Main";
|
import type { DataOption } from "@/modules/01_metadata/interface/index/Main";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -298,8 +297,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/insignia/InsigniaType";
|
} from "@/modules/01_metadata/interface/request/insignia/InsigniaType";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/insignia/InsigniaType";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/insignia/InsigniaType";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Agency";
|
} from "@/modules/01_metadata/interface/request/organization/Agency";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Agency";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Agency";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Fax";
|
} from "@/modules/01_metadata/interface/request/organization/Fax";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Fax";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Fax";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/GovernmentAgency";
|
} from "@/modules/01_metadata/interface/request/organization/GovernmentAgency";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/GovernmentAgency";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/GovernmentAgency";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Level";
|
} from "@/modules/01_metadata/interface/request/organization/Level";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Level";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Level";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Organization";
|
} from "@/modules/01_metadata/interface/request/organization/Organization";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Organization";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Organization";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -211,8 +210,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/ShortName";
|
} from "@/modules/01_metadata/interface/request/organization/ShortName";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/ShortName";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/ShortName";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -252,8 +251,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Status";
|
} from "@/modules/01_metadata/interface/request/organization/Status";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Status";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Status";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/TelExternal";
|
} from "@/modules/01_metadata/interface/request/organization/TelExternal";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/TelExternal";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/TelExternal";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/TelInternal";
|
} from "@/modules/01_metadata/interface/request/organization/TelInternal";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/TelInternal";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/TelInternal";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/organization/Type";
|
} from "@/modules/01_metadata/interface/request/organization/Type";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Type";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/organization/Type";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Blood";
|
} from "@/modules/01_metadata/interface/request/person/Blood";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Blood";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Blood";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -203,8 +202,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -13,25 +13,20 @@
|
||||||
>
|
>
|
||||||
<q-tooltip>กลับ</q-tooltip>
|
<q-tooltip>กลับ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
|
|
||||||
<div class="text-h6 text-dark text-weight-bold">การจัดการข้อมูลเขต</div>
|
<div class="text-h6 text-dark text-weight-bold">การจัดการข้อมูลเขต</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-breadcrumbs class="text-grey" active-color="blue">
|
<q-breadcrumbs class="text-grey" active-color="blue">
|
||||||
<template v-slot:separator>
|
<template v-slot:separator>
|
||||||
<q-icon
|
<q-icon size="1.2em" name="chevron_right" color="blue" />
|
||||||
size="1.2em"
|
|
||||||
name="chevron_right"
|
|
||||||
color="blue"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<q-breadcrumbs-el to="/metadata" label="การจัดการข้อมูลจังหวัด" />
|
<q-breadcrumbs-el to="/metadata" label="การจัดการข้อมูลจังหวัด" />
|
||||||
<q-breadcrumbs-el label="การจัดการข้อมูลเขต" />
|
<q-breadcrumbs-el label="การจัดการข้อมูลเขต" />
|
||||||
</q-breadcrumbs>
|
</q-breadcrumbs>
|
||||||
</div>
|
</div>
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
<q-card flat bordered class=" row col-12">
|
<q-card flat bordered class="row col-12">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="q-mt-sm">
|
<div class="q-mt-sm">
|
||||||
<data-table
|
<data-table
|
||||||
|
|
@ -247,14 +242,13 @@ import type {
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/District";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/District";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
|
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
|
||||||
const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเรียก api
|
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Education";
|
} from "@/modules/01_metadata/interface/request/person/Education";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Education";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Education";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Gender";
|
} from "@/modules/01_metadata/interface/request/person/Gender";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Gender";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Gender";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Prefix";
|
} from "@/modules/01_metadata/interface/request/person/Prefix";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Prefix";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Prefix";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ import type {
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Province";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Province";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
type: Function,
|
type: Function,
|
||||||
|
|
@ -212,8 +212,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเรียก api
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Relationship";
|
} from "@/modules/01_metadata/interface/request/person/Relationship";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Relationship";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Relationship";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/person/Religion";
|
} from "@/modules/01_metadata/interface/request/person/Religion";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Religion";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/Religion";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -14,19 +14,21 @@
|
||||||
<q-tooltip>กลับ</q-tooltip>
|
<q-tooltip>กลับ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<div class="text-h6 text-dark text-weight-bold">การจัดการข้อมูลแขวง/ตำบล</div>
|
<div class="text-h6 text-dark text-weight-bold">
|
||||||
|
การจัดการข้อมูลแขวง/ตำบล
|
||||||
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-breadcrumbs class="text-grey" active-color="blue">
|
<q-breadcrumbs class="text-grey" active-color="blue">
|
||||||
<template v-slot:separator>
|
<template v-slot:separator>
|
||||||
<q-icon
|
<q-icon size="1.2em" name="chevron_right" color="blue" />
|
||||||
size="1.2em"
|
|
||||||
name="chevron_right"
|
|
||||||
color="blue"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<q-breadcrumbs-el to="/metadata" label="การจัดการข้อมูลจังหวัด" />
|
<q-breadcrumbs-el to="/metadata" label="การจัดการข้อมูลจังหวัด" />
|
||||||
<q-breadcrumbs-el @click="goToProvince()" class="cursor-pointer" label="การจัดการข้อมูลเขต" />
|
<q-breadcrumbs-el
|
||||||
|
@click="goToProvince()"
|
||||||
|
class="cursor-pointer"
|
||||||
|
label="การจัดการข้อมูลเขต"
|
||||||
|
/>
|
||||||
<q-breadcrumbs-el label="การจัดการข้อมูลแขวง/ตำบล" />
|
<q-breadcrumbs-el label="การจัดการข้อมูลแขวง/ตำบล" />
|
||||||
</q-breadcrumbs>
|
</q-breadcrumbs>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -254,14 +256,13 @@ import type {
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/SubDistrict";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/person/SubDistrict";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
|
const { manageData, changeManageColumns, changeManageCurrentTab } = store;
|
||||||
const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเรียก api
|
|
||||||
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
const rows = ref<RequestItemsHistoryObject[]>([]); //list data table
|
||||||
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
const rowsHistory = ref<RequestItemsHistoryObject[]>([]); //select data history
|
||||||
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
const rawHistory = ref<RequestItemsHistoryObject[]>([]); //raw data history
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Executive";
|
} from "@/modules/01_metadata/interface/request/position/Executive";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Executive";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Executive";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/ExecutiveSide";
|
} from "@/modules/01_metadata/interface/request/position/ExecutiveSide";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/ExecutiveSide";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/ExecutiveSide";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -212,8 +211,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Level";
|
} from "@/modules/01_metadata/interface/request/position/Level";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Level";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Level";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -263,8 +262,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Line";
|
} from "@/modules/01_metadata/interface/request/position/Line";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Line";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Line";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Path";
|
} from "@/modules/01_metadata/interface/request/position/Path";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Path";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Path";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -212,8 +211,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/PathSide";
|
} from "@/modules/01_metadata/interface/request/position/PathSide";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/PathSide";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/PathSide";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -212,8 +211,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Status";
|
} from "@/modules/01_metadata/interface/request/position/Status";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Status";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Status";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/position/Type";
|
} from "@/modules/01_metadata/interface/request/position/Type";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Type";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/position/Type";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -200,8 +199,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/Group";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/Group";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Group";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Group";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/Level";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/Level";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Level";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Level";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/Line";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/Line";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Line";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Line";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/Position";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/Position";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Position";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Position";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -211,8 +210,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/PositionSide";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/PositionSide";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/PositionSide";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/PositionSide";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -211,8 +210,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,6 @@ import type {
|
||||||
} from "@/modules/01_metadata/interface/request/positionEmployee/Status";
|
} from "@/modules/01_metadata/interface/request/positionEmployee/Status";
|
||||||
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Status";
|
import type { ResponseHistoryObject } from "@/modules/01_metadata/interface/response/positionEmployee/Status";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
fetchDataComponent: {
|
fetchDataComponent: {
|
||||||
|
|
@ -199,8 +198,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
const { success, dateText, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,6 @@ import insigniaType from "@/modules/01_metadata/components/insignia/InsigniaType
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useManageDataStore } from "@/modules/01_metadata/store";
|
import { useManageDataStore } from "@/modules/01_metadata/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
DataSumCalendarObject,
|
DataSumCalendarObject,
|
||||||
|
|
@ -409,8 +408,6 @@ const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { genColor15, messageError, showLoader, hideLoader } = mixin;
|
const { genColor15, messageError, showLoader, hideLoader } = mixin;
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore; //ขึ้นหน้า load ขณะเรียก api
|
|
||||||
|
|
||||||
const visible = ref(true); //เปิดปิด card สรุปข้อมูล
|
const visible = ref(true); //เปิดปิด card สรุปข้อมูล
|
||||||
const link = ref<number>(store.manageData.link); //เลือก tab หลัก
|
const link = ref<number>(store.manageData.link); //เลือก tab หลัก
|
||||||
|
|
|
||||||
|
|
@ -217,12 +217,8 @@
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="text-primary">
|
<q-card-actions align="right" class="text-primary">
|
||||||
<q-btn
|
<q-btn unelevated label="บันทึก" color="public" type="submit">
|
||||||
unelevated
|
<!-- icon="mdi-content-save-outline"
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
type="submit"
|
|
||||||
> <!-- icon="mdi-content-save-outline"
|
|
||||||
<q-tooltip>บันทึก</q-tooltip> -->
|
<q-tooltip>บันทึก</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -314,12 +310,8 @@
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right" class="text-primary">
|
<q-card-actions align="right" class="text-primary">
|
||||||
<q-btn
|
<q-btn unelevated label="บันทึก" color="public" type="submit">
|
||||||
unelevated
|
<!-- icon="mdi-content-save-outline"
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
type="submit"
|
|
||||||
> <!-- icon="mdi-content-save-outline"
|
|
||||||
<q-tooltip>บันทึก</q-tooltip> -->
|
<q-tooltip>บันทึก</q-tooltip> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
|
|
@ -335,7 +327,7 @@ import { reactive, ref, watch } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useManageDataStore } from "@/modules/01_metadata/store";
|
import { useManageDataStore } from "@/modules/01_metadata/store";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -354,7 +346,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const {
|
const {
|
||||||
success,
|
success,
|
||||||
|
|
@ -366,7 +357,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
const { loaderPage } = dataStore; //รอโหลด
|
|
||||||
const store = useManageDataStore();
|
const store = useManageDataStore();
|
||||||
const $q = useQuasar(); //ใช้ noti quasar
|
const $q = useQuasar(); //ใช้ noti quasar
|
||||||
const currentTab = ref<string>(
|
const currentTab = ref<string>(
|
||||||
|
|
|
||||||
|
|
@ -432,15 +432,19 @@ import type { DataOption } from "@/modules/02_organizational/interface/index/Mai
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
import type { QTableProps } from "quasar";
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, modalConfirm, modalError, modalDelete } = mixin;
|
const {
|
||||||
|
success,
|
||||||
|
modalConfirm,
|
||||||
|
modalError,
|
||||||
|
modalDelete,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
const { date2Thai } = mixin;
|
const { date2Thai } = mixin;
|
||||||
const store = useOrganizationalDataStore();
|
const store = useOrganizationalDataStore();
|
||||||
const { organizationalData, changeOrganizationalColumns } = store;
|
const { organizationalData, changeOrganizationalColumns } = store;
|
||||||
|
|
@ -843,7 +847,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchPosition();
|
await fetchPosition();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
await fetchHistory();
|
await fetchHistory();
|
||||||
|
|
@ -853,7 +857,7 @@ onMounted(async () => {
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPostionMasterDraft(true))
|
.get(config.API.getPostionMasterDraft(true))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -897,7 +901,7 @@ const fetchData = async () => {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// updateData.value = false;
|
// updateData.value = false;
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -905,7 +909,7 @@ const fetchData = async () => {
|
||||||
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลทั้งหมด
|
* ฟังชั้นดูข้อมูลประวัติแก้ไขข้อมูลทั้งหมด
|
||||||
*/
|
*/
|
||||||
const fetchHistory = async () => {
|
const fetchHistory = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .get(config.API.listxxxxxxxxPublishedHistory)
|
// .get(config.API.listxxxxxxxxPublishedHistory)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
@ -937,7 +941,7 @@ const fetchHistory = async () => {
|
||||||
// statusCode.value = e.response.data.status;
|
// statusCode.value = e.response.data.status;
|
||||||
// })
|
// })
|
||||||
// .finally(async () => {
|
// .finally(async () => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -945,7 +949,7 @@ const fetchHistory = async () => {
|
||||||
* get รายการ ตำแหน่ง
|
* get รายการ ตำแหน่ง
|
||||||
*/
|
*/
|
||||||
const fetchPosition = async () => {
|
const fetchPosition = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.position)
|
.get(config.API.position)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1036,7 +1040,7 @@ const fetchPosition = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1185,7 +1189,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.getPositionMaster, {
|
.post(config.API.getPositionMaster, {
|
||||||
positionTypeId: positionTypeId.value,
|
positionTypeId: positionTypeId.value,
|
||||||
|
|
@ -1218,7 +1222,7 @@ const saveData = async () => {
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.getPositionMasterId(positionMasterId.value), {
|
.put(config.API.getPositionMasterId(positionMasterId.value), {
|
||||||
positionMasterId: positionMasterId.value,
|
positionMasterId: positionMasterId.value,
|
||||||
|
|
@ -1252,7 +1256,7 @@ const editData = async () => {
|
||||||
* เมื่อเรียก api เสร็จแล้วจะ get data มาใหม่
|
* เมื่อเรียก api เสร็จแล้วจะ get data มาใหม่
|
||||||
*/
|
*/
|
||||||
const clearPublishedData = async () => {
|
const clearPublishedData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.getPositionMasterSync)
|
.put(config.API.getPositionMasterSync)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1265,7 +1269,7 @@ const clearPublishedData = async () => {
|
||||||
statusCode.value = e.response.data.status;
|
statusCode.value = e.response.data.status;
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchHistory();
|
await fetchHistory();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
@ -1277,7 +1281,7 @@ const clearPublishedData = async () => {
|
||||||
*/
|
*/
|
||||||
const publishedData = async () => {
|
const publishedData = async () => {
|
||||||
// editvisible.value = false;
|
// editvisible.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.getPositionMasterPublish)
|
.put(config.API.getPositionMasterPublish)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1287,7 +1291,7 @@ const publishedData = async () => {
|
||||||
statusCode.value = e.response.data.status;
|
statusCode.value = e.response.data.status;
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -1383,7 +1387,7 @@ const clickAdd = () => {
|
||||||
* @param row ข้อมูล row ที่ดูประวัติการแก้ไข
|
* @param row ข้อมูล row ที่ดูประวัติการแก้ไข
|
||||||
*/
|
*/
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionMasterHistoryId(row.id))
|
.get(config.API.getPositionMasterHistoryId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1427,7 +1431,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1470,7 +1474,7 @@ const clickIsActive = async (val: string, status: boolean) => {
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
// edit.value = false;
|
// edit.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.getPositionMasterId(val) + `?Id=${val}`)
|
.delete(config.API.getPositionMasterId(val) + `?Id=${val}`)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,8 @@
|
||||||
import { ref, defineAsyncComponent, watch, onMounted } from "vue";
|
import { ref, defineAsyncComponent, watch, onMounted } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import type { PropType } from "vue";
|
import type { PropType } from "vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { DataOption } from "../../interface/index/Main";
|
import type { DataOption } from "../../interface/index/Main";
|
||||||
|
|
@ -382,8 +383,9 @@ import type { DataOption } from "../../interface/index/Main";
|
||||||
const ddNoResultMsg = defineAsyncComponent(
|
const ddNoResultMsg = defineAsyncComponent(
|
||||||
() => import("@/components/DropDownNoResultMsg.vue")
|
() => import("@/components/DropDownNoResultMsg.vue")
|
||||||
); //แสดงข้อความเมื่อ Dropdown Filter ไม่เจอข้อมูล
|
); //แสดงข้อความเมื่อ Dropdown Filter ไม่เจอข้อมูล
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
const mixin = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader } = mixin;
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const emit = defineEmits(["update:positions", "update:formprops"]);
|
const emit = defineEmits(["update:positions", "update:formprops"]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -430,12 +432,12 @@ const positionFilter = ref<Array<any>>([]); //for DropDown
|
||||||
const position = ref<Array<any>>([]); //for DropDown
|
const position = ref<Array<any>>([]); //for DropDown
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchPositionMaster();
|
await fetchPositionMaster();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchPositionMaster = async () => {
|
const fetchPositionMaster = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
// .get(config.API.getPostionMasterDraft(false))
|
// .get(config.API.getPostionMasterDraft(false))
|
||||||
.get(config.API.getPostionMaster(false))
|
.get(config.API.getPostionMaster(false))
|
||||||
|
|
@ -476,7 +478,7 @@ const fetchPositionMaster = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -333,8 +333,9 @@ import type {
|
||||||
GovermentOption,
|
GovermentOption,
|
||||||
} from "../../interface/index/Main";
|
} from "../../interface/index/Main";
|
||||||
import { log } from "console";
|
import { log } from "console";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
// import { organizationSet } from "../interface/index/Main";
|
// import { organizationSet } from "../interface/index/Main";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
organizprops: Array as PropType<OrganizaOption[]>,
|
organizprops: Array as PropType<OrganizaOption[]>,
|
||||||
|
|
@ -343,8 +344,9 @@ const props = defineProps({
|
||||||
|
|
||||||
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
const mixin = useCounterMixin();
|
||||||
const { loaderPage } = dataStore;
|
const { showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
|
|
||||||
|
|
@ -381,7 +383,7 @@ const organizationAgencyCode = ref<GovermentOption[]>([]);
|
||||||
const organizationAgencyCodeFilter = ref<GovermentOption[]>([]);
|
const organizationAgencyCodeFilter = ref<GovermentOption[]>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchOrganizationOri();
|
await fetchOrganizationOri();
|
||||||
await fetchOrganizationAgencyCode();
|
await fetchOrganizationAgencyCode();
|
||||||
await fetchOrganizationGovernmentCode();
|
await fetchOrganizationGovernmentCode();
|
||||||
|
|
@ -400,7 +402,7 @@ onMounted(async () => {
|
||||||
* หน่วยงาน
|
* หน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationOri = async () => {
|
const fetchOrganizationOri = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organization)
|
.get(config.API.organization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -416,14 +418,14 @@ const fetchOrganizationOri = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* รหัสหน่วยงาน
|
* รหัสหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgencyCode = async () => {
|
const fetchOrganizationAgencyCode = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationCode)
|
.get(config.API.organizationCode)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -445,14 +447,14 @@ const fetchOrganizationAgencyCode = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* รหัสส่วนราชการ
|
* รหัสส่วนราชการ
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationGovernmentCode = async () => {
|
const fetchOrganizationGovernmentCode = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationShortName)
|
.get(config.API.organizationShortName)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -474,14 +476,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// /**
|
// /**
|
||||||
// * ชื่อย่อหน่วยงาน
|
// * ชื่อย่อหน่วยงาน
|
||||||
// */
|
// */
|
||||||
// const fetchOrganizationShortName = async () => {
|
// const fetchOrganizationShortName = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .get(config.API.organizationShortName)
|
// .get(config.API.organizationShortName)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
@ -503,14 +505,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
// })
|
// })
|
||||||
// .finally(() => {
|
// .finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
// });
|
// });
|
||||||
// };
|
// };
|
||||||
/**
|
/**
|
||||||
* หน่วยงานต้นสังกัด
|
* หน่วยงานต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgency = async () => {
|
const fetchOrganizationAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -529,14 +531,14 @@ const fetchOrganizationAgency = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* ส่วนราชการต้นสังกัด
|
* ส่วนราชการต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationGovernmentAgency = async () => {
|
const fetchOrganizationGovernmentAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -555,14 +557,14 @@ const fetchOrganizationGovernmentAgency = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* ประเภทหน่วยงาน
|
* ประเภทหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationType = async () => {
|
const fetchOrganizationType = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationType)
|
.get(config.API.organizationType)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -578,14 +580,14 @@ const fetchOrganizationType = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* ระดับหน่วยงาน
|
* ระดับหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationLevel = async () => {
|
const fetchOrganizationLevel = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationLevel)
|
.get(config.API.organizationLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -601,14 +603,14 @@ const fetchOrganizationLevel = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์ติดต่อภายใน
|
* เบอร์ติดต่อภายใน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationTelInternal = async () => {
|
const fetchOrganizationTelInternal = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationTelInternal)
|
.get(config.API.organizationTelInternal)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -624,14 +626,14 @@ const fetchOrganizationTelInternal = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์ติดต่อภายนอก
|
* เบอร์ติดต่อภายนอก
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationTelExternal = async () => {
|
const fetchOrganizationTelExternal = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationTelExternal)
|
.get(config.API.organizationTelExternal)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -647,14 +649,14 @@ const fetchOrganizationTelExternal = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์โทรสาร
|
* เบอร์โทรสาร
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationFax = async () => {
|
const fetchOrganizationFax = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationFax)
|
.get(config.API.organizationFax)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -670,7 +672,7 @@ const fetchOrganizationFax = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -772,7 +774,7 @@ const addOrganizationItem = async () => {
|
||||||
|
|
||||||
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||||
let option: GovermentOption[] = [];
|
let option: GovermentOption[] = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationGovernmentCode(val))
|
.get(config.API.organizationGovernmentCode(val))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -792,14 +794,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||||
let option: GovermentOption[] = [];
|
let option: GovermentOption[] = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationAgencyCode(val))
|
.get(config.API.organizationAgencyCode(val))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -819,7 +821,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -310,9 +310,13 @@ import type {
|
||||||
GovermentOption,
|
GovermentOption,
|
||||||
} from "../../interface/index/Main";
|
} from "../../interface/index/Main";
|
||||||
import { log } from "console";
|
import { log } from "console";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import type { EnumStringMember } from "@babel/types";
|
import type { EnumStringMember } from "@babel/types";
|
||||||
// import { organizationSet } from "../interface/index/Main";
|
// import { organizationSet } from "../interface/index/Main";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
organizprops: Object as PropType<OrganizaOption>,
|
organizprops: Object as PropType<OrganizaOption>,
|
||||||
|
|
@ -323,8 +327,6 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
|
|
@ -393,7 +395,7 @@ const organization = ref<OrganizaOption>({
|
||||||
emit("update:organizprops", organization.value);
|
emit("update:organizprops", organization.value);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
// await fillOrgEdit(); //มาแค่ตรง selector(q-select)
|
// await fillOrgEdit(); //มาแค่ตรง selector(q-select)
|
||||||
await fetchOrganizationOri();
|
await fetchOrganizationOri();
|
||||||
// await fetchOrganizationShortName();
|
// await fetchOrganizationShortName();
|
||||||
|
|
@ -427,7 +429,7 @@ const getClass = (val: boolean) => {
|
||||||
* @param node node that you want to edit data
|
* @param node node that you want to edit data
|
||||||
*/
|
*/
|
||||||
const fillOrgEdit = async () => {
|
const fillOrgEdit = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getOrgDraft(props.org.organizationId))
|
.get(config.API.getOrgDraft(props.org.organizationId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -499,7 +501,7 @@ const fillOrgEdit = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
console.log("success");
|
console.log("success");
|
||||||
};
|
};
|
||||||
|
|
@ -508,7 +510,7 @@ const fillOrgEdit = async () => {
|
||||||
* หน่วยงาน
|
* หน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationOri = async () => {
|
const fetchOrganizationOri = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organization)
|
.get(config.API.organization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -524,14 +526,14 @@ const fetchOrganizationOri = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* รหัสหน่วยงาน
|
* รหัสหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgencyCode = async () => {
|
const fetchOrganizationAgencyCode = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationCode)
|
.get(config.API.organizationCode)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -553,14 +555,14 @@ const fetchOrganizationAgencyCode = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* รหัสส่วนราชการ
|
* รหัสส่วนราชการ
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationGovernmentCode = async () => {
|
const fetchOrganizationGovernmentCode = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationShortName)
|
.get(config.API.organizationShortName)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -585,14 +587,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// /**
|
// /**
|
||||||
// * ชื่อย่อหน่วยงาน
|
// * ชื่อย่อหน่วยงาน
|
||||||
// */
|
// */
|
||||||
// const fetchOrganizationShortName = async () => {
|
// const fetchOrganizationShortName = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
// await http
|
// await http
|
||||||
// .get(config.API.organizationShortName)
|
// .get(config.API.organizationShortName)
|
||||||
// .then((res) => {
|
// .then((res) => {
|
||||||
|
|
@ -614,14 +616,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
// })
|
// })
|
||||||
// .finally(() => {
|
// .finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
// });
|
// });
|
||||||
// };
|
// };
|
||||||
/**
|
/**
|
||||||
* หน่วยงานต้นสังกัด
|
* หน่วยงานต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgency = async () => {
|
const fetchOrganizationAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
// .get(config.API.organizationAgency)
|
// .get(config.API.organizationAgency)
|
||||||
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
||||||
|
|
@ -641,14 +643,14 @@ const fetchOrganizationAgency = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* ส่วนราชการต้นสังกัด
|
* ส่วนราชการต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationGovernmentAgency = async () => {
|
const fetchOrganizationGovernmentAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
// .get(config.API.organizationGovernmentAgency)
|
// .get(config.API.organizationGovernmentAgency)
|
||||||
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
||||||
|
|
@ -669,14 +671,14 @@ const fetchOrganizationGovernmentAgency = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* ประเภทหน่วยงาน
|
* ประเภทหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationType = async () => {
|
const fetchOrganizationType = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationType)
|
.get(config.API.organizationType)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -692,7 +694,7 @@ const fetchOrganizationType = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -700,7 +702,7 @@ const fetchOrganizationType = async () => {
|
||||||
* สถานะหน่วยงาน
|
* สถานะหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationStatus = async () => {
|
const fetchOrganizationStatus = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationStatus)
|
.get(config.API.organizationStatus)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -716,7 +718,7 @@ const fetchOrganizationStatus = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -724,7 +726,7 @@ const fetchOrganizationStatus = async () => {
|
||||||
* ระดับหน่วยงาน
|
* ระดับหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationLevel = async () => {
|
const fetchOrganizationLevel = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationLevel)
|
.get(config.API.organizationLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -740,14 +742,14 @@ const fetchOrganizationLevel = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์ติดต่อภายใน
|
* เบอร์ติดต่อภายใน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationTelInternal = async () => {
|
const fetchOrganizationTelInternal = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationTelInternal)
|
.get(config.API.organizationTelInternal)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -763,14 +765,14 @@ const fetchOrganizationTelInternal = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์ติดต่อภายนอก
|
* เบอร์ติดต่อภายนอก
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationTelExternal = async () => {
|
const fetchOrganizationTelExternal = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationTelExternal)
|
.get(config.API.organizationTelExternal)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -786,14 +788,14 @@ const fetchOrganizationTelExternal = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* เบอร์โทรสาร
|
* เบอร์โทรสาร
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationFax = async () => {
|
const fetchOrganizationFax = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationFax)
|
.get(config.API.organizationFax)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -809,13 +811,13 @@ const fetchOrganizationFax = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||||
let option: GovermentOption[] = [];
|
let option: GovermentOption[] = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationGovernmentCode(val))
|
.get(config.API.organizationGovernmentCode(val))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -835,14 +837,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||||
let option: GovermentOption[] = [];
|
let option: GovermentOption[] = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationAgencyCode(val))
|
.get(config.API.organizationAgencyCode(val))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -862,7 +864,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,13 @@ import config from "@/app.config";
|
||||||
|
|
||||||
import { OrgChart } from "bma-org-chart";
|
import { OrgChart } from "bma-org-chart";
|
||||||
import "bma-org-chart/org-chart.css";
|
import "bma-org-chart/org-chart.css";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import chartData from "@/assets/orgChartData";
|
import chartData from "@/assets/orgChartData";
|
||||||
|
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const dataSource = ref(chartData);
|
const dataSource = ref(chartData);
|
||||||
// const dataSource = ref() // ข้อมูล Chart
|
// const dataSource = ref() // ข้อมูล Chart
|
||||||
|
|
||||||
|
|
@ -21,8 +26,6 @@ const savePDF = () => {
|
||||||
chartRef.value.savePDF();
|
chartRef.value.savePDF();
|
||||||
};
|
};
|
||||||
|
|
||||||
const loader = ref<boolean>(false); //รอโหลด
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchTreeRoot();
|
await fetchTreeRoot();
|
||||||
await fetchOrgChart();
|
await fetchOrgChart();
|
||||||
|
|
@ -32,7 +35,7 @@ onMounted(async () => {
|
||||||
* อ่าน Root ของข้อมูลทั้งหมดก่อน
|
* อ่าน Root ของข้อมูลทั้งหมดก่อน
|
||||||
*/
|
*/
|
||||||
const fetchTreeRoot = async () => {
|
const fetchTreeRoot = async () => {
|
||||||
loader.value = true;
|
showLoader();
|
||||||
let urlRequest = config.API.chartGetTreeRoot;
|
let urlRequest = config.API.chartGetTreeRoot;
|
||||||
await http
|
await http
|
||||||
.get(urlRequest)
|
.get(urlRequest)
|
||||||
|
|
@ -45,12 +48,12 @@ const fetchTreeRoot = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loader.value = false;
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchOrgChart = async () => {
|
const fetchOrgChart = async () => {
|
||||||
loader.value = true;
|
showLoader();
|
||||||
let urlRequest = config.API.chartGetOrg(rootOrgID.value);
|
let urlRequest = config.API.chartGetOrg(rootOrgID.value);
|
||||||
await http
|
await http
|
||||||
.get(urlRequest)
|
.get(urlRequest)
|
||||||
|
|
@ -65,7 +68,7 @@ const fetchOrgChart = async () => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loader.value = false;
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -111,7 +114,6 @@ const refreshChart = async (data: any) => {
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
<full-loader :visibility="loader"></full-loader>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -1,123 +1,123 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายงานบัญชี</div>
|
<div class="toptitle text-dark col-12 row items-center">รายงานบัญชี</div>
|
||||||
<q-card flat bordered class="col-12">
|
<q-card flat bordered class="col-12">
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
no-caps
|
no-caps
|
||||||
inline-label
|
inline-label
|
||||||
align="left"
|
align="left"
|
||||||
class="text-primary"
|
class="text-primary"
|
||||||
>
|
>
|
||||||
<q-tab name="audit1" label="บัญชี 1" />
|
<q-tab name="audit1" label="บัญชี 1" />
|
||||||
<q-tab name="audit2" label="บัญชี 2" />
|
<q-tab name="audit2" label="บัญชี 2" />
|
||||||
<q-tab name="audit3" label="บัญชี 3" />
|
<q-tab name="audit3" label="บัญชี 3" />
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
transition-prev="jump-up"
|
transition-prev="jump-up"
|
||||||
transition-next="jump-up"
|
transition-next="jump-up"
|
||||||
animated
|
animated
|
||||||
swipeable
|
swipeable
|
||||||
class="row col-12 text-dark"
|
class="row col-12 text-dark"
|
||||||
>
|
>
|
||||||
<q-tab-panel name="audit1">
|
<q-tab-panel name="audit1">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
v-model="goverment"
|
v-model="goverment"
|
||||||
label="ระบุหน่วยงานที่ต้องการออกรายงาน"
|
label="ระบุหน่วยงานที่ต้องการออกรายงาน"
|
||||||
dense
|
dense
|
||||||
:options="govermentOP"
|
:options="govermentOP"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="clickAccount1"
|
@click="clickAccount1"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="audit2">
|
<q-tab-panel name="audit2">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
v-model="goverment"
|
v-model="goverment"
|
||||||
label="ระบุรหัสส่วนราชการ"
|
label="ระบุรหัสส่วนราชการ"
|
||||||
dense
|
dense
|
||||||
:options="govermentOP"
|
:options="govermentOP"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="clickAccount2"
|
@click="clickAccount2"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="audit3">
|
<q-tab-panel name="audit3">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
v-model="goverment"
|
v-model="goverment"
|
||||||
label="ระบุรหัสส่วนราชการ"
|
label="ระบุรหัสส่วนราชการ"
|
||||||
dense
|
dense
|
||||||
:options="govermentOP"
|
:options="govermentOP"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
:borderless="false"
|
:borderless="false"
|
||||||
:outlined="true"
|
:outlined="true"
|
||||||
:hide-dropdown-icon="false"
|
:hide-dropdown-icon="false"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="md"
|
size="md"
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="clickAccount3"
|
@click="clickAccount3"
|
||||||
>
|
>
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
<!-- <viewpdf
|
<!-- <viewpdf
|
||||||
:src="pdfSrc"
|
:src="pdfSrc"
|
||||||
:currentpage="pdfCurrentPage"
|
:currentpage="pdfCurrentPage"
|
||||||
:totalpage="pdfTotalPage" /> -->
|
:totalpage="pdfTotalPage" /> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, computed, ref, watch } from "vue";
|
import { onMounted, computed, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
||||||
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
||||||
|
|
@ -128,11 +128,10 @@ import type { RequestReport2 } from "@/modules/02_organizational/interface/reque
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, modalError, modalWarning } = mixin;
|
const { messageError, modalError, modalWarning, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO } = mixin;
|
const { date2Thai, success, dateToISO } = mixin;
|
||||||
|
|
@ -143,112 +142,112 @@ const goverment = ref<any>();
|
||||||
const tab = ref<string>("audit1");
|
const tab = ref<string>("audit1");
|
||||||
|
|
||||||
const clickAccount1 = async () => {
|
const clickAccount1 = async () => {
|
||||||
if (goverment.value === null || goverment.value === undefined) {
|
if (goverment.value === null || goverment.value === undefined) {
|
||||||
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getReportAccount1(goverment.value?.value as string), {
|
.get(config.API.getReportAccount1(goverment.value?.value as string), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
var a = document.createElement("a");
|
var a = document.createElement("a");
|
||||||
a.href = URL.createObjectURL(res.data);
|
a.href = URL.createObjectURL(res.data);
|
||||||
a.download = `รายงานบัญชี1_${goverment.value?.label}.pdf`;
|
a.download = `รายงานบัญชี1_${goverment.value?.label}.pdf`;
|
||||||
// start download
|
// start download
|
||||||
a.click();
|
a.click();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
// window.open(config.API.getReportAccount1(goverment.value));
|
// window.open(config.API.getReportAccount1(goverment.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAccount2 = async () => {
|
const clickAccount2 = async () => {
|
||||||
if (goverment.value === null || goverment.value === undefined) {
|
if (goverment.value === null || goverment.value === undefined) {
|
||||||
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getReportAccount2(goverment.value?.value as string), {
|
.get(config.API.getReportAccount2(goverment.value?.value as string), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
var a = document.createElement("a");
|
var a = document.createElement("a");
|
||||||
a.href = URL.createObjectURL(res.data);
|
a.href = URL.createObjectURL(res.data);
|
||||||
a.download = `รายงานบัญชี2_${goverment.value?.label}.pdf`;
|
a.download = `รายงานบัญชี2_${goverment.value?.label}.pdf`;
|
||||||
// start download
|
// start download
|
||||||
a.click();
|
a.click();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
//window.open(config.API.getReportAccount2(goverment.value));
|
//window.open(config.API.getReportAccount2(goverment.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickAccount3 = async () => {
|
const clickAccount3 = async () => {
|
||||||
if (goverment.value === null || goverment.value === undefined) {
|
if (goverment.value === null || goverment.value === undefined) {
|
||||||
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
modalWarning($q, "คำเตือน", "กรุณาเลือกหน่วยงานที่ต้องการออกรายงาน!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getReportAccount3(goverment.value?.value as string), {
|
.get(config.API.getReportAccount3(goverment.value?.value as string), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
var a = document.createElement("a");
|
var a = document.createElement("a");
|
||||||
a.href = URL.createObjectURL(res.data);
|
a.href = URL.createObjectURL(res.data);
|
||||||
a.download = `รายงานบัญชี3_${goverment.value?.label}.pdf`;
|
a.download = `รายงานบัญชี3_${goverment.value?.label}.pdf`;
|
||||||
// start download
|
// start download
|
||||||
a.click();
|
a.click();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
// window.open(config.API.getReportAccount3(goverment.value));
|
// window.open(config.API.getReportAccount3(goverment.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchOrganizationAgency = async () => {
|
const fetchOrganizationAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
// .get(config.API.organizationAgency)
|
// .get(config.API.organizationAgency)
|
||||||
.get(config.API.getOCType)
|
.get(config.API.getOCType)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: any[] = [];
|
let option: any[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({
|
option.push({
|
||||||
value: r.organizationId.toString(),
|
value: r.organizationId.toString(),
|
||||||
label: r.organizationName.toString(),
|
label: r.organizationName.toString(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
govermentOP.value = option;
|
govermentOP.value = option;
|
||||||
govermentOPfilter.value = option;
|
govermentOPfilter.value = option;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchOrganizationAgency();
|
await fetchOrganizationAgency();
|
||||||
console.log(govermentOP.value);
|
console.log(govermentOP.value);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -5,84 +5,88 @@ import { ref, onMounted } from "vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
import { StructChart } from "structure-chart";
|
||||||
|
import "structure-chart/structure-chart.css";
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
import { StructChart } from 'structure-chart'
|
const mixin = useCounterMixin();
|
||||||
import 'structure-chart/structure-chart.css'
|
const { showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
// import chartData from '@/assets/structChartData'
|
// import chartData from '@/assets/structChartData'
|
||||||
// const dataSource = ref(chartData)
|
// const dataSource = ref(chartData)
|
||||||
const dataSource = ref() // ข้อมูล Chart
|
const dataSource = ref(); // ข้อมูล Chart
|
||||||
const rootOrgID = ref() // org id ของ root ตัวปัจจุบันที่เลือกอยู่
|
const rootOrgID = ref(); // org id ของ root ตัวปัจจุบันที่เลือกอยู่
|
||||||
const dataSourceLock = ref() // ข้อมูลตั้งต้นของ Chart ใช้ให้กดกลับไปที่ home
|
const dataSourceLock = ref(); // ข้อมูลตั้งต้นของ Chart ใช้ให้กดกลับไปที่ home
|
||||||
const chartRef = ref() // อ้างอิงไปที่ตัว chart
|
const chartRef = ref(); // อ้างอิงไปที่ตัว chart
|
||||||
const savePNG = () => {
|
const savePNG = () => {
|
||||||
chartRef.value.savePNG()
|
chartRef.value.savePNG();
|
||||||
}
|
};
|
||||||
const savePDF = () => {
|
const savePDF = () => {
|
||||||
chartRef.value.savePDF()
|
chartRef.value.savePDF();
|
||||||
}
|
};
|
||||||
|
|
||||||
const loader = ref<boolean>(false) // Loader
|
const loader = ref<boolean>(false); // Loader
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async () => {
|
||||||
await fetchTreeRoot()
|
await fetchTreeRoot();
|
||||||
await fetchStructChart()
|
await fetchStructChart();
|
||||||
})
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* อ่าน Root ของข้อมูลทั้งหมดจาก API ต้องทำเป็นอันดับแรก เพื่อจะได้รู้รากของข้อมูล
|
* อ่าน Root ของข้อมูลทั้งหมดจาก API ต้องทำเป็นอันดับแรก เพื่อจะได้รู้รากของข้อมูล
|
||||||
*/
|
*/
|
||||||
const fetchTreeRoot = async () => {
|
const fetchTreeRoot = async () => {
|
||||||
loader.value = true
|
showLoader();
|
||||||
let urlRequest = config.API.chartGetTreeRoot
|
let urlRequest = config.API.chartGetTreeRoot;
|
||||||
await http.get(urlRequest)
|
await http
|
||||||
.then((response) => {
|
.get(urlRequest)
|
||||||
if (response.data.result.length > 0) {
|
.then((response) => {
|
||||||
rootOrgID.value = response.data.result[0].organizationId
|
if (response.data.result.length > 0) {
|
||||||
}
|
rootOrgID.value = response.data.result[0].organizationId;
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
})
|
||||||
console.log(e)
|
.catch((e) => {
|
||||||
})
|
console.log(e);
|
||||||
.finally(() => {
|
})
|
||||||
loader.value = false
|
.finally(() => {
|
||||||
})
|
hideLoader();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* อ่านข้อมูล organization id ปัจจุบันจาก API ข้อมูลที่ได้เอามาสร้าง Structure Chart
|
* อ่านข้อมูล organization id ปัจจุบันจาก API ข้อมูลที่ได้เอามาสร้าง Structure Chart
|
||||||
*/
|
*/
|
||||||
const fetchStructChart = async () => {
|
const fetchStructChart = async () => {
|
||||||
loader.value = true
|
showLoader();
|
||||||
let urlRequest = config.API.chartGetStructure(rootOrgID.value)
|
let urlRequest = config.API.chartGetStructure(rootOrgID.value);
|
||||||
await http.get(urlRequest)
|
await http
|
||||||
.then((response) => {
|
.get(urlRequest)
|
||||||
if (response.data.result.length > 0) {
|
.then((response) => {
|
||||||
dataSource.value = response.data.result[0]
|
if (response.data.result.length > 0) {
|
||||||
if (dataSourceLock.value === undefined)
|
dataSource.value = response.data.result[0];
|
||||||
dataSourceLock.value = dataSource.value
|
if (dataSourceLock.value === undefined)
|
||||||
breadcrumbsGen()
|
dataSourceLock.value = dataSource.value;
|
||||||
}
|
breadcrumbsGen();
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
})
|
||||||
console.log(e)
|
.catch((e) => {
|
||||||
})
|
console.log(e);
|
||||||
.finally(() => {
|
})
|
||||||
loader.value = false
|
.finally(() => {
|
||||||
})
|
hideLoader();
|
||||||
}
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* เมื่อมีการคลิกที่ Chart ให้อ่าน ID ของหน่วยงานที่ถูกคลิก แล้วดึงข้อมูล Chart ของหน่วยงานนั้น ๆ จาก API
|
* เมื่อมีการคลิกที่ Chart ให้อ่าน ID ของหน่วยงานที่ถูกคลิก แล้วดึงข้อมูล Chart ของหน่วยงานนั้น ๆ จาก API
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const refreshChart = async (data: any) => {
|
const refreshChart = async (data: any) => {
|
||||||
if (data.value !== undefined)
|
if (data.value !== undefined) rootOrgID.value = data.value;
|
||||||
rootOrgID.value = data.value
|
else rootOrgID.value = data;
|
||||||
else rootOrgID.value = data
|
if (rootOrgID.value !== 0) await fetchStructChart();
|
||||||
if (rootOrgID.value !== 0) await fetchStructChart()
|
if (data.value !== undefined) data.value = 0;
|
||||||
if (data.value !== undefined) data.value = 0
|
};
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* === กระบวนการสร้าง Path ===
|
* === กระบวนการสร้าง Path ===
|
||||||
|
|
@ -93,133 +97,142 @@ const refreshChart = async (data: any) => {
|
||||||
* @param chart Array ของ Object ของหน่วยงานย่อยใน Tree นั้น ๆ
|
* @param chart Array ของ Object ของหน่วยงานย่อยใน Tree นั้น ๆ
|
||||||
*/
|
*/
|
||||||
const chartTraverse = (id: any, chart: any): any => {
|
const chartTraverse = (id: any, chart: any): any => {
|
||||||
let _returnPath = []
|
let _returnPath = [];
|
||||||
for (const child of chart) {
|
for (const child of chart) {
|
||||||
if (child.deptID === id) {
|
if (child.deptID === id) {
|
||||||
_returnPath.push({
|
_returnPath.push({
|
||||||
label: child.departmentName,
|
label: child.departmentName,
|
||||||
id: child.deptID
|
id: child.deptID,
|
||||||
})
|
});
|
||||||
return _returnPath
|
return _returnPath;
|
||||||
} else {
|
} else {
|
||||||
if (typeof child.children !== "undefined" &&
|
if (
|
||||||
child.children !== null &&
|
typeof child.children !== "undefined" &&
|
||||||
child.children.length > 0) {
|
child.children !== null &&
|
||||||
let _result = chartTraverse(id, child.children)
|
child.children.length > 0
|
||||||
if (typeof _result !== "undefined" && _result !== null) {
|
) {
|
||||||
_returnPath.push({
|
let _result = chartTraverse(id, child.children);
|
||||||
label: child.departmentName,
|
if (typeof _result !== "undefined" && _result !== null) {
|
||||||
id: child.deptID
|
_returnPath.push({
|
||||||
})
|
label: child.departmentName,
|
||||||
return [..._returnPath, ...(_result ?? [])]
|
id: child.deptID,
|
||||||
}
|
});
|
||||||
}
|
return [..._returnPath, ...(_result ?? [])];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const findPath = (id: any) => {
|
const findPath = (id: any) => {
|
||||||
let _path = []
|
let _path = [];
|
||||||
_path.push({
|
_path.push({
|
||||||
label: dataSourceLock.value.departmentName,
|
label: dataSourceLock.value.departmentName,
|
||||||
id: dataSourceLock.value.deptID
|
id: dataSourceLock.value.deptID,
|
||||||
})
|
});
|
||||||
if (dataSourceLock.value.deptID === id) return _path
|
if (dataSourceLock.value.deptID === id) return _path;
|
||||||
if (dataSourceLock.value.children.length > 0) {
|
if (dataSourceLock.value.children.length > 0) {
|
||||||
let _returnPath = chartTraverse(id, dataSourceLock.value.children)
|
let _returnPath = chartTraverse(id, dataSourceLock.value.children);
|
||||||
return [..._path, ...(_returnPath ?? [])]
|
return [..._path, ...(_returnPath ?? [])];
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const theBreadcrumb = ref()
|
const theBreadcrumb = ref();
|
||||||
/**
|
/**
|
||||||
* สร้าง Path Breadcrumbs
|
* สร้าง Path Breadcrumbs
|
||||||
*/
|
*/
|
||||||
const breadcrumbsGen = () => {
|
const breadcrumbsGen = () => {
|
||||||
if (rootOrgID.value !== 0) {
|
if (rootOrgID.value !== 0) {
|
||||||
theBreadcrumb.value = []
|
theBreadcrumb.value = [];
|
||||||
const newPath = findPath(rootOrgID.value)
|
const newPath = findPath(rootOrgID.value);
|
||||||
theBreadcrumb.value = newPath
|
theBreadcrumb.value = newPath;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">แผนภูมิโครงสร้าง</div>
|
<div class="toptitle text-dark col-12 row items-center">แผนภูมิโครงสร้าง</div>
|
||||||
<div class="text-dark">
|
<div class="text-dark">
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm">
|
||||||
<div class="q-pa-sm row wrap items-center">
|
<div class="q-pa-sm row wrap items-center">
|
||||||
<q-btn flat round color="primary" @click="savePNG()" icon="mdi-image">
|
<q-btn flat round color="primary" @click="savePNG()" icon="mdi-image">
|
||||||
<q-tooltip>
|
<q-tooltip> ดาวน์โหลด PNG </q-tooltip>
|
||||||
ดาวน์โหลด PNG
|
</q-btn>
|
||||||
</q-tooltip>
|
<q-btn
|
||||||
</q-btn>
|
flat
|
||||||
<q-btn flat round color="red-7" @click="savePDF()" icon="mdi-file-pdf-box">
|
round
|
||||||
<q-tooltip>
|
color="red-7"
|
||||||
ดาวน์โหลด PDF
|
@click="savePDF()"
|
||||||
</q-tooltip>
|
icon="mdi-file-pdf-box"
|
||||||
</q-btn>
|
>
|
||||||
<div class="bg-grey-2 q-py-xs q-px-sm rounded-borders">
|
<q-tooltip> ดาวน์โหลด PDF </q-tooltip>
|
||||||
<q-breadcrumbs>
|
</q-btn>
|
||||||
<template v-slot:separator>
|
<div class="bg-grey-2 q-py-xs q-px-sm rounded-borders">
|
||||||
<q-icon
|
<q-breadcrumbs>
|
||||||
size="1.5em"
|
<template v-slot:separator>
|
||||||
name="chevron_right"
|
<q-icon size="1.5em" name="chevron_right" color="primary" />
|
||||||
color="primary" />
|
</template>
|
||||||
</template>
|
<template v-for="link in theBreadcrumb" :key="link.id">
|
||||||
<template v-for="link in theBreadcrumb" :key="link.id">
|
<q-breadcrumbs-el
|
||||||
<q-breadcrumbs-el :label="link.label" @click="refreshChart(link.id)" class="breadcrumbs-link"/>
|
:label="link.label"
|
||||||
</template>
|
@click="refreshChart(link.id)"
|
||||||
</q-breadcrumbs>
|
class="breadcrumbs-link"
|
||||||
</div>
|
/>
|
||||||
</div>
|
</template>
|
||||||
<q-separator/>
|
</q-breadcrumbs>
|
||||||
<div style="overflow-x: auto; overflow-y: auto" class="q-pt-md">
|
</div>
|
||||||
<StructChart
|
</div>
|
||||||
style="height: 70vh;"
|
<q-separator />
|
||||||
ref="chartRef"
|
<div style="overflow-x: auto; overflow-y: auto" class="q-pt-md">
|
||||||
class="struct"
|
<StructChart
|
||||||
:dataSource="dataSource"
|
style="height: 70vh"
|
||||||
@onElementClick="refreshChart"
|
ref="chartRef"
|
||||||
/>
|
class="struct"
|
||||||
</div>
|
:dataSource="dataSource"
|
||||||
</q-card>
|
@onElementClick="refreshChart"
|
||||||
</div>
|
/>
|
||||||
<full-loader :visibility="loader"></full-loader>
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
<full-loader :visibility="loader"></full-loader>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.breadcrumbs-link {
|
.breadcrumbs-link {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.struct .section-primary .header,.struct .section-secondary .header,.struct .section-tertiary .header {
|
.struct .section-primary .header,
|
||||||
font-size: 1rem !important;
|
.struct .section-secondary .header,
|
||||||
|
.struct .section-tertiary .header {
|
||||||
|
font-size: 1rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.struct .section-primary .column-side .side-button,.struct .section-secondary .column-side .side-button, .struct .section-list .column-side .side-button{
|
.struct .section-primary .column-side .side-button,
|
||||||
background-color: #d9d9d96b !important;
|
.struct .section-secondary .column-side .side-button,
|
||||||
color:#545459 !important;
|
.struct .section-list .column-side .side-button {
|
||||||
width: 25px !important;
|
background-color: #d9d9d96b !important;
|
||||||
height: 25px !important;
|
color: #545459 !important;
|
||||||
font-size: 11px !important;
|
width: 25px !important;
|
||||||
padding: 0px;
|
height: 25px !important;
|
||||||
|
font-size: 11px !important;
|
||||||
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.struct .section-primary, .section-secondary,.struct .section-list{
|
.struct .section-primary,
|
||||||
padding: 6px 15px 6px 15px;
|
.section-secondary,
|
||||||
|
.struct .section-list {
|
||||||
|
padding: 6px 15px 6px 15px;
|
||||||
}
|
}
|
||||||
.struct .section-primary .header{
|
.struct .section-primary .header {
|
||||||
font-weight: 600 !important;
|
font-weight: 600 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.struct .section-secondary .header{
|
.struct .section-secondary .header {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.struct .subchild-more {
|
||||||
.struct .subchild-more{
|
background-position: center !important;
|
||||||
background-position: center !important;
|
background-size: 14px !important;
|
||||||
background-size: 14px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -820,7 +820,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { OrganizaOption } from "../interface/index/Main";
|
import type { OrganizaOption } from "../interface/index/Main";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
// import manageApiErrorMsg from "@/global/user_response_msg";
|
// import manageApiErrorMsg from "@/global/user_response_msg";
|
||||||
import HistoryTable from "@/components/TableHistory.vue";
|
import HistoryTable from "@/components/TableHistory.vue";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
|
|
@ -857,11 +857,10 @@ const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
|
|
||||||
//Global Variable
|
//Global Variable
|
||||||
const store = useDataStore();
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
||||||
const { loaderPage } = store; //แสดง load windows ขณะเรียก api
|
const { success, messageError, dialogMessage, showLoader, hideLoader } = mixin;
|
||||||
const { success, messageError, dialogMessage } = mixin;
|
|
||||||
|
|
||||||
//Notification Component Variable
|
//Notification Component Variable
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
|
|
@ -1029,7 +1028,7 @@ const loadJsonTree = async (fileName: string) => {
|
||||||
manageApiErrorMsg(e);
|
manageApiErrorMsg(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1051,12 +1050,12 @@ const loadFileServer = async (node: any) => {
|
||||||
manageApiErrorMsg(e);
|
manageApiErrorMsg(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const isTreeHasDraft = async () => {
|
const isTreeHasDraft = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
let orgHasDraft = false;
|
let orgHasDraft = false;
|
||||||
let orgPoHasDraft = false;
|
let orgPoHasDraft = false;
|
||||||
await http
|
await http
|
||||||
|
|
@ -1072,7 +1071,7 @@ const isTreeHasDraft = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
await http
|
await http
|
||||||
|
|
@ -1088,7 +1087,7 @@ const isTreeHasDraft = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (orgHasDraft || orgPoHasDraft) {
|
if (orgHasDraft || orgPoHasDraft) {
|
||||||
|
|
@ -1103,7 +1102,7 @@ const isTreeHasDraft = async () => {
|
||||||
*/
|
*/
|
||||||
const fetchTreeRoot = async (isDraft: boolean) => {
|
const fetchTreeRoot = async (isDraft: boolean) => {
|
||||||
// console.log(isDraft);
|
// console.log(isDraft);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
console.log("Call API14 GetTreeRoot");
|
console.log("Call API14 GetTreeRoot");
|
||||||
isShowEditTree.value = isDraft; // to show same tree that we fetch
|
isShowEditTree.value = isDraft; // to show same tree that we fetch
|
||||||
let request = "";
|
let request = "";
|
||||||
|
|
@ -1130,7 +1129,7 @@ const fetchTreeRoot = async (isDraft: boolean) => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (isDraft) {
|
if (isDraft) {
|
||||||
// ถ้าไม่ต้องการให้แตก node root on first load ก็ไม่ต้องใส่
|
// ถ้าไม่ต้องการให้แตก node root on first load ก็ไม่ต้องใส่
|
||||||
// ต้องอยู่ตรงนี้ ถ้าอยู่ตรง .then จะ error คาดว่ามันทำงานก่อนที่ tree จะ render เสร็จ แต่ก็อาจจะไม่ใช่
|
// ต้องอยู่ตรงนี้ ถ้าอยู่ตรง .then จะ error คาดว่ามันทำงานก่อนที่ tree จะ render เสร็จ แต่ก็อาจจะไม่ใช่
|
||||||
|
|
@ -1148,7 +1147,7 @@ const fetchTreeRoot = async (isDraft: boolean) => {
|
||||||
const fetchChildrenByParentId = async (node: any) => {
|
const fetchChildrenByParentId = async (node: any) => {
|
||||||
// console.log(isDraft);
|
// console.log(isDraft);
|
||||||
console.log("Call API4");
|
console.log("Call API4");
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
let request = "";
|
let request = "";
|
||||||
if (isShowEditTree.value) {
|
if (isShowEditTree.value) {
|
||||||
request = config.API.getDraftTreeNode(node.organizationId, node.keyId);
|
request = config.API.getDraftTreeNode(node.organizationId, node.keyId);
|
||||||
|
|
@ -1168,12 +1167,12 @@ const fetchChildrenByParentId = async (node: any) => {
|
||||||
manageApiErrorMsg(e);
|
manageApiErrorMsg(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPublishFile = async () => {
|
const fetchPublishFile = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPublishFileHistory)
|
.get(config.API.getPublishFileHistory)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1191,7 +1190,7 @@ const fetchPublishFile = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1207,7 +1206,7 @@ const onLazyLoad = (node: any) => {
|
||||||
*/
|
*/
|
||||||
console.log("Call LazyLoad");
|
console.log("Call LazyLoad");
|
||||||
await fetchChildrenByParentId(node.node);
|
await fetchChildrenByParentId(node.node);
|
||||||
/** loaderPage(true);
|
/** showLoader();
|
||||||
let request = "";
|
let request = "";
|
||||||
if (isShowEditTree.value) {
|
if (isShowEditTree.value) {
|
||||||
request = config.API.getDraftTreeNode(
|
request = config.API.getDraftTreeNode(
|
||||||
|
|
@ -1244,7 +1243,7 @@ const onLazyLoad = (node: any) => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
||||||
|
|
@ -1299,7 +1298,7 @@ const apiDeleteOrg = () => {
|
||||||
// console.log("isShowEditTree", isShowEditTree.value);
|
// console.log("isShowEditTree", isShowEditTree.value);
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
//delay for lazyLoad to be able to tricker again
|
//delay for lazyLoad to be able to tricker again
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
isShowEditTree.value = true;
|
isShowEditTree.value = true;
|
||||||
await http
|
await http
|
||||||
.delete(config.API.delTreeOrgDraft(delStructureId.value))
|
.delete(config.API.delTreeOrgDraft(delStructureId.value))
|
||||||
|
|
@ -1318,7 +1317,7 @@ const apiDeleteOrg = () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
}, 20);
|
}, 20);
|
||||||
|
|
@ -1347,7 +1346,7 @@ const apiDeletePosition = () => {
|
||||||
isShowEditTree.value = false;
|
isShowEditTree.value = false;
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
//delay for lazyLoad to be able to tricker again
|
//delay for lazyLoad to be able to tricker again
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
isShowEditTree.value = true;
|
isShowEditTree.value = true;
|
||||||
await http
|
await http
|
||||||
.delete(config.API.delTreePositionDraft(delStructureId.value))
|
.delete(config.API.delTreePositionDraft(delStructureId.value))
|
||||||
|
|
@ -1364,7 +1363,7 @@ const apiDeletePosition = () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
}, 20);
|
}, 20);
|
||||||
|
|
@ -1377,7 +1376,7 @@ const apiDeletePosition = () => {
|
||||||
* ฟังก์ชัน clear data แบบร่าง
|
* ฟังก์ชัน clear data แบบร่าง
|
||||||
*/
|
*/
|
||||||
const deleteDraft = async () => {
|
const deleteDraft = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.delTreeOrgPoDraft)
|
.put(config.API.delTreeOrgPoDraft)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1389,7 +1388,7 @@ const deleteDraft = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
router.go(0);
|
router.go(0);
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
|
|
@ -1399,7 +1398,7 @@ const deleteDraft = async () => {
|
||||||
* ฟังก์ชันเผยแพร่แบบร่าง
|
* ฟังก์ชันเผยแพร่แบบร่าง
|
||||||
*/
|
*/
|
||||||
const publishDraft = async () => {
|
const publishDraft = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.publishOrgPoDraft)
|
.put(config.API.publishOrgPoDraft)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1425,7 +1424,7 @@ const publishDraft = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -1536,7 +1535,7 @@ const addStructure = async (node: any) => {
|
||||||
});
|
});
|
||||||
// console.log(node.organizationId);
|
// console.log(node.organizationId);
|
||||||
console.log("Call API1");
|
console.log("Call API1");
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
isShowEditTree.value = true; //ต้องกลับมาแสดง editTree อีกครั้ง & trigger lazyLoad โดย setExpanded
|
isShowEditTree.value = true; //ต้องกลับมาแสดง editTree อีกครั้ง & trigger lazyLoad โดย setExpanded
|
||||||
await http
|
await http
|
||||||
.post(config.API.addTreeDraft, {
|
.post(config.API.addTreeDraft, {
|
||||||
|
|
@ -1557,7 +1556,7 @@ const addStructure = async (node: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
|
|
||||||
popupAddOrganization.value = false;
|
popupAddOrganization.value = false;
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
|
|
@ -1589,7 +1588,7 @@ const editOrgStructure = async (node: any) => {
|
||||||
if (organizCheck == true) {
|
if (organizCheck == true) {
|
||||||
// console.log(node.organizationId);
|
// console.log(node.organizationId);
|
||||||
console.log("Call API13");
|
console.log("Call API13");
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
isShowEditTree.value = true; //end prepare for tricker LazyLoad
|
isShowEditTree.value = true; //end prepare for tricker LazyLoad
|
||||||
await http
|
await http
|
||||||
.put(config.API.editTreeOrgDraft(node.organizationId), {
|
.put(config.API.editTreeOrgDraft(node.organizationId), {
|
||||||
|
|
@ -1629,7 +1628,7 @@ const editOrgStructure = async (node: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
popupEditSelectedOrganization.value = false;
|
popupEditSelectedOrganization.value = false;
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
|
|
@ -1655,7 +1654,7 @@ const editPositionStructure = async (node: any) => {
|
||||||
|
|
||||||
if (positionCheck == true) {
|
if (positionCheck == true) {
|
||||||
console.log("Call API3");
|
console.log("Call API3");
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
isShowEditTree.value = true; //end prepare for tricker LazyLoad
|
isShowEditTree.value = true; //end prepare for tricker LazyLoad
|
||||||
await http
|
await http
|
||||||
.put(config.API.editTreePositionDraft(node.organizationPositionId), {
|
.put(config.API.editTreePositionDraft(node.organizationPositionId), {
|
||||||
|
|
@ -1680,7 +1679,7 @@ const editPositionStructure = async (node: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
popupEditSelectedPosition.value = false;
|
popupEditSelectedPosition.value = false;
|
||||||
await isTreeHasDraft();
|
await isTreeHasDraft();
|
||||||
});
|
});
|
||||||
|
|
@ -1696,7 +1695,7 @@ const clickHistory = async () => {
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
// rowsHistory.value = rawHistory.value.filter((f: any) => f.id == row.id);
|
// rowsHistory.value = rawHistory.value.filter((f: any) => f.id == row.id);
|
||||||
|
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getTreeHistory)
|
.get(config.API.getTreeHistory)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1722,7 +1721,7 @@ const clickHistory = async () => {
|
||||||
// messageError($q, e);
|
// messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -674,15 +674,13 @@ import type {
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
import type { QTableProps } from "quasar";
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, modalError, messageError } = mixin;
|
const { date2Thai, success, modalError, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const store = useOrganizationalDataStore();
|
const store = useOrganizationalDataStore();
|
||||||
const { organizationalData, changeOrganizationalColumns } = store;
|
const { organizationalData, changeOrganizationalColumns } = store;
|
||||||
const initialPagination = ref<Pagination>({
|
const initialPagination = ref<Pagination>({
|
||||||
|
|
@ -893,7 +891,7 @@ watch(visibleColumns, async (count: String[], prevCount: String[]) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchOrganization();
|
await fetchOrganization();
|
||||||
await fetchOrganizationAgency();
|
await fetchOrganizationAgency();
|
||||||
await fetchOrganizationGovernmentAgency();
|
await fetchOrganizationGovernmentAgency();
|
||||||
|
|
@ -906,7 +904,7 @@ onMounted(async () => {
|
||||||
* ฟังก์ชัน get data ล่าสุด
|
* ฟังก์ชัน get data ล่าสุด
|
||||||
*/
|
*/
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationEmployee)
|
.get(config.API.organizationEmployee)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1008,7 +1006,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1016,7 +1014,7 @@ const fetchData = async () => {
|
||||||
* get รายการ โครงสร้าง
|
* get รายการ โครงสร้าง
|
||||||
*/
|
*/
|
||||||
const fetchOrganization = async () => {
|
const fetchOrganization = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationMain)
|
.get(config.API.organizationMain)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1075,7 +1073,7 @@ const fetchOrganization = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1083,7 +1081,7 @@ const fetchOrganization = async () => {
|
||||||
* หน่วยงานต้นสังกัด
|
* หน่วยงานต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgency = async () => {
|
const fetchOrganizationAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1102,7 +1100,7 @@ const fetchOrganizationAgency = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1110,7 +1108,7 @@ const fetchOrganizationAgency = async () => {
|
||||||
* ส่วนราชการต้นสังกัด
|
* ส่วนราชการต้นสังกัด
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationGovernmentAgency = async () => {
|
const fetchOrganizationGovernmentAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1129,7 +1127,7 @@ const fetchOrganizationGovernmentAgency = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1137,7 +1135,7 @@ const fetchOrganizationGovernmentAgency = async () => {
|
||||||
* รหัสหน่วยงาน
|
* รหัสหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationAgencyCode = async () => {
|
const fetchOrganizationAgencyCode = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationCode)
|
.get(config.API.organizationCode)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1158,13 +1156,13 @@ const fetchOrganizationAgencyCode = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchAgencyCode = async (val: string) => {
|
const fetchAgencyCode = async (val: string) => {
|
||||||
let option: GovermentOption[] = [];
|
let option: GovermentOption[] = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationAgencyCode(val))
|
.get(config.API.organizationAgencyCode(val))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1184,7 +1182,7 @@ const fetchAgencyCode = async (val: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
@ -1193,7 +1191,7 @@ const fetchAgencyCode = async (val: string) => {
|
||||||
* get รายการ ตำแหน่ง
|
* get รายการ ตำแหน่ง
|
||||||
*/
|
*/
|
||||||
const fetchPosition = async () => {
|
const fetchPosition = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionEmployee)
|
.get(config.API.positionEmployee)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1285,7 +1283,7 @@ const fetchPosition = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1309,7 +1307,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.organizationEmployee, {
|
.post(config.API.organizationEmployee, {
|
||||||
organizationOrganizationId: organizationOrganizationId.value,
|
organizationOrganizationId: organizationOrganizationId.value,
|
||||||
|
|
@ -1361,7 +1359,7 @@ const saveData = async () => {
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.organizationEmployeeId(id.value), {
|
.put(config.API.organizationEmployeeId(id.value), {
|
||||||
organizationOrganizationId: organizationOrganizationId.value,
|
organizationOrganizationId: organizationOrganizationId.value,
|
||||||
|
|
@ -1426,7 +1424,7 @@ const clickDelete = (id: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.organizationEmployeeId(id))
|
.delete(config.API.organizationEmployeeId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1436,7 +1434,7 @@ const deleteData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ import { onMounted, computed, ref, watch } from "vue";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
||||||
import type { Columns } from "@/modules/02_organizational/interface/index/Main";
|
import type { Columns } from "@/modules/02_organizational/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
@ -116,13 +116,12 @@ import config from "@/app.config";
|
||||||
import type { treeTab } from "@/modules/04_registry/interface/index/Main";
|
import type { treeTab } from "@/modules/04_registry/interface/index/Main";
|
||||||
import type { ResponseTree } from "@/modules/02_organizational/interface/response/Mapping";
|
import type { ResponseTree } from "@/modules/02_organizational/interface/response/Mapping";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO, modalError } = mixin;
|
const { date2Thai, success, dateToISO, modalError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
||||||
|
|
@ -273,7 +272,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const nodeTree = async () => {
|
const nodeTree = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileOrganizRoot)
|
.get(config.API.profileOrganizRoot)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
@ -292,7 +291,7 @@ const nodeTree = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -306,7 +305,7 @@ const clickTree = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onHistory = async () => {
|
const onHistory = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.report2HistoryId(selected.value))
|
.get(config.API.report2HistoryId(selected.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -329,13 +328,13 @@ const onHistory = async () => {
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const doSearch = async () => {
|
const doSearch = async () => {
|
||||||
//ทำไว้แล้ว เหลือ ใส่ type
|
//ทำไว้แล้ว เหลือ ใส่ type
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.report2TreeId(selected.value))
|
.get(config.API.report2TreeId(selected.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -370,7 +369,7 @@ const doSearch = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -386,7 +385,7 @@ const onConfirm = async () => {
|
||||||
ok: "ยืนยัน",
|
ok: "ยืนยัน",
|
||||||
persistent: true,
|
persistent: true,
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.report2DoneId(selected.value))
|
.get(config.API.report2DoneId(selected.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -394,7 +393,7 @@ const onConfirm = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await doSearch();
|
await doSearch();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -574,7 +574,7 @@ import { onMounted, computed, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
||||||
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
||||||
|
|
@ -585,13 +585,11 @@ import type { RequestReport2 } from "@/modules/02_organizational/interface/reque
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO } = mixin;
|
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
|
|
||||||
|
|
@ -669,10 +667,10 @@ const sideWorkOPfilter = ref<DataOption[]>([]);
|
||||||
const levelOPfilter = ref<DataOption[]>([]);
|
const levelOPfilter = ref<DataOption[]>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
id.value = route.params.id.toString();
|
id.value = route.params.id.toString();
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
|
|
||||||
await fetchGoverment();
|
await fetchGoverment();
|
||||||
// await fetchAgency();
|
// await fetchAgency();
|
||||||
|
|
@ -685,12 +683,12 @@ onMounted(async () => {
|
||||||
await fetchLevel();
|
await fetchLevel();
|
||||||
|
|
||||||
await fetchData();
|
await fetchData();
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.report2Id(id.value))
|
.get(config.API.report2Id(id.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -750,7 +748,7 @@ const fetchData = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -766,7 +764,7 @@ const checkSave = async () => {
|
||||||
|
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
// console.log(myData.value);
|
// console.log(myData.value);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const body: RequestReport2 = {
|
const body: RequestReport2 = {
|
||||||
organizationShortNameId: myData.value.goverment2,
|
organizationShortNameId: myData.value.goverment2,
|
||||||
organizationOrganizationId: myData.value.agency2,
|
organizationOrganizationId: myData.value.agency2,
|
||||||
|
|
@ -787,7 +785,7 @@ const saveData = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -797,7 +795,7 @@ const clickBack = () => {
|
||||||
|
|
||||||
//รหัสส่วนราชการ
|
//รหัสส่วนราชการ
|
||||||
const fetchGoverment = async () => {
|
const fetchGoverment = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationShortName)
|
.get(config.API.organizationShortName)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -823,12 +821,12 @@ const fetchGoverment = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateGoverment = async (id: string) => {
|
const updateGoverment = async (id: string) => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionMasterPositionNumberId(id))
|
.get(config.API.getPositionMasterPositionNumberId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -917,13 +915,13 @@ const updateGoverment = async (id: string) => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// //ตำแหน่งเลขที่
|
// //ตำแหน่งเลขที่
|
||||||
const fetchPositionNum = async () => {
|
const fetchPositionNum = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPositionMasterPositionNumber)
|
.get(config.API.getPositionMasterPositionNumber)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -937,13 +935,13 @@ const fetchPositionNum = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ตำแหน่งประเภท
|
//ตำแหน่งประเภท
|
||||||
const fetchCategory = async () => {
|
const fetchCategory = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionType)
|
.get(config.API.positionType)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -957,13 +955,13 @@ const fetchCategory = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ตำแหน่งทางการบริหาร
|
//ตำแหน่งทางการบริหาร
|
||||||
const fetchPositionManage = async () => {
|
const fetchPositionManage = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionExecutive)
|
.get(config.API.positionExecutive)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -977,13 +975,13 @@ const fetchPositionManage = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ด้านทางบริหาร
|
//ด้านทางบริหาร
|
||||||
const fetchSideManage = async () => {
|
const fetchSideManage = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionExecutiveSide)
|
.get(config.API.positionExecutiveSide)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -997,13 +995,13 @@ const fetchSideManage = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ตำแหน่งในสายงาน
|
//ตำแหน่งในสายงาน
|
||||||
const fetchPositionWork = async () => {
|
const fetchPositionWork = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionPath)
|
.get(config.API.positionPath)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1017,13 +1015,13 @@ const fetchPositionWork = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ด้าน/สาขา
|
//ด้าน/สาขา
|
||||||
const fetchSideWork = async () => {
|
const fetchSideWork = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionSide)
|
.get(config.API.positionSide)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1037,13 +1035,13 @@ const fetchSideWork = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//ระดับตำแหน่ง
|
//ระดับตำแหน่ง
|
||||||
const fetchLevel = async () => {
|
const fetchLevel = async () => {
|
||||||
// loaderPage(true);
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionLevel)
|
.get(config.API.positionLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1057,7 +1055,7 @@ const fetchLevel = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
// loaderPage(false);
|
// hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ import { onMounted, ref } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -344,14 +344,12 @@ import type {
|
||||||
ResponseHistoryHead,
|
ResponseHistoryHead,
|
||||||
} from "@/modules/02_organizational/interface/response/Mapping";
|
} from "@/modules/02_organizational/interface/response/Mapping";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const $q = useQuasar(); // show dia
|
const $q = useQuasar(); // show dia
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const { loaderPage } = dataStore;
|
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
|
||||||
const { date2Thai, success, dateToISO } = mixin;
|
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const previous = ref<boolean>(false);
|
const previous = ref<boolean>(false);
|
||||||
const next = ref<boolean>(false);
|
const next = ref<boolean>(false);
|
||||||
|
|
@ -360,7 +358,7 @@ const historyHead = ref<ResponseHistoryHead[]>([]);
|
||||||
const historyData = ref<ResponseHistory[]>([]);
|
const historyData = ref<ResponseHistory[]>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
id.value = route.params.id.toString();
|
id.value = route.params.id.toString();
|
||||||
|
|
||||||
|
|
@ -386,7 +384,7 @@ const clickPreviousNext = async (page: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchHistory = async () => {
|
const fetchHistory = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.report2HistoryId(id.value))
|
.get(config.API.report2HistoryId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -402,7 +400,7 @@ const fetchHistory = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (historyHead.value.length > 1) {
|
if (historyHead.value.length > 1) {
|
||||||
next.value = true;
|
next.value = true;
|
||||||
previous.value = false;
|
previous.value = false;
|
||||||
|
|
@ -414,7 +412,7 @@ const fetchHistory = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.report2HistoryDetailId(
|
config.API.report2HistoryDetailId(
|
||||||
|
|
@ -455,7 +453,7 @@ const fetchData = async () => {
|
||||||
})
|
})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,116 +1,98 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายงานบัญชี</div>
|
<div class="toptitle text-dark col-12 row items-center">รายงานบัญชี</div>
|
||||||
<div class="col-12 row"></div>
|
<div class="col-12 row"></div>
|
||||||
<q-card flat bordered class="col-12">
|
<q-card flat bordered class="col-12">
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
no-caps
|
no-caps
|
||||||
inline-label
|
inline-label
|
||||||
align="left"
|
align="left"
|
||||||
active-class="text-primary"
|
active-class="text-primary"
|
||||||
class="text-grey-7"
|
class="text-grey-7"
|
||||||
>
|
>
|
||||||
<q-tab name="audit1" label="บัญชี 1" />
|
<q-tab name="audit1" label="บัญชี 1" />
|
||||||
<q-tab name="audit2" label="บัญชี 2" />
|
<q-tab name="audit2" label="บัญชี 2" />
|
||||||
<q-tab name="audit3" label="บัญชี 3" />
|
<q-tab name="audit3" label="บัญชี 3" />
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
</div>
|
</div>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
transition-prev="jump-up"
|
transition-prev="jump-up"
|
||||||
transition-next="jump-up"
|
transition-next="jump-up"
|
||||||
animated
|
animated
|
||||||
swipeable
|
swipeable
|
||||||
class="row col-12 text-dark"
|
class="row col-12 text-dark"
|
||||||
>
|
>
|
||||||
<q-tab-panel name="audit1">
|
<q-tab-panel name="audit1">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<span class="text-subtitle1 text-weight-medium"
|
<span class="text-subtitle1 text-weight-medium"
|
||||||
>รายงานบัญชีฉบับที่ 1</span
|
>รายงานบัญชีฉบับที่ 1</span
|
||||||
>
|
>
|
||||||
<q-select
|
<q-select
|
||||||
class="col-xs-12 col-sm-6"
|
class="col-xs-12 col-sm-6"
|
||||||
v-model="goverment"
|
v-model="goverment"
|
||||||
label="รหัสส่วนราชการ"
|
label="รหัสส่วนราชการ"
|
||||||
dense
|
dense
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="govermentOP"
|
:options="govermentOP"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:readonly="true"
|
:readonly="true"
|
||||||
:borderless="true"
|
:borderless="true"
|
||||||
:outlined="false"
|
:outlined="false"
|
||||||
:hide-dropdown-icon="true"
|
:hide-dropdown-icon="true"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn size="md" icon="mdi-download" round flat color="primary">
|
||||||
size="md"
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
icon="mdi-download"
|
</q-btn>
|
||||||
round
|
<!-- <viewpdf
|
||||||
flat
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<!-- <viewpdf
|
|
||||||
:src="pdfSrc"
|
:src="pdfSrc"
|
||||||
:currentpage="pdfCurrentPage"
|
:currentpage="pdfCurrentPage"
|
||||||
:totalpage="pdfTotalPage" /> -->
|
:totalpage="pdfTotalPage" /> -->
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="audit2">
|
<q-tab-panel name="audit2">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<span class="text-subtitle1 text-weight-medium"
|
<span class="text-subtitle1 text-weight-medium"
|
||||||
>รายงานบัญชีฉบับที่ 2</span
|
>รายงานบัญชีฉบับที่ 2</span
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||||
size="md"
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
icon="mdi-download"
|
</q-btn>
|
||||||
flat
|
<!-- <viewpdf
|
||||||
round
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<!-- <viewpdf
|
|
||||||
:src="pdfSrc"
|
:src="pdfSrc"
|
||||||
:currentpage="pdfCurrentPage"
|
:currentpage="pdfCurrentPage"
|
||||||
:totalpage="pdfTotalPage" /> -->
|
:totalpage="pdfTotalPage" /> -->
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="audit3">
|
<q-tab-panel name="audit3">
|
||||||
<div class="row col-12 items-center q-gutter-md">
|
<div class="row col-12 items-center q-gutter-md">
|
||||||
<span class="text-subtitle1 text-weight-medium"
|
<span class="text-subtitle1 text-weight-medium"
|
||||||
>รายงานบัญชีฉบับที่ 3</span
|
>รายงานบัญชีฉบับที่ 3</span
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||||
size="md"
|
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||||
icon="mdi-download"
|
</q-btn>
|
||||||
flat
|
<!-- <viewpdf
|
||||||
round
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<!-- <viewpdf
|
|
||||||
:src="pdfSrc"
|
:src="pdfSrc"
|
||||||
:currentpage="pdfCurrentPage"
|
:currentpage="pdfCurrentPage"
|
||||||
:totalpage="pdfTotalPage" /> -->
|
:totalpage="pdfTotalPage" /> -->
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, computed, ref, watch } from "vue";
|
import { onMounted, computed, ref, watch } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
import TableReport from "@/modules/02_organizational/components/TableReport.vue";
|
||||||
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/02_organizational/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/02_organizational/components/DialogFooter.vue";
|
||||||
|
|
@ -121,13 +103,11 @@ import type { RequestReport2 } from "@/modules/02_organizational/interface/reque
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO } = mixin;
|
const { date2Thai, success, dateToISO, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const govermentOP = ref<DataOption[]>([]);
|
const govermentOP = ref<DataOption[]>([]);
|
||||||
const govermentOPfilter = ref<DataOption[]>([]);
|
const govermentOPfilter = ref<DataOption[]>([]);
|
||||||
|
|
@ -135,32 +115,32 @@ const goverment = ref<string>("");
|
||||||
const tab = ref<string>("audit1");
|
const tab = ref<string>("audit1");
|
||||||
|
|
||||||
const fetchOrganizationAgency = async () => {
|
const fetchOrganizationAgency = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
// .get(config.API.organizationAgency)
|
// .get(config.API.organizationAgency)
|
||||||
.get(config.API.listOrganizationAgency("หน่วยงาน"))
|
.get(config.API.listOrganizationAgency("หน่วยงาน"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
let option: DataOption[] = [];
|
let option: DataOption[] = [];
|
||||||
data.map((r: any) => {
|
data.map((r: any) => {
|
||||||
option.push({
|
option.push({
|
||||||
id: r.organizationId.toString(),
|
id: r.organizationId.toString(),
|
||||||
name: r.organizationName.toString(),
|
name: r.organizationName.toString(),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
govermentOP.value = option;
|
govermentOP.value = option;
|
||||||
govermentOPfilter.value = option;
|
govermentOPfilter.value = option;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchOrganizationAgency();
|
await fetchOrganizationAgency();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,6 @@ import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
provinceOptions: {
|
provinceOptions: {
|
||||||
|
|
@ -266,15 +265,14 @@ const route = useRoute();
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
const edit = ref<boolean>(true);
|
const edit = ref<boolean>(true);
|
||||||
const myform = ref<any>({});
|
const myform = ref<any>({});
|
||||||
const loader = ref<boolean>(false);
|
|
||||||
const districtOptions = ref<DataOption[]>([]);
|
const districtOptions = ref<DataOption[]>([]);
|
||||||
const districtCOptions = ref<DataOption[]>([]);
|
const districtCOptions = ref<DataOption[]>([]);
|
||||||
const subdistrictOptions = ref<DataOption[]>([]);
|
const subdistrictOptions = ref<DataOption[]>([]);
|
||||||
const subdistrictCOptions = ref<DataOption[]>([]);
|
const subdistrictCOptions = ref<DataOption[]>([]);
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
watch(myform, async (count: any, prevCount: any) => {
|
watch(myform, async (count: any, prevCount: any) => {
|
||||||
|
|
@ -319,7 +317,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -362,7 +360,7 @@ const selectSubDistrict = (e: string, name: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchDistrict = async (id: string, position: string) => {
|
const fetchDistrict = async (id: string, position: string) => {
|
||||||
loader.value = true;
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listDistrict(id))
|
.get(config.API.listDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -381,12 +379,12 @@ const fetchDistrict = async (id: string, position: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchSubDistrict = async (id: string, position: string) => {
|
const fetchSubDistrict = async (id: string, position: string) => {
|
||||||
loader.value = true;
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listSubDistrict(id))
|
.get(config.API.listSubDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -409,7 +407,7 @@ const fetchSubDistrict = async (id: string, position: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ import Table from "@/modules/03_recruiting/components/TableCan.vue";
|
||||||
import DialogHeader from "@/modules/03_recruiting/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/03_recruiting/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/03_recruiting/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/03_recruiting/components/DialogFooter.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
|
|
@ -229,7 +228,7 @@ const modalEdit = ref<boolean>(false); //modal ที่แสดงใช้ส
|
||||||
const rawItem = ref<RequestItemsObject>(); //ข้อมูลเดิมที่เลือกใน row นั้น
|
const rawItem = ref<RequestItemsObject>(); //ข้อมูลเดิมที่เลือกใน row นั้น
|
||||||
const rowIndex = ref<number>(0); //indexข้อมูลเดิมที่เลือกใน row นั้น
|
const rowIndex = ref<number>(0); //indexข้อมูลเดิมที่เลือกใน row นั้น
|
||||||
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
||||||
const dataStore = useDataStore();
|
|
||||||
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
||||||
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
|
|
@ -237,8 +236,8 @@ const route = useRoute();
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
||||||
examData.career.columns.length == 0
|
examData.career.columns.length == 0
|
||||||
|
|
@ -318,7 +317,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateCareer(candidateId.value))
|
.get(config.API.candidateCareer(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -336,7 +335,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -415,7 +414,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
||||||
*/
|
*/
|
||||||
const clickDeleteRow = async () => {
|
const clickDeleteRow = async () => {
|
||||||
if (rawItem.value != null) {
|
if (rawItem.value != null) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -451,7 +450,7 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.candidateAdminCareer(candidateId.value), {
|
.post(config.API.candidateAdminCareer(candidateId.value), {
|
||||||
name: location.value,
|
name: location.value,
|
||||||
|
|
@ -477,7 +476,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateAdminCareer(id.value), {
|
.put(config.API.candidateAdminCareer(id.value), {
|
||||||
name: location.value,
|
name: location.value,
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import type { UploadType } from "@/modules/03_recruiting/interface/index/Main";
|
import type { UploadType } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
@ -161,14 +161,13 @@ const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
const uploader = ref<any>();
|
const uploader = ref<any>();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const edit = ref<boolean>(props.status == "checkRegister");
|
const edit = ref<boolean>(props.status == "checkRegister");
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const files = ref<UploadType[]>([]);
|
const files = ref<UploadType[]>([]);
|
||||||
const file = ref<File[]>([]);
|
const file = ref<File[]>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -180,7 +179,7 @@ const fileAdd = async (val: any) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateUpload(candidateId.value))
|
.get(config.API.candidateUpload(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -191,7 +190,7 @@ const getData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -199,7 +198,7 @@ const deleteData = async (id: string) => {
|
||||||
const params = {
|
const params = {
|
||||||
documentId: id,
|
documentId: id,
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.candidateUpload(candidateId.value), {
|
.delete(config.API.candidateUpload(candidateId.value), {
|
||||||
params,
|
params,
|
||||||
|
|
@ -211,7 +210,7 @@ const deleteData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -223,7 +222,7 @@ const uploadData = async () => {
|
||||||
});
|
});
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("", newFile);
|
formData.append("", newFile);
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateUpload(candidateId.value), formData)
|
.put(config.API.candidateUpload(candidateId.value), formData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -233,7 +232,7 @@ const uploadData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
name.value = "";
|
name.value = "";
|
||||||
uploader.value.reset();
|
uploader.value.reset();
|
||||||
await getData();
|
await getData();
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useExamDataStore } from "@/modules/03_recruiting/store";
|
import { useExamDataStore } from "@/modules/03_recruiting/store";
|
||||||
import type {
|
import type {
|
||||||
RequestItemsObject,
|
RequestItemsObject,
|
||||||
|
|
@ -238,9 +238,8 @@ const editRow = ref<boolean>(false); //เช็คมีการแก้ไ
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const { messageError } = mixin;
|
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
|
|
||||||
|
|
@ -324,7 +323,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateEducation(candidateId.value))
|
.get(config.API.candidateEducation(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -343,12 +342,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetcheducationLevel = async () => {
|
const fetcheducationLevel = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.educationLevel)
|
.get(config.API.educationLevel)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -363,7 +362,7 @@ const fetcheducationLevel = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -444,7 +443,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
||||||
*/
|
*/
|
||||||
const clickDeleteRow = async () => {
|
const clickDeleteRow = async () => {
|
||||||
if (rawItem.value != null) {
|
if (rawItem.value != null) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.candidateAdminEducation(rawItem.value.id))
|
.delete(config.API.candidateAdminEducation(rawItem.value.id))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -480,7 +479,7 @@ const clickSave = async () => {
|
||||||
* บันทึกเพิ่มข้อมูล
|
* บันทึกเพิ่มข้อมูล
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.candidateAdminEducation(candidateId.value), {
|
.post(config.API.candidateAdminEducation(candidateId.value), {
|
||||||
educationLevelId: educationLevelId.value,
|
educationLevelId: educationLevelId.value,
|
||||||
|
|
@ -506,7 +505,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateAdminEducation(id.value), {
|
.put(config.API.candidateAdminEducation(id.value), {
|
||||||
educationLevelId: educationLevelId.value,
|
educationLevelId: educationLevelId.value,
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ import { onMounted, ref } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -129,9 +129,8 @@ const props = defineProps({
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { messageError, date2Thai } = mixin;
|
const { messageError, date2Thai, showLoader, hideLoader } = mixin;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
const examNumber = ref<string>("");
|
const examNumber = ref<string>("");
|
||||||
const citizenId = ref<string>("");
|
const citizenId = ref<string>("");
|
||||||
|
|
@ -152,7 +151,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchCard = async () => {
|
const fetchCard = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateCard(props.candidateId))
|
.get(config.API.candidateCard(props.candidateId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -194,7 +193,7 @@ const fetchCard = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ import {
|
||||||
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -300,10 +300,9 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const edit = ref<boolean>(true);
|
const edit = ref<boolean>(true);
|
||||||
const myform = ref<any>({});
|
const myform = ref<any>({});
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -324,7 +323,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateFamily(candidateId.value))
|
.get(config.API.candidateFamily(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -351,7 +350,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,6 @@ import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import keycloak from "@/plugins/keycloak";
|
import keycloak from "@/plugins/keycloak";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
prefixOptions: {
|
prefixOptions: {
|
||||||
|
|
@ -438,9 +437,8 @@ const edit = ref<boolean>(true);
|
||||||
const myform = ref<any>({});
|
const myform = ref<any>({});
|
||||||
const img = ref<string>("");
|
const img = ref<string>("");
|
||||||
const fileProfile = ref<File[]>([]);
|
const fileProfile = ref<File[]>([]);
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const { messageError } = mixin;
|
|
||||||
|
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
|
|
@ -463,7 +461,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateInformation(candidateId.value))
|
.get(config.API.candidateInformation(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -494,12 +492,12 @@ const fetchData = async () => {
|
||||||
keycloak.tokenParsed == null ? "" : keycloak.tokenParsed.family_name;
|
keycloak.tokenParsed == null ? "" : keycloak.tokenParsed.family_name;
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchImgData = async () => {
|
const fetchImgData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateProfile(candidateId.value))
|
.get(config.API.candidateProfile(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -510,7 +508,7 @@ const fetchImgData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -542,7 +540,7 @@ const selectProvince = (val: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchDistrict = async (id: string) => {
|
const fetchDistrict = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listDistrict(id))
|
.get(config.API.listDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -557,7 +555,7 @@ const fetchDistrict = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ import {
|
||||||
} from "@/modules/03_recruiting/interface/index/Main";
|
} from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
import HeaderTop from "@/modules/03_recruiting/components/top.vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
|
|
@ -280,10 +280,9 @@ const edit = ref<boolean>(true);
|
||||||
const myform = ref<any>({});
|
const myform = ref<any>({});
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const emit = defineEmits(["update:form"]);
|
const emit = defineEmits(["update:form"]);
|
||||||
|
|
||||||
|
|
@ -300,7 +299,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateOccupation(candidateId.value))
|
.get(config.API.candidateOccupation(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -327,7 +326,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,11 @@
|
||||||
|
|
||||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||||
<div class="q-px-sm">
|
<div class="q-px-sm">
|
||||||
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
<Family
|
||||||
|
:prefixOptions="prefixOptions"
|
||||||
|
:status="status"
|
||||||
|
v-model:form="formFamily"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||||
|
|
@ -56,7 +60,7 @@ import Occupation from "@/modules/03_recruiting/components/Occupation.vue";
|
||||||
import Education from "@/modules/03_recruiting/components/Education.vue";
|
import Education from "@/modules/03_recruiting/components/Education.vue";
|
||||||
import Career from "@/modules/03_recruiting/components/Career.vue";
|
import Career from "@/modules/03_recruiting/components/Career.vue";
|
||||||
import Document from "@/modules/03_recruiting/components/Document.vue";
|
import Document from "@/modules/03_recruiting/components/Document.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
|
@ -84,8 +88,7 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const prefixOptions = ref<DataOption[]>([]);
|
const prefixOptions = ref<DataOption[]>([]);
|
||||||
const relationshipOptions = ref<DataOption[]>([]);
|
const relationshipOptions = ref<DataOption[]>([]);
|
||||||
const provinceOptions = ref<DataOption[]>([]);
|
const provinceOptions = ref<DataOption[]>([]);
|
||||||
|
|
@ -94,7 +97,7 @@ const formAddress = ref<any>({});
|
||||||
const formFamily = ref<any>({});
|
const formFamily = ref<any>({});
|
||||||
const formOccupation = ref<any>({});
|
const formOccupation = ref<any>({});
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
"update:formInformation",
|
"update:formInformation",
|
||||||
|
|
@ -120,14 +123,14 @@ watch(formOccupation, async (count: Object, prevCount: Object) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
fetchPrefix();
|
fetchPrefix();
|
||||||
fetchRelationship();
|
fetchRelationship();
|
||||||
fetchProvince();
|
fetchProvince();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchPrefix = async () => {
|
const fetchPrefix = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.prefix)
|
.get(config.API.prefix)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -142,12 +145,12 @@ const fetchPrefix = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchRelationship = async () => {
|
const fetchRelationship = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.relationship)
|
.get(config.API.relationship)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -162,12 +165,12 @@ const fetchRelationship = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchProvince = async () => {
|
const fetchProvince = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.province)
|
.get(config.API.province)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -182,7 +185,7 @@ const fetchProvince = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs } from "vue";
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -157,8 +157,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dateToISO, success, modalError, dialogMessage } = mixin;
|
const { dateToISO, success, modalError, dialogMessage } = mixin;
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
|
|
@ -167,7 +166,7 @@ const table = ref<any>(null);
|
||||||
const files = ref<File[]>([]);
|
const files = ref<File[]>([]);
|
||||||
const filterRef = ref<any>(null);
|
const filterRef = ref<any>(null);
|
||||||
const examId = ref<string>(route.params.examId.toString());
|
const examId = ref<string>(route.params.examId.toString());
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
inputfilter: String,
|
inputfilter: String,
|
||||||
inputvisible: Array,
|
inputvisible: Array,
|
||||||
|
|
@ -309,7 +308,7 @@ const candidateToPlacement = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
@ -318,7 +317,7 @@ const candidateToPlacement = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadDataSeat = async () => {
|
const uploadDataSeat = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("", files.value[0]);
|
formData.append("", files.value[0]);
|
||||||
await http
|
await http
|
||||||
|
|
@ -330,14 +329,14 @@ const uploadDataSeat = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
files.value = [];
|
files.value = [];
|
||||||
props.fetchData();
|
props.fetchData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadDataPoint = async () => {
|
const uploadDataPoint = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("", files.value[0]);
|
formData.append("", files.value[0]);
|
||||||
await http
|
await http
|
||||||
|
|
@ -350,14 +349,14 @@ const uploadDataPoint = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
files.value = [];
|
files.value = [];
|
||||||
props.fetchData();
|
props.fetchData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadFile = async () => {
|
const downloadFile = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamDownload(examId.value), {
|
.get(config.API.periodExamDownload(examId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -370,12 +369,12 @@ const downloadFile = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadFileDetail = async () => {
|
const downloadFileDetail = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamDownloadDetail(examId.value), {
|
.get(config.API.periodExamDownloadDetail(examId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -388,7 +387,7 @@ const downloadFileDetail = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,19 +121,19 @@ import { ref, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
|
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
|
||||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success } = mixin;
|
const { messageError, success, showLoader, hideLoader } = mixin;
|
||||||
const year = ref<string>("");
|
const year = ref<string>("");
|
||||||
const round = ref<string>("");
|
const round = ref<string>("");
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
|
|
@ -365,7 +365,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -374,7 +374,7 @@ const clickDetail = (examID: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadExam = async () => {
|
const downloadExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportExam(importId.value), {
|
.get(config.API.exportExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -390,12 +390,12 @@ const downloadExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPassExam = async () => {
|
const downloadPassExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportPassExam(importId.value), {
|
.get(config.API.exportPassExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -411,12 +411,12 @@ const downloadPassExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPassResultExam = async () => {
|
const downloadPassResultExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportPassResultExam(importId.value), {
|
.get(config.API.exportPassResultExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -432,12 +432,12 @@ const downloadPassResultExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.getExamResultById(importId.value), {
|
.post(config.API.getExamResultById(importId.value), {
|
||||||
examAttribute: "",
|
examAttribute: "",
|
||||||
|
|
@ -474,7 +474,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -489,7 +489,7 @@ const candidateToPlacement = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodRecruitToPlacement(importId.value))
|
.get(config.API.periodRecruitToPlacement(importId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -499,7 +499,7 @@ const candidateToPlacement = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -236,17 +236,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const profile_id = ref<string>("");
|
const profile_id = ref<string>("");
|
||||||
const birthdate = ref<string>("");
|
const birthdate = ref<string>("");
|
||||||
const gender = ref<string>("");
|
const gender = ref<string>("");
|
||||||
|
|
@ -269,7 +269,7 @@ const examOrder = ref<string>("");
|
||||||
const number = ref<string>("");
|
const number = ref<string>("");
|
||||||
const score_expired = ref<string>("");
|
const score_expired = ref<string>("");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const examID = ref<string>("62150001");
|
const examID = ref<string>("62150001");
|
||||||
const prefix = ref<string>("นาย");
|
const prefix = ref<string>("นาย");
|
||||||
const fullname = ref<string>("เกียรติศักดิ์ บัณฑิต");
|
const fullname = ref<string>("เกียรติศักดิ์ บัณฑิต");
|
||||||
|
|
@ -281,7 +281,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getExamDetail(importId.value, examId.value))
|
.get(config.API.getExamDetail(importId.value, examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -319,12 +319,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadScore = async () => {
|
const downloadScore = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.downloadScoreReport(importId.value, examId.value), {
|
.get(config.API.downloadScoreReport(importId.value, examId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -340,12 +340,12 @@ const downloadScore = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadCertificate = async () => {
|
const downloadCertificate = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
let type = degree.value.includes("บัณฑิต") ? 2 : 1;
|
let type = degree.value.includes("บัณฑิต") ? 2 : 1;
|
||||||
await http
|
await http
|
||||||
.get(config.API.downloadExamReport(importId.value, examId.value, type), {
|
.get(config.API.downloadExamReport(importId.value, examId.value, type), {
|
||||||
|
|
@ -362,7 +362,7 @@ const downloadCertificate = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -806,15 +806,14 @@ import type {
|
||||||
} from "@/modules/02_organizational/interface/index/Main";
|
} from "@/modules/02_organizational/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO, notifyError } = mixin;
|
const { date2Thai, success, dateToISO, notifyError, showLoader, hideLoader } = mixin;
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const note = ref<string>("");
|
const note = ref<string>("");
|
||||||
|
|
@ -925,7 +924,7 @@ watch(organizationName, (count: DataOption, prevCount: DataOption) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
edit.value = true;
|
edit.value = true;
|
||||||
id.value = route.params.id.toString();
|
id.value = route.params.id.toString();
|
||||||
|
|
@ -940,7 +939,7 @@ const clickBack = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getPeriodById(id.value))
|
.get(config.API.getPeriodById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -992,7 +991,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1019,7 +1018,7 @@ const uploadDocData = async () => {
|
||||||
fileDocDataUpload.value.forEach((file: any) => {
|
fileDocDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodRecruitDoc(id.value), formData)
|
.put(config.API.periodRecruitDoc(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -1027,7 +1026,7 @@ const uploadDocData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
clickBack();
|
clickBack();
|
||||||
});
|
});
|
||||||
|
|
@ -1043,7 +1042,7 @@ const uploadImgData = async () => {
|
||||||
fileImgDataUpload.value.forEach((file: any) => {
|
fileImgDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodRecruitImg(id.value), formData)
|
.put(config.API.periodRecruitImg(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -1051,7 +1050,7 @@ const uploadImgData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1132,7 +1131,7 @@ const sendData = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteDocData = async (docId: string) => {
|
const deleteDocData = async (docId: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.periodDeleteDoc(docId))
|
.delete(config.API.periodDeleteDoc(docId))
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
@ -1142,12 +1141,12 @@ const deleteDocData = async (docId: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteImgData = async (docId: string) => {
|
const deleteImgData = async (docId: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.periodDeleteImg(docId))
|
.delete(config.API.periodDeleteImg(docId))
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
@ -1157,12 +1156,12 @@ const deleteImgData = async (docId: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.savePeriod, sendData())
|
.post(config.API.savePeriod, sendData())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -1175,12 +1174,12 @@ const addData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async (id: string) => {
|
const editData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.editPeriod(id), sendData())
|
.put(config.API.editPeriod(id), sendData())
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
@ -1191,7 +1190,7 @@ const editData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,15 +121,14 @@ import { ref, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
|
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
|
||||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const year = ref<string>("2566");
|
const year = ref<string>("2566");
|
||||||
const round = ref<string>("1");
|
const round = ref<string>("1");
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
|
|
@ -140,7 +139,7 @@ const pass = ref<number>(0);
|
||||||
const notpass = ref<number>(0);
|
const notpass = ref<number>(0);
|
||||||
const importId = ref<string>(route.params.id as string); // Period Import Id
|
const importId = ref<string>(route.params.id as string); // Period Import Id
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success } = mixin;
|
const { messageError, success, showLoader, hideLoader } = mixin;
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([
|
const visibleColumns = ref<String[]>([
|
||||||
"examID",
|
"examID",
|
||||||
|
|
@ -328,12 +327,12 @@ const clickDetail = (examID: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const downloadExam = async () => {
|
const downloadExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportDisableExam(importId.value), {
|
.get(config.API.exportDisableExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -349,12 +348,12 @@ const downloadExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPassExam = async () => {
|
const downloadPassExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportDisablePassExam(importId.value), {
|
.get(config.API.exportDisablePassExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -370,12 +369,12 @@ const downloadPassExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadPassResultExam = async () => {
|
const downloadPassResultExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportDisablePassResultExam(importId.value), {
|
.get(config.API.exportDisablePassResultExam(importId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -391,12 +390,12 @@ const downloadPassResultExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.getDisableExamResultById(importId.value), {
|
.post(config.API.getDisableExamResultById(importId.value), {
|
||||||
examAttribute: "",
|
examAttribute: "",
|
||||||
|
|
@ -427,7 +426,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -442,7 +441,7 @@ const candidateToPlacement = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodDisableToPlacement(importId.value))
|
.get(config.API.periodDisableToPlacement(importId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -452,7 +451,7 @@ const candidateToPlacement = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
router.go(-1);
|
router.go(-1);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -237,19 +237,19 @@
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError } = mixin;
|
const { messageError, showLoader, hideLoader } = mixin;
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const date = ref<any>();
|
const date = ref<any>();
|
||||||
const profile_id = ref<string>("");
|
const profile_id = ref<string>("");
|
||||||
const birthdate = ref<string>("");
|
const birthdate = ref<string>("");
|
||||||
|
|
@ -289,7 +289,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getDisableExamDetail(importId.value, examId.value))
|
.get(config.API.getDisableExamDetail(importId.value, examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -328,12 +328,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadScore = async () => {
|
const downloadScore = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.downloadDisableScoreReport(importId.value, examId.value), {
|
.get(config.API.downloadDisableScoreReport(importId.value, examId.value), {
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
|
|
@ -349,12 +349,12 @@ const downloadScore = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadCertificate = async () => {
|
const downloadCertificate = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.downloadDisableExamReport(importId.value, examId.value, 2),
|
config.API.downloadDisableExamReport(importId.value, examId.value, 2),
|
||||||
|
|
@ -373,7 +373,7 @@ const downloadCertificate = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -669,15 +669,20 @@ import type {
|
||||||
} from "@/modules/02_organizational/interface/index/Main";
|
} from "@/modules/02_organizational/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO, notifyError, messageError } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
success,
|
||||||
|
dateToISO,
|
||||||
|
notifyError,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const note = ref<string>("");
|
const note = ref<string>("");
|
||||||
|
|
@ -725,7 +730,7 @@ onMounted(async () => {
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
edit.value = true;
|
edit.value = true;
|
||||||
id.value = route.params.id.toString();
|
id.value = route.params.id.toString();
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
} else {
|
} else {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
|
@ -737,7 +742,7 @@ const clickBack = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getDisablePeriodById(id.value))
|
.get(config.API.getDisablePeriodById(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -774,7 +779,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -829,7 +834,7 @@ const sendData = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.saveDisablePeriod, sendData())
|
.post(config.API.saveDisablePeriod, sendData())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -844,12 +849,12 @@ const addData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async (id: string) => {
|
const editData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.editDisablePeriod(id), sendData())
|
.put(config.API.editDisablePeriod(id), sendData())
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|
@ -862,7 +867,7 @@ const editData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -889,7 +894,7 @@ const uploadImgData = async () => {
|
||||||
fileImgDataUpload.value.forEach((file: any) => {
|
fileImgDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamImg(id.value), formData)
|
.put(config.API.periodExamImg(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -897,7 +902,7 @@ const uploadImgData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -906,7 +911,7 @@ const deleteDocData = async (docId: string) => {
|
||||||
const params = {
|
const params = {
|
||||||
documentId: docId,
|
documentId: docId,
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.periodExamDoc(id.value.toString()), {
|
.delete(config.API.periodExamDoc(id.value.toString()), {
|
||||||
params,
|
params,
|
||||||
|
|
@ -919,7 +924,7 @@ const deleteDocData = async (docId: string) => {
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -950,7 +955,7 @@ const uploadDocData = async () => {
|
||||||
fileDocDataUpload.value.forEach((file: any) => {
|
fileDocDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamDoc(id.value), formData)
|
.put(config.API.periodExamDoc(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -958,7 +963,7 @@ const uploadDocData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clickBack();
|
clickBack();
|
||||||
|
|
|
||||||
|
|
@ -138,14 +138,11 @@ import { useRoute, useRouter } from "vue-router";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { success, dateToISO, messageError } = mixin;
|
const { success, dateToISO, messageError, showLoader, hideLoader } = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const examId = ref<string>(route.params.examId.toString());
|
const examId = ref<string>(route.params.examId.toString());
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
|
|
@ -163,7 +160,7 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchStatus = async () => {
|
const fetchStatus = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateId(candidateId.value))
|
.get(config.API.candidateId(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -174,12 +171,12 @@ const fetchStatus = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirm = async (status: boolean, reason: string) => {
|
const confirm = async (status: boolean, reason: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateCheckRegister(candidateId.value), {
|
.put(config.API.candidateCheckRegister(candidateId.value), {
|
||||||
status: status,
|
status: status,
|
||||||
|
|
@ -190,14 +187,14 @@ const confirm = async (status: boolean, reason: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const reject = async (reason: string) => {
|
const reject = async (reason: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateRejectRegister(candidateId.value), {
|
.put(config.API.candidateRejectRegister(candidateId.value), {
|
||||||
reason: reason,
|
reason: reason,
|
||||||
|
|
@ -207,7 +204,7 @@ const reject = async (reason: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
});
|
});
|
||||||
|
|
@ -253,7 +250,7 @@ const clickSave = async () => {
|
||||||
type.value = defaultOccupation.value.employee;
|
type.value = defaultOccupation.value.employee;
|
||||||
if (defaultOccupation.value.status == "other")
|
if (defaultOccupation.value.status == "other")
|
||||||
type.value = defaultOccupation.value.other;
|
type.value = defaultOccupation.value.other;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.candidateId(candidateId.value), {
|
.post(config.API.candidateId(candidateId.value), {
|
||||||
prefixId: defaultInformation.value.prefixId,
|
prefixId: defaultInformation.value.prefixId,
|
||||||
|
|
@ -329,7 +326,7 @@ const clickSave = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -55,17 +55,16 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import type { RequestPeriodExam } from "@/modules/03_recruiting/interface/request/Period";
|
import type { RequestPeriodExam } from "@/modules/03_recruiting/interface/request/Period";
|
||||||
import type { ResponsePeriodExam } from "@/modules/03_recruiting/interface/response/Period";
|
import type { ResponsePeriodExam } from "@/modules/03_recruiting/interface/response/Period";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, messageError } = mixin;
|
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||||
const rows = ref<ResponsePeriodExam[]>([]);
|
const rows = ref<ResponsePeriodExam[]>([]);
|
||||||
const initialPagination = ref<Pagination>({
|
const initialPagination = ref<Pagination>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
|
|
@ -163,12 +162,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamType("exam"))
|
.get(config.API.periodExamType("exam"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -223,7 +222,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -278,17 +278,14 @@ import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const filePayment = ref<File[]>([]);
|
const filePayment = ref<File[]>([]);
|
||||||
const bank = ref<any>([]);
|
const bank = ref<any>([]);
|
||||||
const fee = ref<number>();
|
const fee = ref<number>();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { success, messageError } = mixin;
|
const { success, messageError, showLoader, hideLoader } = mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const examId = ref<string>(route.params.examId.toString());
|
const examId = ref<string>(route.params.examId.toString());
|
||||||
const candidateId = ref<string>(route.params.candidateId.toString());
|
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||||
|
|
@ -308,13 +305,13 @@ const props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchPaymentExam();
|
await fetchPaymentExam();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidatePayment(candidateId.value))
|
.get(config.API.candidatePayment(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -325,12 +322,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPaymentExam = async () => {
|
const fetchPaymentExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamPayment(examId.value))
|
.get(config.API.periodExamPayment(examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -342,12 +339,12 @@ const fetchPaymentExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirm = async (status: boolean, reason: string) => {
|
const confirm = async (status: boolean, reason: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.candidateCheckPayment(candidateId.value), {
|
.put(config.API.candidateCheckPayment(candidateId.value), {
|
||||||
status: status,
|
status: status,
|
||||||
|
|
@ -358,7 +355,7 @@ const confirm = async (status: boolean, reason: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลชำระเงินสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลชำระเงินสำเร็จ");
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -94,15 +94,20 @@ import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import Table from "@/modules/03_recruiting/components/Table.vue";
|
import Table from "@/modules/03_recruiting/components/Table.vue";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { date2Thai, success, typeCategoryExam, messageError } = mixin;
|
const {
|
||||||
|
date2Thai,
|
||||||
|
success,
|
||||||
|
typeCategoryExam,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const initialPagination = ref<Pagination>({
|
const initialPagination = ref<Pagination>({
|
||||||
rowsPerPage: 0,
|
rowsPerPage: 0,
|
||||||
|
|
@ -205,12 +210,12 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamType("all"))
|
.get(config.API.periodExamType("all"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -292,7 +297,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -322,7 +327,7 @@ const clickAdd = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteData = async (id: string) => {
|
const deleteData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.periodExamId(id))
|
.delete(config.API.periodExamId(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -332,7 +337,7 @@ const deleteData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchData();
|
await fetchData();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -986,16 +986,15 @@ import type {
|
||||||
} from "@/modules/02_organizational/interface/index/Main";
|
} from "@/modules/02_organizational/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||||
|
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const $q = useQuasar(); // show dialog
|
const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const myForm = ref<QForm | null>(null); //form data input
|
const myForm = ref<QForm | null>(null); //form data input
|
||||||
const name = ref<string>("");
|
const name = ref<string>("");
|
||||||
const note = ref<string>("");
|
const note = ref<string>("");
|
||||||
|
|
@ -1137,7 +1136,7 @@ watch(organizationName, (count: DataOption, prevCount: DataOption) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
if (route.params.id != undefined) {
|
if (route.params.id != undefined) {
|
||||||
edit.value = true;
|
edit.value = true;
|
||||||
id.value = route.params.id.toString();
|
id.value = route.params.id.toString();
|
||||||
|
|
@ -1160,7 +1159,7 @@ const clickBack = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamId(id.value))
|
.get(config.API.periodExamId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1239,7 +1238,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1247,7 +1246,7 @@ const fetchData = async () => {
|
||||||
* get รายการ รหัสหน่วยงาน
|
* get รายการ รหัสหน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationShortName = async () => {
|
const fetchOrganizationShortName = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationShortName)
|
.get(config.API.organizationShortName)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1265,7 +1264,7 @@ const fetchOrganizationShortName = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1273,7 +1272,7 @@ const fetchOrganizationShortName = async () => {
|
||||||
* get รายการ หน่วยงาน
|
* get รายการ หน่วยงาน
|
||||||
*/
|
*/
|
||||||
const fetchOrganizationOrganization = async (val: string) => {
|
const fetchOrganizationOrganization = async (val: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.organization)
|
.get(config.API.organization)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1291,7 +1290,7 @@ const fetchOrganizationOrganization = async (val: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1299,7 +1298,7 @@ const fetchOrganizationOrganization = async (val: string) => {
|
||||||
* get รายการ ตำแหน่งในสายงาน
|
* get รายการ ตำแหน่งในสายงาน
|
||||||
*/
|
*/
|
||||||
const fetchPositionPath = async (val: string) => {
|
const fetchPositionPath = async (val: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.positionPath)
|
.get(config.API.positionPath)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1317,7 +1316,7 @@ const fetchPositionPath = async (val: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1410,7 +1409,7 @@ const sendData = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const addData = async () => {
|
const addData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.periodExam, sendData())
|
.post(config.API.periodExam, sendData())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -1425,12 +1424,12 @@ const addData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async (id: string) => {
|
const editData = async (id: string) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamId(id), sendData())
|
.put(config.API.periodExamId(id), sendData())
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
|
@ -1443,7 +1442,7 @@ const editData = async (id: string) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1470,13 +1469,13 @@ const uploadDocData = async () => {
|
||||||
fileDocDataUpload.value.forEach((file: any) => {
|
fileDocDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamDoc(id.value), formData)
|
.put(config.API.periodExamDoc(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clickBack();
|
clickBack();
|
||||||
|
|
@ -1506,13 +1505,13 @@ const uploadImgData = async () => {
|
||||||
fileImgDataUpload.value.forEach((file: any) => {
|
fileImgDataUpload.value.forEach((file: any) => {
|
||||||
formData.append("", file);
|
formData.append("", file);
|
||||||
});
|
});
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.periodExamImg(id.value), formData)
|
.put(config.API.periodExamImg(id.value), formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
.catch((e) => {})
|
.catch((e) => {})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -1521,7 +1520,7 @@ const deleteDocData = async (docId: string) => {
|
||||||
const params = {
|
const params = {
|
||||||
documentId: docId,
|
documentId: docId,
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.periodExamDoc(id.value.toString()), {
|
.delete(config.API.periodExamDoc(id.value.toString()), {
|
||||||
params,
|
params,
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@
|
||||||
<div class="q-pa-md row col-12 no-wrap">
|
<div class="q-pa-md row col-12 no-wrap">
|
||||||
<!-- การ์ดแสดงจำนวนข้อมูล -->
|
<!-- การ์ดแสดงจำนวนข้อมูล -->
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="text-grey-7 q-pb-sm row text-weight-medium col-12 items-center">
|
<div
|
||||||
|
class="text-grey-7 q-pb-sm row text-weight-medium col-12 items-center"
|
||||||
|
>
|
||||||
<!-- สรุปจำนวนผู้สมัครคัดเลือก -->
|
<!-- สรุปจำนวนผู้สมัครคัดเลือก -->
|
||||||
<datepicker
|
<datepicker
|
||||||
v-model="dateFilter"
|
v-model="dateFilter"
|
||||||
|
|
@ -120,7 +122,8 @@
|
||||||
<div class="col-12 row items-center q-pa-sm">
|
<div class="col-12 row items-center q-pa-sm">
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
'col-12 text-h5 text-weight-bold text-' + `${num.color}`
|
'col-12 text-h5 text-weight-bold text-' +
|
||||||
|
`${num.color}`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
|
|
@ -282,7 +285,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import TableCandidate from "@/modules/03_recruiting/components/TableCandidate.vue";
|
import TableCandidate from "@/modules/03_recruiting/components/TableCandidate.vue";
|
||||||
import ExamFinished from "@/modules/03_recruiting/components/ExamFinished.vue";
|
import ExamFinished from "@/modules/03_recruiting/components/ExamFinished.vue";
|
||||||
import type { DataNumObject } from "@/modules/01_metadata/interface/request/Calendar";
|
import type { DataNumObject } from "@/modules/01_metadata/interface/request/Calendar";
|
||||||
|
|
@ -290,9 +293,15 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const { genColor15, dateToISO, date2Thai, messageError } = mixin;
|
const {
|
||||||
const dataStore = useDataStore();
|
genColor15,
|
||||||
const { loaderPage } = dataStore;
|
dateToISO,
|
||||||
|
date2Thai,
|
||||||
|
messageError,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const status = ref<string>("all");
|
const status = ref<string>("all");
|
||||||
|
|
@ -483,7 +492,7 @@ watch(status, (count: String, prevCount: String) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
await fetchDataCom();
|
await fetchDataCom();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -502,7 +511,7 @@ const fetchDataCom = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateOfPeriodExam(status.value, examId.value))
|
.get(config.API.candidateOfPeriodExam(status.value, examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -530,12 +539,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchPeriodExam = async () => {
|
const fetchPeriodExam = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.periodExamStatus(examId.value))
|
.get(config.API.periodExamStatus(examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -550,7 +559,7 @@ const fetchPeriodExam = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -559,7 +568,7 @@ const fetchPeriodExam = async () => {
|
||||||
*/
|
*/
|
||||||
const fetchDataSummary = async () => {
|
const fetchDataSummary = async () => {
|
||||||
dataNum.value = [];
|
dataNum.value = [];
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.countDashbordPeriodExam(examId.value))
|
.get(config.API.countDashbordPeriodExam(examId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -577,12 +586,12 @@ const fetchDataSummary = async () => {
|
||||||
dataNum.value = [];
|
dataNum.value = [];
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const downloadFileDashboard = async () => {
|
const downloadFileDashboard = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(
|
.put(
|
||||||
config.API.periodExamDownloadDashboard(examId.value),
|
config.API.periodExamDownloadDashboard(examId.value),
|
||||||
|
|
@ -606,7 +615,7 @@ const downloadFileDashboard = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -571,14 +571,13 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import HeaderTop from "@/modules/04_registry/components/Information/top.vue";
|
import HeaderTop from "@/modules/04_registry/components/Information/top.vue";
|
||||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||||
const store = useDataStore();
|
|
||||||
const { loaderPage } = store;
|
const { date2Thai, messageError, showLoader, hideLoader } = mixin;
|
||||||
const { date2Thai, messageError } = mixin;
|
|
||||||
const previous = ref<boolean>(false);
|
const previous = ref<boolean>(false);
|
||||||
const next = ref<boolean>(false);
|
const next = ref<boolean>(false);
|
||||||
const addDialog = ref<boolean>(false);
|
const addDialog = ref<boolean>(false);
|
||||||
|
|
@ -870,7 +869,7 @@ const saveEdit = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveDataAgency = async (data: DataLink[]) => {
|
const saveDataAgency = async (data: DataLink[]) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsAgency, data)
|
.post(config.API.cmsAgency, data)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -883,7 +882,7 @@ const saveDataAgency = async (data: DataLink[]) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveDataGoverment = async (data: DataLink[]) => {
|
const saveDataGoverment = async (data: DataLink[]) => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsGoverment, data)
|
.post(config.API.cmsGoverment, data)
|
||||||
|
|
@ -897,7 +896,7 @@ const saveDataGoverment = async (data: DataLink[]) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.cms)
|
.get(config.API.cms)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -952,12 +951,12 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const takeLogo = async () => {
|
const takeLogo = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("FileData", imageFileLogo.value);
|
formData.append("FileData", imageFileLogo.value);
|
||||||
await http
|
await http
|
||||||
|
|
@ -974,7 +973,7 @@ const takeLogo = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const takeBanner = async () => {
|
const takeBanner = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("FileData", imageFile.value);
|
formData.append("FileData", imageFile.value);
|
||||||
await http
|
await http
|
||||||
|
|
@ -999,7 +998,7 @@ const sendDataDetail = async () => {
|
||||||
description: web.value.descripstion,
|
description: web.value.descripstion,
|
||||||
shortName: web.value.by,
|
shortName: web.value.by,
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsDeatail, data)
|
.post(config.API.cmsDeatail, data)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -1026,7 +1025,7 @@ const sendDataAbout = async () => {
|
||||||
zipCode: address.value.code,
|
zipCode: address.value.code,
|
||||||
telephone: address.value.tel,
|
telephone: address.value.tel,
|
||||||
};
|
};
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.cmsAbout, data)
|
.post(config.API.cmsAbout, data)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
|
|
@ -1042,7 +1041,7 @@ const sendDataAbout = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchProvince = async () => {
|
const fetchProvince = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.province)
|
.get(config.API.province)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1057,13 +1056,13 @@ const fetchProvince = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchDistrict = async (id: string | null) => {
|
const fetchDistrict = async (id: string | null) => {
|
||||||
if (id !== null && id != "") {
|
if (id !== null && id != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listDistrict(id))
|
.get(config.API.listDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1078,14 +1077,14 @@ const fetchDistrict = async (id: string | null) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchSubDistrict = async (id: string | null) => {
|
const fetchSubDistrict = async (id: string | null) => {
|
||||||
if (id !== null && id != "") {
|
if (id !== null && id != "") {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.listSubDistrict(id))
|
.get(config.API.listSubDistrict(id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -1104,7 +1103,7 @@ const fetchSubDistrict = async (id: string | null) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
||||||
|
|
@ -338,10 +338,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useProfileDataStore();
|
const store = useProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const name = ref<string>();
|
const name = ref<string>();
|
||||||
|
|
@ -598,7 +598,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAssessmentId(profileId.value))
|
.get(config.API.profileAssessmentId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -624,7 +624,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -717,7 +717,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileAssessmentId(profileId.value), {
|
.post(config.API.profileAssessmentId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -747,7 +747,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileAssessmentId(id.value), {
|
.put(config.API.profileAssessmentId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -784,7 +784,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileAssessmentId(id.value))
|
.delete(config.API.profileAssessmentId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -901,7 +901,7 @@ const clickEditRow = () => {
|
||||||
const clickHistory = async (row: RequestItemsObject) => {
|
const clickHistory = async (row: RequestItemsObject) => {
|
||||||
tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ";
|
tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ";
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAssessmentHisId(row.id))
|
.get(config.API.profileAssessmentHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -927,7 +927,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ import { onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useProfileDataStore } from "@/modules/04_registry/store";
|
import { useProfileDataStore } from "@/modules/04_registry/store";
|
||||||
import { useDataStore } from "@/stores/data";
|
|
||||||
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
import ProfileTable from "@/modules/04_registry/components/Table.vue";
|
||||||
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
|
||||||
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
import DialogFooter from "@/modules/04_registry/components/DialogFooter.vue";
|
||||||
|
|
@ -294,10 +294,10 @@ const props = defineProps({
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const store = useProfileDataStore();
|
const store = useProfileDataStore();
|
||||||
const { profileData, changeProfileColumns } = store;
|
const { profileData, changeProfileColumns } = store;
|
||||||
const dataStore = useDataStore();
|
|
||||||
const { loaderPage } = dataStore;
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||||
|
mixin;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = ref<string>("");
|
const id = ref<string>("");
|
||||||
const issuer = ref<string>();
|
const issuer = ref<string>();
|
||||||
|
|
@ -490,7 +490,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileHonorId(profileId.value))
|
.get(config.API.profileHonorId(profileId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -514,7 +514,7 @@ const fetchData = async () => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -604,7 +604,7 @@ const clickSave = async () => {
|
||||||
*/
|
*/
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (profileId.value) {
|
if (profileId.value) {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.profileHonorId(profileId.value), {
|
.post(config.API.profileHonorId(profileId.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -632,7 +632,7 @@ const saveData = async () => {
|
||||||
* บันทึกแก้ไขข้อมูล
|
* บันทึกแก้ไขข้อมูล
|
||||||
*/
|
*/
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.profileHonorId(id.value), {
|
.put(config.API.profileHonorId(id.value), {
|
||||||
id: id.value,
|
id: id.value,
|
||||||
|
|
@ -667,7 +667,7 @@ const clickDelete = async () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.profileHonorId(id.value))
|
.delete(config.API.profileHonorId(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -781,7 +781,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
|
? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น"
|
||||||
: "ประวัติแก้ไขประกาศเกียรติคุณ";
|
: "ประวัติแก้ไขประกาศเกียรติคุณ";
|
||||||
modalHistory.value = true;
|
modalHistory.value = true;
|
||||||
loaderPage(true);
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileHonorHisId(row.id))
|
.get(config.API.profileHonorHisId(row.id))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -805,7 +805,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
hideLoader();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue