mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
feat(FE-327): Include Kandang in sales data and display name
This commit is contained in:
@@ -10,6 +10,7 @@ import { formatCurrency, formatNumber, formatDate } from '@/lib/helper';
|
|||||||
import { BaseClosingSales, BaseSales } from '@/types/api/closing/closing';
|
import { BaseClosingSales, BaseSales } from '@/types/api/closing/closing';
|
||||||
import { Product } from '@type/api/master-data/product';
|
import { Product } from '@type/api/master-data/product';
|
||||||
import { Customer } from '@type/api/master-data/customer';
|
import { Customer } from '@type/api/master-data/customer';
|
||||||
|
import { Kandang } from '@type/api/master-data/kandang';
|
||||||
|
|
||||||
interface SalesReportTableProps {
|
interface SalesReportTableProps {
|
||||||
type?: 'detail';
|
type?: 'detail';
|
||||||
@@ -298,7 +299,10 @@ const SalesReportTable = ({
|
|||||||
id: 'kandang',
|
id: 'kandang',
|
||||||
accessorKey: 'kandang',
|
accessorKey: 'kandang',
|
||||||
header: 'Kandang',
|
header: 'Kandang',
|
||||||
cell: (props) => props.getValue() || '-',
|
cell: (props) => {
|
||||||
|
const kandang = props.getValue() as Kandang;
|
||||||
|
return kandang?.name || '-';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'payment_status',
|
id: 'payment_status',
|
||||||
|
|||||||
Vendored
+2
@@ -1,6 +1,7 @@
|
|||||||
import { BaseMetadata } from '@/types/api/api-general';
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
import { Product } from '@type/api/master-data/product';
|
import { Product } from '@type/api/master-data/product';
|
||||||
import { Customer } from '@type/api/master-data/customer';
|
import { Customer } from '@type/api/master-data/customer';
|
||||||
|
import { Kandang } from '@type/api/master-data/kandang';
|
||||||
|
|
||||||
export type BaseSales = {
|
export type BaseSales = {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -14,6 +15,7 @@ export type BaseSales = {
|
|||||||
avg_weight: number;
|
avg_weight: number;
|
||||||
price: number;
|
price: number;
|
||||||
total_price: number;
|
total_price: number;
|
||||||
|
kandang: Kandang;
|
||||||
payment_status: string;
|
payment_status: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user