กำหนดเงื่อนไขยกเลิกลาออก
This commit is contained in:
parent
97efaf4712
commit
f464dedc5f
1 changed files with 10 additions and 2 deletions
|
|
@ -128,6 +128,7 @@ const cancelResing = () => {
|
|||
modal.value = true;
|
||||
};
|
||||
|
||||
const checkCancleLeave = ref<boolean>(false);
|
||||
/**
|
||||
* ฟังก์ชั่นเรียกข้อมูลจาก Api
|
||||
* @param id ไอดีของข้อมูล
|
||||
|
|
@ -141,6 +142,12 @@ const fectDataresign = async (id: string) => {
|
|||
tranferOrg.value = data.location;
|
||||
dateCommand.value = data.sendDate;
|
||||
dateLeave.value = data.activeDate;
|
||||
|
||||
const currentDate = new Date();
|
||||
let dueDateMinusOne = new Date(data.activeDate);
|
||||
dueDateMinusOne.setDate(dueDateMinusOne.getDate() - 1);
|
||||
checkCancleLeave.value = currentDate < dueDateMinusOne;
|
||||
|
||||
noteReason.value = data.reason;
|
||||
files.value = data.docs;
|
||||
dataDetail.value = data;
|
||||
|
|
@ -561,6 +568,7 @@ function downloadFile(data: string) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-separator v-if="routeName !== 'AddRetire'" />
|
||||
<q-card-actions
|
||||
align="right"
|
||||
|
|
@ -570,8 +578,8 @@ function downloadFile(data: string) {
|
|||
<q-btn
|
||||
v-if="
|
||||
dataDetail.status !== 'DELETE' &&
|
||||
dataDetail.status !== 'DONE' &&
|
||||
dataDetail.status !== 'CANCEL'
|
||||
dataDetail.status !== 'CANCEL' &&
|
||||
checkCancleLeave
|
||||
"
|
||||
unelevated
|
||||
class="q-px-md items-center"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue