ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -293,8 +293,7 @@ const { profileData, changeProfileColumns } = store;
|
|||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, success, dateToISO, messageError, showLoader, hideLoader } =
|
||||
mixin;
|
||||
const { date2Thai, success, dateToISO, messageError } = mixin;
|
||||
const route = useRoute();
|
||||
const id = ref<string>("");
|
||||
const level = ref<string>();
|
||||
|
|
@ -546,7 +545,7 @@ const filterSelector = (val: string, update: Function, refData: string) => {
|
|||
};
|
||||
|
||||
const fetchData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileDisId(profileId.value))
|
||||
.then((res) => {
|
||||
|
|
@ -569,7 +568,7 @@ const fetchData = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -657,7 +656,7 @@ const clickSave = async () => {
|
|||
* บันทึกเพิ่มข้อมูล
|
||||
*/
|
||||
const saveData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.post(config.API.profileDisId(profileId.value), {
|
||||
id: id.value,
|
||||
|
|
@ -683,7 +682,7 @@ const saveData = async () => {
|
|||
* บันทึกแก้ไขข้อมูล
|
||||
*/
|
||||
const editData = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.put(config.API.profileDisId(id.value), {
|
||||
id: id.value,
|
||||
|
|
@ -717,7 +716,7 @@ const clickDelete = async () => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.delete(config.API.profileDisId(id.value))
|
||||
.then((res) => {
|
||||
|
|
@ -827,7 +826,7 @@ const clickEditRow = () => {
|
|||
*/
|
||||
const clickHistory = async (row: RequestItemsObject) => {
|
||||
modalHistory.value = true;
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.profileDisHisId(row.id))
|
||||
.then((res) => {
|
||||
|
|
@ -850,7 +849,7 @@ const clickHistory = async (row: RequestItemsObject) => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue