feat(FE-316,317): Add accessorKey and id for UniformityTable columns

This commit is contained in:
rstubryan
2025-12-23 22:15:33 +07:00
parent 035f187bac
commit 9e5d878e82
@@ -229,22 +229,27 @@ const UniformityTable = ({ refresh }: { refresh?: () => void }) => {
},
},
{
accessorKey: 'location.name',
header: 'Lokasi',
cell: (props) => props.row.original.location.name || '-',
},
{
accessorKey: 'project_flock_kandang_id',
header: 'Flock',
cell: (props) => `Flock ${props.row.original.project_flock_kandang_id}`,
},
{
accessorKey: 'kandang.name',
header: 'Kandang',
cell: (props) => props.row.original.kandang.name || '-',
},
{
accessorKey: 'week',
header: 'Tanggal (Week)',
cell: (props) => `Week ${props.row.original.week}`,
},
{
accessorKey: 'status',
header: 'Status',
cell: (props) => {
const status = props.row.original.status;
@@ -256,6 +261,7 @@ const UniformityTable = ({ refresh }: { refresh?: () => void }) => {
},
},
{
accessorKey: 'uniformity',
header: 'Uniformity',
cell: (props) => {
const uniformity = props.row.original.uniformity;
@@ -263,6 +269,7 @@ const UniformityTable = ({ refresh }: { refresh?: () => void }) => {
},
},
{
id: 'actions',
header: 'Aksi',
cell: (props: CellContext<Uniformity, unknown>) => {
const currentPageSize = props.table.getPaginationRowModel().rows.length;