ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -240,7 +240,7 @@ const rows = ref<RequestItemsObject[]>([]);
|
|||
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 filter = ref<string>(""); //search data table
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.candidateEducation(candidateId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -343,12 +343,12 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const fetcheducationLevel = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.educationLevel)
|
||||
.then((res) => {
|
||||
|
|
@ -363,7 +363,7 @@ const fetcheducationLevel = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -444,7 +444,7 @@ const checkDelete = (row: RequestItemsObject) => {
|
|||
*/
|
||||
const clickDeleteRow = async () => {
|
||||
if (rawItem.value != null) {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.delete(config.API.candidateAdminEducation(rawItem.value.id))
|
||||
.then(() => {
|
||||
|
|
@ -480,7 +480,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.candidateAdminEducation(candidateId.value), {
|
||||
educationLevelId: educationLevelId.value,
|
||||
|
|
@ -505,7 +505,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.put(config.API.candidateAdminEducation(id.value), {
|
||||
educationLevelId: educationLevelId.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue