fix updateCurrentPage ==> ผังบัญชีค่าจ้างลูกจ้างประจำ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-07-07 18:13:29 +07:00
parent 697b609f60
commit fb7b4060c9

View file

@ -5,6 +5,7 @@ import { useQuasar } from "quasar";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import { updateCurrentPage } from "@/utils/function";
/** importType*/ /** importType*/
import type { QTableProps } from "quasar"; import type { QTableProps } from "quasar";
@ -179,6 +180,11 @@ function onClickDelete(id: string) {
http http
.delete(config.API.salaryEmployeeChartByid(id)) .delete(config.API.salaryEmployeeChartByid(id))
.then(async () => { .then(async () => {
formFilter.page = await updateCurrentPage(
formFilter.page,
maxPage.value,
rows.value.length
);
await fetchListChart(); await fetchListChart();
await success($q, "ลบข้อมูลสำเร็จ"); await success($q, "ลบข้อมูลสำเร็จ");
}) })
@ -282,7 +288,7 @@ onMounted(() => {
:rows="rows" :rows="rows"
:columns="columns" :columns="columns"
row-key="name" row-key="name"
:rows-per-page-options="[10, 20, 50, 100]" :rows-per-page-options="[1, 10, 20, 50, 100]"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
@update:pagination="updatePageSize" @update:pagination="updatePageSize"
> >