feat(FE): Show age with week in sales report table

This commit is contained in:
rstubryan
2026-01-22 11:26:47 +07:00
parent 2ff217efcb
commit 9cffa53122
2 changed files with 11 additions and 6 deletions
@@ -112,12 +112,16 @@ const SalesReportTable = ({
<div className='font-semibold text-gray-900'>Total Penjualan</div>
),
},
// {
// id: 'age',
// accessorKey: 'age',
// header: 'Umur',
// cell: (props) => props.getValue() || '-',
// },
{
id: 'age',
accessorKey: 'age',
header: 'Umur',
cell: (props) => {
const age = props.row.original.age;
const week = props.row.original.week;
return age && week ? `${formatNumber(age)} (Minggu ke-${week})` : '-';
},
},
{
id: 'do_number',
accessorKey: 'do_number',
+1
View File
@@ -17,6 +17,7 @@ export type BaseSales = {
id: number;
realization_date: string;
age: number;
week: number;
do_number: string;
product: Product;
customer: Customer;