no message

This commit is contained in:
Kittapath 2024-02-03 13:54:45 +07:00
parent 8d1901e2b8
commit 9e44a1a7a8
2 changed files with 60 additions and 40 deletions

View file

@ -82,9 +82,7 @@
<DialogHeader tittle="การลา" :close="clickCloseLeave" />
<q-separator />
<q-card-section class="q-p-sm">
<div
class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs"
>
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
<div class="col-xs-6 col-sm-6 col-md-6">
<selector
:class="getClass(edit)"
@ -748,7 +746,7 @@ const fetchData = async () => {
messageError($q, e);
})
.finally(() => {
store.isLoad++
store.isLoad++;
});
}
};
@ -916,18 +914,18 @@ const clickAddLeave = async () => {
numLeave.value = 0;
numUsedLeave.value = 0;
await clickTotal();
if (rowsTotal.value.length > 0) {
let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({
id: e.typeLeaveId,
name: e.typeLeave,
totalLeave: e.totalLeave,
});
});
typeLeaveOption.value = data;
typeLeaveOptionFilter.value = data;
}
// if (rowsTotal.value.length > 0) {
// let data: DataOptionLeave[] = [];
// rowsTotal.value.map((e: ResponseTotalObject) => {
// data.push({
// id: e.typeLeaveId,
// name: e.typeLeave,
// totalLeave: e.totalLeave,
// });
// });
// typeLeaveOption.value = data;
// typeLeaveOptionFilter.value = data;
// }
// await addData();
};
@ -1137,18 +1135,18 @@ const selectData = async (props: DataProps) => {
numLeave.value = props.row.numLeave;
numUsedLeave.value = props.row.sumLeave;
await clickTotal();
if (rowsTotal.value.length > 0) {
let data: DataOptionLeave[] = [];
rowsTotal.value.map((e: ResponseTotalObject) => {
data.push({
id: e.typeLeaveId,
name: e.typeLeave,
totalLeave: e.totalLeave,
});
});
typeLeaveOption.value = data;
typeLeaveOptionFilter.value = data;
}
// if (rowsTotal.value.length > 0) {
// let data: DataOptionLeave[] = [];
// rowsTotal.value.map((e: ResponseTotalObject) => {
// data.push({
// id: e.typeLeaveId,
// name: e.typeLeave,
// totalLeave: e.totalLeave,
// });
// });
// typeLeaveOption.value = data;
// typeLeaveOptionFilter.value = data;
// }
await checkRowPage();
};
@ -1203,6 +1201,8 @@ const clickTotal = async () => {
.get(config.API.profileLeaveTotalId(profileId.value))
.then((res) => {
let data = res.data.result;
typeLeaveOption.value = data;
typeLeaveOptionFilter.value = data;
data.map((e: ResponseTotalObject) => {
rowsTotal.value.push({
typeLeaveId: e.typeLeaveId,