fix(ข้อมูลการประเมิน):sort Pagination
This commit is contained in:
parent
73d03def0b
commit
27622b86a9
9 changed files with 150 additions and 390 deletions
|
|
@ -37,7 +37,10 @@ const {
|
|||
findOrgNameHtml,
|
||||
} = useCounterMixin();
|
||||
const { statusText } = useRegistryEmp();
|
||||
const { pagination, params, onRequest } = usePagination("", fetchList);
|
||||
const { pagination, params, onRequest, checkAndUpdatePage } = usePagination(
|
||||
"",
|
||||
fetchList
|
||||
);
|
||||
|
||||
const modalAddEmployee = ref<boolean>(false); // popup เพิ่มข้อมูลลูกจ้างชั่วคราว
|
||||
const modalPos = ref<boolean>(false); //popup กำหนดตำแหน่ง
|
||||
|
|
@ -224,9 +227,7 @@ function onClickDelete(id: string) {
|
|||
await http
|
||||
.delete(config.API.registryNew("-employee") + `/${id}`)
|
||||
.then(async () => {
|
||||
if (rows.value.length === 1 && pagination.value.page > 1) {
|
||||
pagination.value.page = pagination.value.page - 1;
|
||||
}
|
||||
await checkAndUpdatePage(rows.value.length);
|
||||
await fetchList();
|
||||
await success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue