From dcb274989fcf99940822736ba320611baebce418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20Lise=20Skj=C3=A6veland?= Date: Thu, 13 Jul 2023 14:45:44 +0200 Subject: [PATCH 1/3] Added m1, m02 info + status to selected scope info --- .../http/InvitationForPunchOutApiClient.ts | 3 +++ src/modules/InvitationForPunchOut/types.d.ts | 3 +++ .../CreateAndEditIPO/SelectScope/McPkgTable.tsx | 4 ++++ .../CreateAndEditIPO/SelectScope/SelectedScope.tsx | 14 ++++++++++++-- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/modules/InvitationForPunchOut/http/InvitationForPunchOutApiClient.ts b/src/modules/InvitationForPunchOut/http/InvitationForPunchOutApiClient.ts index 2a90d16e5..b2078ac58 100644 --- a/src/modules/InvitationForPunchOut/http/InvitationForPunchOutApiClient.ts +++ b/src/modules/InvitationForPunchOut/http/InvitationForPunchOutApiClient.ts @@ -149,6 +149,9 @@ interface McPkgResponse { description: string; system: string; disciplineCode: string; + m01: string; + m02: string; + status: string; } interface PersonResponse { diff --git a/src/modules/InvitationForPunchOut/types.d.ts b/src/modules/InvitationForPunchOut/types.d.ts index 8d80615db..01d8f1cd8 100644 --- a/src/modules/InvitationForPunchOut/types.d.ts +++ b/src/modules/InvitationForPunchOut/types.d.ts @@ -100,6 +100,9 @@ export interface McPkgRow { tableData?: { isSelected: boolean; }; + m01?: string; + m02?: string; + status?: string; } export interface McScope { diff --git a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx index ffd92b79c..2ceb62df3 100644 --- a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx +++ b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx @@ -59,12 +59,16 @@ const McPkgTable = forwardRef( .getMcPkgsAsync(projectName, commPkgNo) .then((mcPkgs) => mcPkgs.map((mcPkg): McPkgRow => { + console.log(mcPkg); return { mcPkgNo: mcPkg.mcPkgNo, description: mcPkg.description, discipline: mcPkg.disciplineCode, system: mcPkg.system, commPkgNo: commPkgNo, + status: mcPkg.status, + m01: mcPkg.m01, + m02: mcPkg.m02, tableData: { isSelected: selectedMcPkgScope.selected.some( diff --git a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx index eb66c337c..6ab7f74b0 100644 --- a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx +++ b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx @@ -111,13 +111,23 @@ const SelectedScope = ({ {mcPkg.description} +
+ Status + + {mcPkg.status} + +
M-01 date - - + + {mcPkg.m01 ? mcPkg.m01 : '-'} +
M-02 date - - + + {mcPkg.m02 ? mcPkg.m02 : '-'} +
From 834f890d950cf70b42781a919e36cb556d0ca472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20Lise=20Skj=C3=A6veland?= Date: Thu, 13 Jul 2023 14:47:53 +0200 Subject: [PATCH 2/3] removed logging --- .../views/CreateAndEditIPO/SelectScope/McPkgTable.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx index 2ceb62df3..8a02730f2 100644 --- a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx +++ b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/McPkgTable.tsx @@ -59,7 +59,6 @@ const McPkgTable = forwardRef( .getMcPkgsAsync(projectName, commPkgNo) .then((mcPkgs) => mcPkgs.map((mcPkg): McPkgRow => { - console.log(mcPkg); return { mcPkgNo: mcPkg.mcPkgNo, description: mcPkg.description, From 2495e93a3b71332dccf49a8e05f69e2ce2a15bae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anne=20Lise=20Skj=C3=A6veland?= Date: Thu, 20 Jul 2023 15:23:52 +0200 Subject: [PATCH 3/3] Formatted the date --- .../views/CreateAndEditIPO/SelectScope/SelectedScope.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx index 6ab7f74b0..d6c1310cd 100644 --- a/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx +++ b/src/modules/InvitationForPunchOut/views/CreateAndEditIPO/SelectScope/SelectedScope.tsx @@ -11,6 +11,7 @@ import { import EdsIcon from '@procosys/components/EdsIcon'; import React from 'react'; +import { getFormattedDate } from '@procosys/core/services/DateService'; const multipleDisciplinesWarning = (
@@ -120,13 +121,13 @@ const SelectedScope = ({
M-01 date - {mcPkg.m01 ? mcPkg.m01 : '-'} + {mcPkg.m01 ? getFormattedDate(mcPkg.m01) : '-'}
M-02 date - {mcPkg.m02 ? mcPkg.m02 : '-'} + {mcPkg.m02 ? getFormattedDate(mcPkg.m02) : '-'}