fix Leave reason
This commit is contained in:
parent
a3d008024e
commit
698d03ce00
12 changed files with 64 additions and 16 deletions
|
|
@ -122,11 +122,12 @@ function onValidate() {
|
|||
}
|
||||
}
|
||||
|
||||
const isLeave = ref<boolean>(true);
|
||||
const reasonLeave = ref<string>("");
|
||||
/**
|
||||
* check ว่าลาได้ไหม จาก api
|
||||
* @param formData
|
||||
*/
|
||||
const isLeave = ref<boolean>(true);
|
||||
async function fetchCheck() {
|
||||
await http
|
||||
.post(config.API.leaveCheck(), {
|
||||
|
|
@ -138,6 +139,9 @@ async function fetchCheck() {
|
|||
const data = res.data.result;
|
||||
isLeave.value = data.isLeave;
|
||||
formDataBirth.leaveTotal = data.totalDate;
|
||||
reasonLeave.value = data.reason
|
||||
? data.reason
|
||||
: "จำนวนวันลาเกินที่กำหนด";
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -321,7 +325,7 @@ onMounted(() => {
|
|||
>
|
||||
<template v-slot:hint>
|
||||
<span style="color: red">
|
||||
{{ !isLeave ? "จำนวนวันลาเกินที่กำหนด" : "" }}
|
||||
{{ !isLeave ? reasonLeave : "" }}
|
||||
</span>
|
||||
</template>
|
||||
</q-input>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue