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