Skip to content

Commit

Permalink
Feat/update domain names and add columns (#1135)
Browse files Browse the repository at this point in the history
* chore: Update swcr columns and domain names

* chore: Update domain names and columns for workorder

* Remove console log

* remove cell renderer
  • Loading branch information
EdwardBrunton authored Sep 26, 2024
1 parent c2724f1 commit 06c0d25
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 34 deletions.
32 changes: 25 additions & 7 deletions libs/shared/src/packages/utils-domain/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const domainNames = {
commPriority3: `Comm Priority 3`,
commSubSystem: `Comm Sub${'System'}`,
commSystem: `Comm ${'System'}`,
commSystems: `Comm Systems`,

// Mechanical completion package
mcDiscipline: `MC Discipline`,
Expand Down Expand Up @@ -103,19 +104,36 @@ export const domainNames = {
nodeIdentifier: `Node ${'Identifier'}`,
types: 'Types',
softwareChangeRequests: 'Software Change Requests',
handoverStatus: 'Handover Status',
swcrContract: `SWCR Contract`,
swcrStatus: 'SWCR Status',
swcrSupplier: 'SWCR Supplier',
swcrFunctionalSystem: 'SWCR Functional System',
swcrPriority: 'SWCR Priority',
swcrControlSystem: 'SWCR Control System',
swcrTypes: 'SWCR Types',
swcrNodeIdentifier: 'SWCR Node Identifier',
swcrAction: 'SWCR Action',

// Workorder
workorder: 'Workorder',
finalizingOfWorkordersAtSite: 'Finalizing Of Workorders At Site',
hold: 'Hold',
hold: 'WO Hold',
hoursReadyForExecutionAtSite: 'Hours Ready For Execution At Site',
jobStatus: 'Job Status',
materialStatus: 'Material Status',
onOrOffshore: 'On/Offshore',
typeOfWork: 'TypeOfWork',
jobStatus: 'WO Job Status',
materialStatus: 'WO Material Status',
onOrOffshore: 'WO On/Offshore',
typeOfWork: 'WO Type Of Work',
workorderPlannedEndAfterC01: 'Is Workorder Planned End After C01',
workorderProduction: 'Workorder Production',
workorderType: 'Workorder Type',
workorderProduction: 'WO Production',
workorderType: 'WO Type',
workorderDiscipline: 'WO Discipline',
workorderResponsible: 'WO Responsible',
workorderStatus: 'WO Status',
workorderMilestone: 'WO Milestone',
workorderProgress: 'WO Progress',
workorderLocation: 'WO Location',
workorderWBS: 'WO WBS',

// Pipetest
pipetest: 'Pipetest',
Expand Down
69 changes: 52 additions & 17 deletions libs/swcrapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,26 @@ const columnDefinitions: ColDef<SwcrPackage>[] = [
},
{
colId: 'Contract',
headerName: domainNames.contract,
headerTooltip: domainNames.contract,
headerName: domainNames.swcrContract,
headerTooltip: domainNames.swcrContract,
valueGetter: (pkg) => pkg.data?.contract,
width: 200,
},
{
colId: 'System',
headerName: domainNames.system,
headerTooltip: domainNames.system,
valueGetter: (pkg) => pkg.data?.system,
headerName: domainNames.swcrFunctionalSystem,
headerTooltip: domainNames.swcrFunctionalSystem,
valueGetter: (pkg) => pkg.data?.functionalSystem,
cellRenderer: (props: ICellRendererProps<SwcrPackage, string>) => {
return <StyledMonospace>{props.data?.system}</StyledMonospace>;
return <StyledMonospace>{props.data?.functionalSystem}</StyledMonospace>;
},
enableRowGroup: true,
width: 150,
},
{
colId: 'Status',
headerName: domainNames.status,
headerTooltip: domainNames.status,
headerName: domainNames.swcrStatus,
headerTooltip: domainNames.swcrStatus,
valueGetter: (pkg) => pkg.data?.status,
enableRowGroup: true,
width: 200,
Expand Down Expand Up @@ -153,42 +153,77 @@ const columnDefinitions: ColDef<SwcrPackage>[] = [
},
{
colId: 'Supplier',
headerName: domainNames.supplier,
headerTooltip: domainNames.supplier,
headerName: domainNames.swcrSupplier,
headerTooltip: domainNames.swcrSupplier,
valueGetter: (pkg) => pkg.data?.supplier,
width: 150,
},
{
colId: 'Types',
headerName: domainNames.types,
headerTooltip: domainNames.types,
headerName: domainNames.swcrTypes,
headerTooltip: domainNames.swcrTypes,
valueGetter: (pkg) => pkg.data?.swcrTypes,
enableRowGroup: true,
width: 150,
},
{
colId: 'Priority',
headerName: domainNames.priority,
headerTooltip: domainNames.priority,
headerName: domainNames.swcrPriority,
headerTooltip: domainNames.swcrPriority,
valueGetter: (pkg) => pkg.data?.priority,
enableRowGroup: true,
width: 150,
},
{
colId: 'AutomationControlSystem',
headerName: domainNames.automationControlSystem,
headerTooltip: domainNames.automationControlSystem,
headerTooltip: domainNames.swcrControlSystem,
valueGetter: (pkg) => pkg.data?.automationControlSystem,
width: 200,
},
{
colId: 'Node',
headerName: domainNames.nodeIdentifier,
headerTooltip: domainNames.nodeIdentifier,
headerName: domainNames.swcrNodeIdentifier,
headerTooltip: domainNames.swcrNodeIdentifier,
valueGetter: (pkg) => pkg.data?.nodeIdentifier,
cellRenderer: (props: ICellRendererProps<SwcrPackage, string>) => {
return <StyledMonospace>{props.data?.nodeIdentifier}</StyledMonospace>;
},
width: 150,
},
{
colId: 'commSystem',
headerName: domainNames.commSystem,
headerTooltip: domainNames.system,
valueGetter: (pkg) => pkg.data?.system,
width: 200,
},
{
colId: 'priority1',
headerName: domainNames.commPriority1,
headerTooltip: domainNames.commPriority1,
valueGetter: (pkg) => pkg.data?.priority1,
width: 200,
},
{
colId: 'priority2',
headerName: domainNames.commPriority2,
headerTooltip: domainNames.commPriority2,
valueGetter: (pkg) => pkg.data?.priority2,
width: 200,
},
{
colId: 'priority3',
headerName: domainNames.commPriority3,
headerTooltip: domainNames.commPriority3,
valueGetter: (pkg) => pkg.data?.priority3,
width: 200,
},
{
colId: 'handoverStatus',
headerName: domainNames.handoverStatus,
headerTooltip: domainNames.handoverStatus,
valueGetter: (pkg) => pkg.data?.handoverStatus,
width: 200,
},
];
4 changes: 4 additions & 0 deletions libs/swcrshared/src/lib/types/swcrPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ export type SwcrPackage = {
automationControlSystem: string;
swcrTypes: string
commissioningPackageArea: string;
priority1: number;
priority2: number;
priority3: number;
handoverStatus: number;
};
40 changes: 30 additions & 10 deletions libs/workorderapp/src/lib/config/tableConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ const columnDefinitions: [ColDef<WorkOrder>, ...ColDef<WorkOrder>[]] = [
},
{
colId: 'DisciplineCode',
headerName: domainNames.discipline,
headerTooltip: domainNames.discipline,
headerName: domainNames.workorderDiscipline,
headerTooltip: domainNames.workorderDiscipline,
valueGetter: (pkg) => pkg.data?.discipline,
},
{
colId: 'MilestoneCode',
headerName: domainNames.milestone,
headerTooltip: domainNames.milestone,
headerName: domainNames.workorderMilestone,
headerTooltip: domainNames.workorderMilestone,
valueGetter: (pkg) => pkg.data?.milestoneCode,
},
{
Expand Down Expand Up @@ -163,8 +163,8 @@ const columnDefinitions: [ColDef<WorkOrder>, ...ColDef<WorkOrder>[]] = [
},
{
colId: 'ProjectProgress',
headerName: domainNames.progress,
headerTooltip: domainNames.progress,
headerName: domainNames.workorderProgress,
headerTooltip: domainNames.workorderProgress,
valueGetter: (pkg) => pkg.data?.projectProgress,
cellRenderer: (props: ICellRendererProps<WorkOrder, string | null>) => {
if (!props.value || Number(props.value) === 0) {
Expand Down Expand Up @@ -196,14 +196,34 @@ const columnDefinitions: [ColDef<WorkOrder>, ...ColDef<WorkOrder>[]] = [
},
{
colId: 'WorkBreakdownStructure',
headerName: domainNames.wbs,
headerTooltip: domainNames.wbs,
headerName: domainNames.workorderWBS,
headerTooltip: domainNames.workorderWBS,
valueGetter: (pkg) => pkg.data?.workBreakdownStructure,
},
{
colId: 'Systems',
headerName: domainNames.systems,
headerTooltip: domainNames.systems,
headerName: domainNames.commSystems,
headerTooltip: domainNames.commSystems,
valueGetter: (pkg) => pkg.data?.systems,
},
{
colId: 'EstimatedHours',
headerName: domainNames.remainingManHours,
headerTooltip: domainNames.remainingManHours,
valueGetter: (pkg) => pkg.data?.remainingHours,
cellRenderer: (props: ICellRendererProps<WorkOrder, string>) => {
if (!props.value) return null;
return <StyledMonospace>{props.value ?? null}</StyledMonospace>;
},
},
{
colId: 'RemainingHours',
headerName: domainNames.estimatedManHours,
headerTooltip: domainNames.estimatedManHours,
valueGetter: (pkg) => pkg.data?.estimatedHours,
cellRenderer: (props: ICellRendererProps<WorkOrder, string>) => {
if (!props.value) return null;
return <StyledMonospace>{props.value ?? null}</StyledMonospace>;
},
},
];

0 comments on commit 06c0d25

Please sign in to comment.