refactor(FE): Use name_with_periode in HppPerKandang cell

This commit is contained in:
rstubryan
2026-01-19 20:57:16 +07:00
parent 67f7a68f1b
commit cbc54eb501
3 changed files with 4 additions and 2 deletions
@@ -562,8 +562,8 @@ const HppPerKandangTab = () => {
header: 'Kandang',
accessorKey: 'kandang.name',
cell: (props) => {
const kandang = props.row.original.kandang;
return kandang?.name || '-';
const row = props.row.original;
return row.name_with_periode || row.kandang?.name || '-';
},
footer: () => <div className='font-semibold text-gray-900'>ALL</div>,
},
+1
View File
@@ -10,6 +10,7 @@ export type BaseProjectFlockKandang = {
kandang_id: number;
kandang: Kandang;
project_flock: ProjectFlock;
name_with_period?: string;
approval: BaseApproval;
chickins?: Chickin[];
available_qtys?: AvailableQty[];
+1
View File
@@ -5,6 +5,7 @@ import { Kandang } from '@/types/api/master-data/kandang';
export type HppPerKandangRow = {
id: number;
kandang: Kandang;
name_with_periode?: string;
weight_range: {
weight_min: number;
weight_max: number;