mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +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 { 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 { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||
import { ROWS_OPTIONS } from '@/config/constant';
|
||||
@@ -155,13 +155,17 @@ const ProductsTable = () => {
|
||||
accessorKey: 'product_price',
|
||||
header: 'Harga Produk',
|
||||
cell: (props) =>
|
||||
props.row.original.product_price?.toLocaleString() ?? '-',
|
||||
props.row.original.product_price
|
||||
? formatCurrency(props.row.original.product_price)
|
||||
: '-',
|
||||
},
|
||||
{
|
||||
accessorKey: 'selling_price',
|
||||
header: 'Harga Jual',
|
||||
cell: (props) =>
|
||||
props.row.original.selling_price?.toLocaleString() ?? '-',
|
||||
props.row.original.selling_price
|
||||
? formatCurrency(props.row.original.selling_price)
|
||||
: '-',
|
||||
},
|
||||
{
|
||||
accessorKey: 'tax',
|
||||
|
||||
Reference in New Issue
Block a user