Merge pull request #13 from SDSRV-IDP/fe/fix-date

fix date format
This commit is contained in:
Nguyen Viet Anh 2024-02-02 13:49:59 +07:00 committed by GitHub Enterprise
commit 65011cba77
4 changed files with 14 additions and 6 deletions

View File

@ -295,6 +295,9 @@ const ReportOverViewTable: React.FC<ReportOverViewTableProps> = ({
dataIndex: 'extractionDate',
key: 'extractionDate',
width: '130px',
render: (_, record) => {
return <span>{record?.extractionDate.toString().split('T')[0]}</span>;
},
},
{
title: 'SN/IMEI',
@ -452,10 +455,10 @@ const ReportOverViewTable: React.FC<ReportOverViewTableProps> = ({
scroll={{ x: 2000 }}
pagination={{
current: pagination.page,
pageSize: pagination.page_size,
total: overviewDataResponse?.page.count,
showTotal: (total, range) =>
`${range[0]}-${range[1]} of ${total} items`,
pageSize: 10,
total: dataSubsRows?.length,
// showTotal: (total, range) =>
// `${range[0]}-${range[1]} of ${total} items`,
onChange: (page, pageSize) => {
setPagination({
page,

View File

@ -43,6 +43,9 @@ const ReportTable: React.FC = () => {
title: 'Created Date',
dataIndex: 'Created Date',
key: 'Created Date',
render: (_, record) => {
return <span>{record['Created Date'].toString().split('T')[0]}</span>;
},
},
{
title: 'No. Requests',

View File

@ -32,6 +32,8 @@ const Dashboard = () => {
start_date: fromData.start_date,
end_date: fromData.end_date,
subsidiary: fromData.subsidiary,
page: pagination.page,
page_size: 30,
});
const handleSubmit = (values: ReportFormValues) => {
console.log('check values >>>', values);

View File

@ -302,13 +302,13 @@ const ReportDetail = () => {
<Typography.Title level={5}>
Start date:{' '}
<span style={{ fontWeight: '400' }}>
{report_data?.metadata?.start_at}
{report_data?.metadata?.start_at.split('T')[0]}
</span>
</Typography.Title>
<Typography.Title level={5}>
End date:{' '}
<span style={{ fontWeight: '400' }}>
{report_data?.metadata?.end_at}
{report_data?.metadata?.end_at.split('T')[0]}
</span>
</Typography.Title>
</HeaderContainer>