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