From 6fbec7df15d389e1eac4c6c7e4864a1cf0d58754 Mon Sep 17 00:00:00 2001 From: Viet Anh Nguyen Date: Thu, 7 Mar 2024 17:04:23 +0700 Subject: [PATCH] Show - for zeros --- .../components/report-detail/report-overview-table.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cope2n-fe/src/components/report-detail/report-overview-table.tsx b/cope2n-fe/src/components/report-detail/report-overview-table.tsx index 5a40ea6..cc2b3b1 100644 --- a/cope2n-fe/src/components/report-detail/report-overview-table.tsx +++ b/cope2n-fe/src/components/report-detail/report-overview-table.tsx @@ -1,7 +1,7 @@ import type { TableColumnsType } from 'antd'; import { Table } from 'antd'; import React from 'react'; -import { ensureMax, ensureMin, formatPercent } from 'utils/metric-format'; +import { ensureMax, ensureMin, formatPercent, formatNumber } from 'utils/metric-format'; interface DataType { key: React.Key; @@ -224,7 +224,7 @@ const columns: TableColumnsType = [ const isAbnormal = ensureMax(record.snImeiAPT, 2); return ( - {record?.snImeiAPT?.toFixed(1)} + {formatNumber(record?.snImeiAPT)} ); }, @@ -237,7 +237,7 @@ const columns: TableColumnsType = [ const isAbnormal = ensureMax(record.invoiceAPT, 2); return ( - {record?.invoiceAPT?.toFixed(1)} + {formatNumber(record?.invoiceAPT)} ); }, @@ -252,7 +252,7 @@ const columns: TableColumnsType = [ render: (_, record) => { return ( - {formatPercent(record.reviewProgress)==='-'? 0:formatPercent(record.reviewProgress)} + {formatPercent(record.reviewProgress) === '-' ? 0 : formatPercent(record.reviewProgress)} ); },