แก้ Fetchdata ข้อมูลหลัก

This commit is contained in:
AnandaTon 2023-06-19 17:52:16 +07:00
parent 11e41bc974
commit 5276ba4db3
25 changed files with 178 additions and 108 deletions

View file

@ -458,7 +458,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -477,7 +477,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -577,6 +578,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -584,6 +586,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -591,7 +594,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -458,7 +458,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -477,7 +477,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -577,6 +578,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -584,6 +586,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -591,7 +594,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -458,7 +458,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -477,7 +477,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -577,6 +578,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -584,6 +586,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -591,7 +594,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -496,7 +496,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -515,7 +515,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -587,6 +587,7 @@ const save = async (publish: boolean) => {
})
.finally(() => {
hideLoader();
await fetchData(true);
});
};
@ -608,7 +609,7 @@ const checkDupDataName = (val: string) => {
* งกนปมแกไข ให get data มาใหม
*/
const clickEdit = async () => {
await fetchData();
await fetchData(true);
};
/**
@ -623,6 +624,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -630,7 +632,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -496,7 +496,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -515,7 +515,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -588,8 +588,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -619,6 +620,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -626,6 +628,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -633,7 +636,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**

View file

@ -458,7 +458,7 @@ const clearPublishedData = async () => {
})
.finally(async () => {
await fetchHistory();
await fetchData();
await fetchData(true);
});
};
@ -477,7 +477,7 @@ const publishedData = async () => {
messageError($q, e);
})
.finally(async () => {
await fetchData();
await fetchData(true);
});
};
@ -546,8 +546,9 @@ const save = async (publish: boolean) => {
.catch((e) => {
messageError($q, e);
})
.finally(() => {
.finally(async () => {
hideLoader();
await fetchData(true);
});
};
@ -569,7 +570,7 @@ const checkDupDataName = (val: string) => {
* งกนปมแกไข ให get data มาใหม
*/
const clickEdit = async () => {
await fetchData();
await fetchData(true);
};
/**
@ -577,6 +578,7 @@ const clickEdit = async () => {
*/
const clickSave = async () => {
await save(false);
await fetchData(true);
};
/**
@ -584,6 +586,7 @@ const clickSave = async () => {
*/
const clickDelete = async () => {
await clearPublishedData();
await fetchData(true);
};
/**
@ -591,7 +594,7 @@ const clickDelete = async () => {
*/
const clickCancel = async () => {
edit.value = false;
await fetchData();
await fetchData(true);
};
/**