mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-23 14:55:44 +00:00
refactor(FE): Format product prices using formatCurrency helper
This commit is contained in:
@@ -24,7 +24,7 @@ import RequirePermission from '@/components/helper/RequirePermission';
|
|||||||
|
|
||||||
import { Product } from '@/types/api/master-data/product';
|
import { Product } from '@/types/api/master-data/product';
|
||||||
import { ProductApi } from '@/services/api/master-data';
|
import { ProductApi } from '@/services/api/master-data';
|
||||||
import { cn } from '@/lib/helper';
|
import { cn, formatCurrency } from '@/lib/helper';
|
||||||
import { isResponseError, isResponseSuccess } from '@/lib/api-helper';
|
import { isResponseError, isResponseSuccess } from '@/lib/api-helper';
|
||||||
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||||
import { ROWS_OPTIONS } from '@/config/constant';
|
import { ROWS_OPTIONS } from '@/config/constant';
|
||||||
@@ -155,13 +155,17 @@ const ProductsTable = () => {
|
|||||||
accessorKey: 'product_price',
|
accessorKey: 'product_price',
|
||||||
header: 'Harga Produk',
|
header: 'Harga Produk',
|
||||||
cell: (props) =>
|
cell: (props) =>
|
||||||
props.row.original.product_price?.toLocaleString() ?? '-',
|
props.row.original.product_price
|
||||||
|
? formatCurrency(props.row.original.product_price)
|
||||||
|
: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'selling_price',
|
accessorKey: 'selling_price',
|
||||||
header: 'Harga Jual',
|
header: 'Harga Jual',
|
||||||
cell: (props) =>
|
cell: (props) =>
|
||||||
props.row.original.selling_price?.toLocaleString() ?? '-',
|
props.row.original.selling_price
|
||||||
|
? formatCurrency(props.row.original.selling_price)
|
||||||
|
: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'tax',
|
accessorKey: 'tax',
|
||||||
|
|||||||
Reference in New Issue
Block a user