เพิ่ม่สง null file

This commit is contained in:
setthawutttty 2025-07-21 15:16:04 +07:00
parent 6f330cfd83
commit e22f130361
2 changed files with 10 additions and 4 deletions

View file

@ -161,7 +161,7 @@ async function onSubmit() {
dateLeave.value !== null ? dateToISO(dateLeave.value) : ""
);
formData.append("Reason", noteReason.value);
formData.append("file", files.value);
formData.append("file", files.value ? files.value : null);
if (noteReason.value == "OTHER") {
formData.append("remark", remark.value);
}
@ -478,7 +478,10 @@ onMounted(async () => {
></q-file>
</div>
<div class="col-12 row" v-if="routeName != 'AddRetire'">
<div
class="col-12 row"
v-if="routeName != 'AddRetire' && files && files.length > 0"
>
<q-card bordered flat class="row col-12 text-dark q-mt-sm">
<div
class="bg-grey-1 q-pa-sm col-12 row items-center text-primary"