แก้ fetch data ทะเบียน
This commit is contained in:
parent
e4f153b654
commit
dc05b4740c
18 changed files with 158 additions and 125 deletions
|
|
@ -366,7 +366,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขผลก
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -319,7 +319,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขประ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขวิน
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,9 @@ const $q = useQuasar(); // show dialog
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { success, messageError } = mixin;
|
const { success, messageError } = mixin;
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const uploader = ref<any>();
|
const uploader = ref<any>();
|
||||||
const files = ref<any>([]);
|
const files = ref<any>([]);
|
||||||
|
|
|
||||||
|
|
@ -655,7 +655,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขประ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -606,6 +606,7 @@ const getNewData = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
loaderPage(true);
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileAdrsId(route.params.id.toString()))
|
.get(config.API.profileAdrsId(route.params.id.toString()))
|
||||||
|
|
@ -627,6 +628,7 @@ const fetchData = async () => {
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false);
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขใบอ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -1299,6 +1299,7 @@ const fetchHistory = async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
loaderPage(true);
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileFamiId(route.params.id.toString()))
|
.get(config.API.profileFamiId(route.params.id.toString()))
|
||||||
|
|
@ -1354,6 +1355,7 @@ const fetchData = async () => {
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
loaderPage(false);
|
loaderPage(false);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
|
||||||
|
|
@ -962,6 +962,7 @@ const calRetire = async (birth: Date) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
if (route.params.id) {
|
||||||
loaderPage(true);
|
loaderPage(true);
|
||||||
await http
|
await http
|
||||||
.get(config.API.profileInforId(route.params.id.toString()))
|
.get(config.API.profileInforId(route.params.id.toString()))
|
||||||
|
|
@ -988,7 +989,10 @@ const fetchData = async () => {
|
||||||
dateBefore.value = new Date(data.birthDate);
|
dateBefore.value = new Date(data.birthDate);
|
||||||
same.value = data.changeName == true ? "1" : "0";
|
same.value = data.changeName == true ? "1" : "0";
|
||||||
await calRetire(new Date(dateToISO(new Date(data.birthDate))));
|
await calRetire(new Date(dateToISO(new Date(data.birthDate))));
|
||||||
if (data.profileType == "officer" && columnsHistory.value.length >= 15) {
|
if (
|
||||||
|
data.profileType == "officer" &&
|
||||||
|
columnsHistory.value.length >= 15
|
||||||
|
) {
|
||||||
columnsHistory.value.splice(13, 1);
|
columnsHistory.value.splice(13, 1);
|
||||||
columnsHistory.value.splice(12, 1);
|
columnsHistory.value.splice(12, 1);
|
||||||
}
|
}
|
||||||
|
|
@ -1000,6 +1004,7 @@ const fetchData = async () => {
|
||||||
// loaderPage(false);
|
// loaderPage(false);
|
||||||
await props.fetchDataProfile();
|
await props.fetchDataProfile();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const editData = async () => {
|
const editData = async () => {
|
||||||
|
|
|
||||||
|
|
@ -527,7 +527,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขเคร
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขการ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filterTotal = ref<string>("");
|
const filterTotal = ref<string>("");
|
||||||
const rowsTotal = ref<RequestItemsTotalObject[]>([]); //select data history
|
const rowsTotal = ref<RequestItemsTotalObject[]>([]); //select data history
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขอื่
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -909,7 +909,7 @@ const tittleHistory = ref<string>("ประวัติแก้ไขตำแ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(route.params.id ? route.params.id.toString() : "");
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -918,7 +918,7 @@ const tittleHistory = ref<string>("ประวัติแก้ไขตำแ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(route.params.id ? route.params.id.toString() : "");
|
||||||
const rows = ref<ResponseObjectEmployee[]>([]);
|
const rows = ref<ResponseObjectEmployee[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -941,7 +941,7 @@ const tittleHistory = ref<string>("ประวัติแก้ไขตำแ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(route.params.id ? route.params.id.toString() : "");
|
||||||
const rows = ref<ResponseObjectEmployee[]>([]);
|
const rows = ref<ResponseObjectEmployee[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขควา
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขการ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,9 @@ const tittleHistory = ref<string>("ประวัติแก้ไขปฏิ
|
||||||
const filterHistory = ref<string>(""); //search data table history
|
const filterHistory = ref<string>(""); //search data table history
|
||||||
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
const modalHistory = ref<boolean>(false); //modal ประวัติการแก้ไขข้อมูล
|
||||||
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
const checkValidate = ref<boolean>(false); //validate data ผ่านหรือไม่
|
||||||
const profileId = ref<string>(route.params.id.toString());
|
const profileId = ref<string>(
|
||||||
|
route.params.id ? route.params.id.toString() : ""
|
||||||
|
);
|
||||||
const rows = ref<RequestItemsObject[]>([]);
|
const rows = ref<RequestItemsObject[]>([]);
|
||||||
const filter = ref<string>(""); //search data table
|
const filter = ref<string>(""); //search data table
|
||||||
const visibleColumns = ref<String[]>([]);
|
const visibleColumns = ref<String[]>([]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue