mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE): Enable sales tab and fetch sales data
This commit is contained in:
@@ -52,11 +52,11 @@ const ClosingDetail: React.FC<ClosingDetailProps> = ({
|
||||
/>
|
||||
),
|
||||
},
|
||||
// {
|
||||
// id: 'penjualan',
|
||||
// label: 'Penjualan',
|
||||
// content: <SalesReportTable initialValues={salesData} />,
|
||||
// },
|
||||
{
|
||||
id: 'penjualan',
|
||||
label: 'Penjualan',
|
||||
content: <SalesReportTable initialValues={salesData} />,
|
||||
},
|
||||
{
|
||||
id: 'overhead',
|
||||
label: 'Overhead',
|
||||
|
||||
@@ -215,31 +215,31 @@ const SalesReportTable = ({
|
||||
return kandang?.name || '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'payment_status',
|
||||
accessorKey: 'payment_status',
|
||||
header: 'Status Pembayaran',
|
||||
cell: (props) => {
|
||||
const status = props.getValue() as string;
|
||||
const getStatusColor = (status: string) => {
|
||||
if (!status) return 'neutral';
|
||||
switch (status.toLowerCase()) {
|
||||
case 'paid':
|
||||
return 'success';
|
||||
case 'tempo':
|
||||
return 'warning';
|
||||
default:
|
||||
return 'neutral';
|
||||
}
|
||||
};
|
||||
// {
|
||||
// id: 'payment_status',
|
||||
// accessorKey: 'payment_status',
|
||||
// header: 'Status Pembayaran',
|
||||
// cell: (props) => {
|
||||
// const status = props.getValue() as string;
|
||||
// const getStatusColor = (status: string) => {
|
||||
// if (!status) return 'neutral';
|
||||
// switch (status.toLowerCase()) {
|
||||
// case 'paid':
|
||||
// return 'success';
|
||||
// case 'tempo':
|
||||
// return 'warning';
|
||||
// default:
|
||||
// return 'neutral';
|
||||
// }
|
||||
// };
|
||||
|
||||
return (
|
||||
<Badge variant='soft' size='sm' color={getStatusColor(status)}>
|
||||
{status || '-'}
|
||||
</Badge>
|
||||
);
|
||||
},
|
||||
},
|
||||
// return (
|
||||
// <Badge variant='soft' size='sm' color={getStatusColor(status)}>
|
||||
// {status || '-'}
|
||||
// </Badge>
|
||||
// );
|
||||
// },
|
||||
// },
|
||||
],
|
||||
[]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user