Refactoring code module 12_evaluatePersonal
This commit is contained in:
parent
381ec04492
commit
490f02309e
33 changed files with 598 additions and 1036 deletions
|
|
@ -50,7 +50,6 @@ const dataDettail = reactive<FormData>({
|
|||
position: "",
|
||||
phone: "",
|
||||
email: "",
|
||||
qualification: "",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -81,9 +80,9 @@ function fetchData() {
|
|||
* @param formData ข้อมุลชื่อกรรมการ
|
||||
*/
|
||||
function onSubmit(formData: FormData) {
|
||||
dialogConfirm($q, () => {
|
||||
dialogConfirm($q, async () => {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.put(config.API.evaluateDirectorById(directorId.value), {
|
||||
prefix: formData.prefix,
|
||||
firstName: formData.firstname,
|
||||
|
|
@ -92,10 +91,10 @@ function onSubmit(formData: FormData) {
|
|||
email: formData.email,
|
||||
phone: formData.phone,
|
||||
})
|
||||
.then(() => {
|
||||
props.fetchDataList?.();
|
||||
onCloseDialog();
|
||||
.then(async () => {
|
||||
await props.fetchDataList?.();
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
onCloseDialog();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -128,7 +127,7 @@ watch(
|
|||
<Form
|
||||
:on-submit="onSubmit"
|
||||
:data="dataDettail"
|
||||
:actionType="actionType"
|
||||
:action-type="actionType"
|
||||
/>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue