Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(empty page): Null check for contract table column #53

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ContractsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function ContractsTable({ type, title, subtitle }: IContractsTable) {
field: 'assetId',
flex: 1,
headerName: t('content.contractHistory.columns.assetId'),
valueGetter: ({ row }) => row.contractAgreementInfo,
valueGetter: ({ row }) => row?.contractAgreementInfo?.assetId,
valueFormatter: ({ value }) => value?.assetId,
renderCell: ({ row }) => (
<Tooltips tooltipPlacement="top-start" tooltipArrow={false} tooltipText={row?.contractAgreementInfo?.assetId}>
Expand Down Expand Up @@ -111,7 +111,7 @@ function ContractsTable({ type, title, subtitle }: IContractsTable) {
headerName: t('content.contractHistory.columns.contractSigningDate'),
sortingOrder: ['asc', 'desc'],
sortComparator: (v1, v2, param1: GridValidRowModel, param2: GridValidRowModel) => param2.id - param1.id,
valueGetter: ({ row }) => row.contractAgreementInfo,
valueGetter: ({ row }) => convertEpochToDate(row.contractAgreementInfo?.contractSigningDate),
valueFormatter: ({ value }) => convertEpochToDate(value?.contractSigningDate),
renderCell: ({ row }) =>
row.contractAgreementInfo?.contractSigningDate ? (
Expand Down
22 changes: 11 additions & 11 deletions src/helpers/RouteHelper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
import { lazy, ReactElement } from 'react';
import { Logout } from '@mui/icons-material';
import { ReactElement } from 'react';

const ConsumeData = lazy(() => import('../pages/ConsumeData'));
const ConsumerContracts = lazy(() => import('../pages/ConsumerContracts'));
const CreateData = lazy(() => import('../pages/CreateData'));
const Help = lazy(() => import('../pages/Help'));
const Home = lazy(() => import('../pages/Home'));
const Logout = lazy(() => import('../pages/Logout'));
const PageNotFound = lazy(() => import('../pages/PageNotFound'));
const ProviderContracts = lazy(() => import('../pages/ProviderContracts'));
const UploadHistoryNew = lazy(() => import('../pages/UploadHistoryNew'));
const About = lazy(() => import('../pages/About'));
import About from '../pages/About';
import ConsumeData from '../pages/ConsumeData';
import ConsumerContracts from '../pages/ConsumerContracts';
import CreateData from '../pages/CreateData';
import Help from '../pages/Help';
import Home from '../pages/Home';
import PageNotFound from '../pages/PageNotFound';
import ProviderContracts from '../pages/ProviderContracts';
import UploadHistoryNew from '../pages/UploadHistoryNew';

export interface IRoutes {
key?: string;
Expand Down