แก้ไข loader
This commit is contained in:
parent
f072224851
commit
b663eedb09
147 changed files with 3095 additions and 3256 deletions
|
|
@ -202,7 +202,6 @@ import Table from "@/modules/03_recruiting/components/TableCan.vue";
|
|||
import DialogHeader from "@/modules/03_recruiting/components/DialogHeader.vue";
|
||||
import DialogFooter from "@/modules/03_recruiting/components/DialogFooter.vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
const props = defineProps({
|
||||
status: {
|
||||
|
|
@ -229,7 +228,7 @@ const modalEdit = ref<boolean>(false); //modal ที่แสดงใช้ส
|
|||
const rawItem = ref<RequestItemsObject>(); //ข้อมูลเดิมที่เลือกใน row นั้น
|
||||
const rowIndex = ref<number>(0); //indexข้อมูลเดิมที่เลือกใน row นั้น
|
||||
const previous = ref<boolean>(); //แสดงปุ่มดูข้อมูลก่อนหน้า
|
||||
const dataStore = useDataStore();
|
||||
|
||||
const next = ref<boolean>(); //แสดงปุ่มดูข้อมูลต่อไป
|
||||
const editRow = ref<boolean>(false); //เช็คมีการแก้ไขข้อมูล
|
||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||
|
|
@ -237,8 +236,8 @@ const route = useRoute();
|
|||
const candidateId = ref<string>(route.params.candidateId.toString());
|
||||
const rows = ref<RequestItemsObject[]>([]);
|
||||
const filter = ref<string>(""); //search data table
|
||||
const { messageError } = mixin;
|
||||
const { loaderPage } = dataStore;
|
||||
const { messageError, showLoader, hideLoader } = mixin;
|
||||
|
||||
const visibleColumns = ref<String[]>([]);
|
||||
|
||||
examData.career.columns.length == 0
|
||||
|
|
@ -318,7 +317,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateCareer(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -336,7 +335,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -415,7 +414,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
|||
*/
|
||||
const clickDeleteRow = async () => {
|
||||
if (rawItem.value != null) {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.delete(config.API.candidateAdminCareer(rawItem.value.id))
|
||||
.then(() => {
|
||||
|
|
@ -451,7 +450,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateAdminCareer(candidateId.value), {
|
||||
name: location.value,
|
||||
|
|
@ -477,7 +476,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.candidateAdminCareer(id.value), {
|
||||
name: location.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue