แก้ข้อความและ bug
This commit is contained in:
parent
4c392a9b67
commit
1fd81fb820
2 changed files with 8 additions and 8 deletions
|
|
@ -18,13 +18,14 @@ import RehabilitationForm from "@/modules/05_leave/components/FormLeave/13_Rehab
|
|||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRoute } from "vue-router";
|
||||
import router from "@/router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useLeaveStore } from "@/modules/05_leave/store";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const personalId = ref<string>(route.params.id as string);
|
||||
const leaveId = ref<string>("");
|
||||
const dataStore = useLeaveStore();
|
||||
|
|
@ -232,6 +233,7 @@ function onSubmit(formData: FormData, isLeave: boolean = true) {
|
|||
await http
|
||||
.put(config.API.leaveUserId(personalId.value), formData)
|
||||
.then(() => {
|
||||
fetchDataDetail(personalId.value);
|
||||
success($q, "บันทึกสำเร็จ");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
|
|
@ -239,7 +241,6 @@ function onSubmit(formData: FormData, isLeave: boolean = true) {
|
|||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
fetchDataDetail(personalId.value);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
@ -256,15 +257,14 @@ function onConfirm(id: string) {
|
|||
.put(config.API.leaveUserSendId(personalId.value), { reason: "" })
|
||||
.then(() => {
|
||||
success($q, "ยื่นใบลาสำเร็จ");
|
||||
// router.push("/leave");
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
router.push("/leave");
|
||||
fetchDataDetail(personalId.value);
|
||||
hideLoader();
|
||||
router.push("/leave");
|
||||
// fetchDataDetail(personalId.value);
|
||||
});
|
||||
},
|
||||
"ยืนยันการยื่นใบลา",
|
||||
|
|
|
|||
|
|
@ -228,12 +228,12 @@ function onSubmit(data: any) {
|
|||
:readonly="isReadOnly"
|
||||
ref="titleRef"
|
||||
:rules="[
|
||||
(val) => !!val || 'กรุณากรอกอุทธรณ์/ร้องทุกข์',
|
||||
(val) => !!val || 'กรุณากรอกเรื่องอุทธรณ์/ร้องทุกข์',
|
||||
]"
|
||||
v-model="formData.title"
|
||||
dense
|
||||
outlined
|
||||
label="อุทธรณ์/ร้องทุกข์"
|
||||
label="เรื่องอุทธรณ์/ร้องทุกข์"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue