อัตรากำลังลูกจ้างประจำ ฯ => fix bug

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-16 11:12:06 +07:00
parent df481043b1
commit 722794a27e
5 changed files with 49 additions and 29 deletions

View file

@ -223,9 +223,13 @@ function onSubmit() {
? config.API.orgPosMasterEmp
: config.API.orgPosMasterByIdEmp(props.rowId);
await http[props.actionType === "ADD" ? "post" : "put"](url, body);
success($q, "บันทีกข้อมูลสำเร็จ");
props.getSummary?.();
props.fetchDataTable?.(reqMaster.value.id, reqMaster.value.type, false);
await props.getSummary?.();
await props.fetchDataTable?.(
reqMaster.value.id,
reqMaster.value.type,
false
);
await success($q, "บันทีกข้อมูลสำเร็จ");
close();
} catch (err) {
messageError($q, err);
@ -296,9 +300,9 @@ function deletePos(id: string) {
showLoader();
http
.delete(config.API.orgEmployeePosById(id))
.then(() => {
success($q, "ลบข้อมูลสำเร็จ");
searchInput();
.then(async () => {
await searchInput();
await success($q, "ลบข้อมูลสำเร็จ");
})
.catch((err) => {
messageError($q, err);
@ -629,11 +633,14 @@ watch(
<q-btn
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
color="secondary"
icon="mdi-dots-horizontal-circle-outline"
round
>
<q-menu anchor="bottom middle" self="top middle">
<q-menu
transition-show="jump-down"
transition-hide="jump-up"
>
<q-list
dense
v-for="(item, index) in listMenu"
@ -650,11 +657,14 @@ watch(
: deletePos(props.row.id)
"
>
<q-item-section avatar>
<q-item-section
avatar
style="min-width: 0px"
>
<q-icon
:color="item.color"
:name="item.icon"
size="sm"
size="xs"
/>
</q-item-section>
<q-item-section>{{