fix CurrentPage ===> จัดการผู้ใช้งาน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-07-11 10:14:20 +07:00
parent 8aa17c7648
commit 72ba71c1f6
2 changed files with 26 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import { useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { updateCurrentPage } from "@/utils/functions";
/** importType*/
import type { QTableProps } from "quasar";
@ -233,12 +234,17 @@ function openDialog() {
* @param id รายการผใชงาน
* ลบขอมลรายชอเสรจแลวทำการดงขอมลรายชอผใชงานใหม
*/
function onDeleteUser(id: string) {
async function onDeleteUser(id: string) {
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.managementUser + `/${id}`)
.then(async () => {
currentPage.value = await updateCurrentPage(
currentPage.value,
maxPage.value,
rows.value.length
);
await fetchListUsers();
success($q, "ลบข้อมูลสำเร็จ");
})