mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
fix(FE-41): Menambahkan kolom kapasitas di tabel kandang
This commit is contained in:
@@ -22,7 +22,7 @@ import RowCollapseOptions from '@/components/table/RowCollapseOptions';
|
||||
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
import { KandangApi } from '@/services/api/master-data';
|
||||
import { cn } from '@/lib/helper';
|
||||
import { cn, formatNumber } from '@/lib/helper';
|
||||
import { isResponseSuccess } from '@/lib/api-helper';
|
||||
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||
import { ROWS_OPTIONS } from '@/config/constant';
|
||||
@@ -93,12 +93,19 @@ const KandangsTable = () => {
|
||||
setPageSize,
|
||||
toQueryString: getTableFilterQueryString,
|
||||
} = useTableFilter({
|
||||
initial: { search: '', nameSort: '', locationSort: '', picSort: '' },
|
||||
initial: {
|
||||
search: '',
|
||||
nameSort: '',
|
||||
locationSort: '',
|
||||
capacitySort: '',
|
||||
picSort: '',
|
||||
},
|
||||
paramMap: {
|
||||
page: 'page',
|
||||
pageSize: 'limit',
|
||||
nameSort: 'sort_name',
|
||||
locationSort: 'sort_location',
|
||||
capacitySort: 'sort_capacity',
|
||||
picSort: ' sort_pic',
|
||||
},
|
||||
});
|
||||
@@ -138,6 +145,11 @@ const KandangsTable = () => {
|
||||
header: 'Lokasi',
|
||||
cell: (props) => props.row.original.location.name,
|
||||
},
|
||||
{
|
||||
accessorKey: 'capacity',
|
||||
header: 'Kapasitas',
|
||||
cell: (props) => formatNumber(props.row.original.capacity ?? 0),
|
||||
},
|
||||
{
|
||||
accessorKey: 'pic',
|
||||
header: 'PIC',
|
||||
|
||||
Reference in New Issue
Block a user