From 8c918b90f590c476303e80de51787d2190ac068e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Rode=20Gj=C3=B8sund?= <54101675+MagnusGjosund@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:56:21 +0100 Subject: [PATCH] feat: :sparkles: add new columns (#864) * feat: :sparkles: add new columns * feat: :sparkles: add new datafield and new columns * remove commented code --- .../src/lib/config/tableConfig.tsx | 50 +++++++++++++++++++ .../src/lib/types/heattrace.ts | 4 ++ libs/pipingapp/src/lib/config/tableConfig.tsx | 4 +- .../shared/src/packages/utils-domain/names.ts | 1 + 4 files changed, 57 insertions(+), 2 deletions(-) diff --git a/libs/heattraceapp/src/lib/config/tableConfig.tsx b/libs/heattraceapp/src/lib/config/tableConfig.tsx index 431b65a17..b3ae9606e 100644 --- a/libs/heattraceapp/src/lib/config/tableConfig.tsx +++ b/libs/heattraceapp/src/lib/config/tableConfig.tsx @@ -6,6 +6,7 @@ import { useGridDataSource, } from '@cc-components/shared/workspace-config'; import { + BaseStatus, DateCell, DescriptionCell, LinkCell, @@ -13,6 +14,7 @@ import { StyledMonospace, domainNames, pipetestStatusColormap, + statusColorMap, useHttpClient, } from '@cc-components/shared'; @@ -70,6 +72,16 @@ const columnDefinitions: [ColDef, ...ColDef[]] = [ headerName: domainNames.commPriority1, valueGetter: (pkg) => pkg.data?.priority1, }, + { + colId: 'Priority2', + headerName: domainNames.commPriority2, + valueGetter: (pkg) => pkg.data?.priority2, + }, + { + colId: 'Priority3', + headerName: domainNames.commPriority3, + valueGetter: (pkg) => pkg.data?.priority3, + }, { colId: 'Location', headerName: domainNames.mcLocation, @@ -78,8 +90,25 @@ const columnDefinitions: [ColDef, ...ColDef[]] = [ return {props.value}; }, }, + { + colId: 'MechanicalCompletionStatus', + headerName: domainNames.mcStatus, + valueGetter: (pkg) => pkg.data?.mechanicalCompletionStatus, + cellRenderer: (props: ICellRendererProps) => { + if (!props.data?.mechanicalCompletionStatus) return null; + return ( + + ); + }, + }, // Need to implement the visual checklistStatus { + colId: 'FormStatus', headerName: domainNames.checklistStatus, valueGetter: (pkg) => pkg.data?.formStatus, cellRenderer: (props: ICellRendererProps) => { @@ -94,12 +123,33 @@ const columnDefinitions: [ColDef, ...ColDef[]] = [ }, { headerName: domainNames.currentStep, valueGetter: (pkg) => pkg.data?.checklistStep }, { + colId: 'RfCPlannedForecastDate', headerName: 'RFC', valueGetter: (pkg) => pkg.data?.rfCPlannedForecastDate, cellRenderer: (props: ICellRendererProps) => { return props.value ? : null; }, }, + { + colId: 'CommissioningIdentifierCode', + headerName: domainNames.commIdentifier, + valueGetter: (pkg) => pkg.data?.commissioningIdentifierDescription, + }, + { + colId: 'MechanicalCompletionHandoverStatus', + headerName: domainNames.mcHandoverStatus, + valueGetter: (pkg) => pkg.data?.mechanicalCompletionHandoverStatus, + }, + { + colId: 'MechanicalCompletionResponsible', + headerName: domainNames.mcResponsible, + valueGetter: (pkg) => pkg.data?.mechanicalCompletionResponsible, + }, + { + colId: 'MechanicalCompletionPhase', + headerName: domainNames.mcPhase, + valueGetter: (pkg) => pkg.data?.mechanicalCompletionPhase, + }, { headerName: 'Pipetests', valueGetter: (pkg) => pkg.data?.pipetest, diff --git a/libs/heattraceshared/src/lib/types/heattrace.ts b/libs/heattraceshared/src/lib/types/heattrace.ts index e1d29b325..eb73a4422 100644 --- a/libs/heattraceshared/src/lib/types/heattrace.ts +++ b/libs/heattraceshared/src/lib/types/heattrace.ts @@ -11,11 +11,15 @@ export type HeatTrace = { commissioningPackageUrlId: string | null; commissioningResponsible: string | null; commissioningStatus: string | null; + commissioningIdentifierCode: string | null; + commissioningIdentifierDescription: string | null; mechanicalCompletionPackageNo: string | null; mechanicalCompletionPackageId: string | null; mechanicalCompletionUrlId: string | null; mechanicalCompletionResponsible: string | null; mechanicalCompletionStatus: string | null; + mechanicalCompletionPhase: string | null; + mechanicalCompletionHandoverStatus: string | null; status: string; discipline: string; location: string; diff --git a/libs/pipingapp/src/lib/config/tableConfig.tsx b/libs/pipingapp/src/lib/config/tableConfig.tsx index da0a357c1..568f95523 100644 --- a/libs/pipingapp/src/lib/config/tableConfig.tsx +++ b/libs/pipingapp/src/lib/config/tableConfig.tsx @@ -86,7 +86,7 @@ const columnDefinitions: [ColDef, ...ColDef[]] = [ }, { headerName: domainNames.mcStatus, - colId: 'MechanicalCompletionStatus', + colId: 'mechanicalCompletionStatus', valueGetter: (element) => element.data?.mechanicalCompletionStatus, cellRenderer: (props: ICellRendererProps) => { if (!props.value) return; @@ -154,4 +154,4 @@ const columnDefinitions: [ColDef, ...ColDef[]] = [ return ; }, }, -]; \ No newline at end of file +]; diff --git a/libs/shared/src/packages/utils-domain/names.ts b/libs/shared/src/packages/utils-domain/names.ts index fe5b41d0e..210655acf 100644 --- a/libs/shared/src/packages/utils-domain/names.ts +++ b/libs/shared/src/packages/utils-domain/names.ts @@ -56,6 +56,7 @@ export const domainNames = { mcPkg: 'Mc Pkg', mcResponsible: `MC ${'Responsible'}`, mcStatus: 'MC Status', + mcHandoverStatus: 'MC Handover Status', // Punch punch: 'Punch',