feat(division-detail): add row numbering and remove pagination
- Add index column to division position list table - Remove pagination component as it's no longer needed - Map data to include row numbers before display
This commit is contained in:
@@ -70,12 +70,21 @@ const {
|
||||
sort: 'createdAt:asc',
|
||||
'page-number': params['page-number'] || 0,
|
||||
'page-size': params['page-size'] || 10,
|
||||
'page-no-limit': true,
|
||||
})
|
||||
return { success: result.success || false, body: result.body || {} }
|
||||
},
|
||||
entityName: 'division-position',
|
||||
})
|
||||
|
||||
const dataMap = computed(() => {
|
||||
return data.value.map((v, i) => {
|
||||
return {
|
||||
...v,
|
||||
index: i + 1,
|
||||
}
|
||||
})
|
||||
})
|
||||
const headerPrep: HeaderPrep = {
|
||||
title: 'Detail Divisi',
|
||||
icon: 'i-lucide-user',
|
||||
@@ -154,7 +163,7 @@ watch([recId, recAction], () => {
|
||||
<div class="h-6"></div>
|
||||
|
||||
<LazyAppDivisionDetailList
|
||||
:data="data"
|
||||
:data="dataMap"
|
||||
:pagination-meta="paginationMeta"
|
||||
@page-change="handlePageChange"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user