remove $ on table and remove decimal on max transaction per day in transfer type module
This commit is contained in:
@ -378,6 +378,10 @@ const AddDialog = () => {
|
||||
thousandSeparator="."
|
||||
decimalSeparator=","
|
||||
allowNegative={false}
|
||||
decimalScale={0}
|
||||
isAllowed={({ floatValue }) =>
|
||||
floatValue === undefined || Number.isInteger(floatValue)
|
||||
}
|
||||
onValueChange={(values) => {
|
||||
setFormField((prev) => ({
|
||||
...prev,
|
||||
|
||||
@ -574,6 +574,10 @@ const EditDialog = () => {
|
||||
thousandSeparator="."
|
||||
decimalSeparator=","
|
||||
allowNegative={false}
|
||||
decimalScale={0}
|
||||
isAllowed={({ floatValue }) =>
|
||||
floatValue === undefined || Number.isInteger(floatValue)
|
||||
}
|
||||
onValueChange={(values) => {
|
||||
setFormField((prev) => ({
|
||||
...prev,
|
||||
|
||||
@ -24,13 +24,19 @@ function useDebounce<T>(value: T, delay: number): T {
|
||||
|
||||
const formatNumber = (num: number): string => {
|
||||
return num.toLocaleString('en-US', {
|
||||
style: 'currency',
|
||||
currency: 'USD',
|
||||
style: 'decimal',
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
});
|
||||
};
|
||||
|
||||
const formatInteger = (num: number): string => {
|
||||
return num.toLocaleString('en-US', {
|
||||
style: 'decimal',
|
||||
maximumFractionDigits: 0
|
||||
})
|
||||
}
|
||||
|
||||
interface AccountProps {
|
||||
id: string;
|
||||
name: string;
|
||||
@ -195,7 +201,7 @@ const ManageTransferTypeContextProvider = ({ children }: { children: React.React
|
||||
header: ({ column }) => (
|
||||
<DataGridColumnHeader title="Max Transaction Per Day" column={column} />
|
||||
),
|
||||
cell: ({ row }) => formatNumber(row.original.max_transaction_per_day),
|
||||
cell: ({ row }) => formatInteger(row.original.max_transaction_per_day),
|
||||
enableSorting: false,
|
||||
enableHiding: false,
|
||||
meta: { headerClassName: 'w-[250px]' }
|
||||
|
||||
Reference in New Issue
Block a user