updated probation
This commit is contained in:
parent
4c85c5bc8c
commit
77609f20ad
13 changed files with 93 additions and 54 deletions
|
|
@ -256,6 +256,7 @@ function save() {
|
|||
};
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.put(
|
||||
config.API.editFormEvaluateCommader(assignId.value, evaluate_id.value),
|
||||
|
|
@ -264,9 +265,11 @@ function save() {
|
|||
.then((res: any) => {
|
||||
status.value = false;
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ function putformData() {
|
|||
commander_dated: dateToISO(dateAutherise.value),
|
||||
};
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createformCommader(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -236,6 +237,9 @@ function putformData() {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ function putformData() {
|
|||
};
|
||||
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.put(
|
||||
config.API.editFormEvaluateChairman(assignId.value, evaluate_id.value),
|
||||
|
|
@ -388,6 +389,9 @@ function putformData() {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -354,6 +354,7 @@ const putformData = () => {
|
|||
director2_dated: dateToISO(director2_dated.value),
|
||||
};
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createformChairman(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -362,6 +363,9 @@ const putformData = () => {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ async function postData(action: string) {
|
|||
expand_month: expand_month.value,
|
||||
};
|
||||
if (action === "post") {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createformReport(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -202,9 +203,10 @@ async function postData(action: string) {
|
|||
})
|
||||
.finally(() => {
|
||||
status.value = false;
|
||||
fecthResult(assignId.value);
|
||||
hideLoader();
|
||||
});
|
||||
} else if (action === "put") {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.createformReport(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -216,7 +218,7 @@ async function postData(action: string) {
|
|||
})
|
||||
.finally(() => {
|
||||
status.value = false;
|
||||
fecthResult(assignId.value);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ const {
|
|||
dateToISO,
|
||||
messageError,
|
||||
hideLoader,
|
||||
showLoader,
|
||||
dialogConfirm,
|
||||
} = mixin;
|
||||
const { ratingColors } = probationStore;
|
||||
|
|
@ -312,6 +313,7 @@ function putformData() {
|
|||
* @param data ข้อมูลที่ส่งไป
|
||||
*/
|
||||
async function saveformdata(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createformevaluate(assignId.value), data)
|
||||
.then((res: any) => {
|
||||
|
|
@ -320,6 +322,9 @@ async function saveformdata(data: any) {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -328,14 +333,17 @@ async function saveformdata(data: any) {
|
|||
* @param data ข้อมูลที่อัปเดต
|
||||
*/
|
||||
async function editData(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.editFormEvaluate(assignId.value, evaluate_id.value), data)
|
||||
.then((res: any) => {
|
||||
status.value = false;
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ const {
|
|||
messageError,
|
||||
dialogConfirm,
|
||||
dialogMessageNotify,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
} = mixin;
|
||||
|
||||
const { ratingColors } = probationStore;
|
||||
|
|
@ -292,6 +294,7 @@ function putformData() {
|
|||
* @param data ข้อมูลที่ได้จาก ฟังชั่น putformData
|
||||
*/
|
||||
async function saveformdata(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.createformevaluate(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -300,6 +303,9 @@ async function saveformdata(data: any) {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ const mixin = useCounterMixin();
|
|||
const {
|
||||
date2Thai,
|
||||
success,
|
||||
notifyError,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
dateToISO,
|
||||
messageError,
|
||||
dialogConfirm,
|
||||
|
|
@ -297,6 +298,7 @@ function putformData() {
|
|||
* @param data ข้อมูลที่ save
|
||||
*/
|
||||
async function saveformdata(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.formevaluateCommander(assignId.value), data)
|
||||
.then(() => {
|
||||
|
|
@ -305,6 +307,9 @@ async function saveformdata(data: any) {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,7 @@ function putformData() {
|
|||
|
||||
/** save data */
|
||||
async function saveformdata(data: any) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.formevaluateCommander(assignId.value), data)
|
||||
.then((res: any) => {
|
||||
|
|
@ -332,6 +333,9 @@ async function saveformdata(data: any) {
|
|||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue