Skip to content

Commit

Permalink
feature/80600-IPO-ønsker-mc-pakke-status-i-selected-scope-info (#766)
Browse files Browse the repository at this point in the history
* Added m1, m02 info + status to selected scope info

* removed logging

* Formatted the date
  • Loading branch information
AnneSkje authored and chormaz committed Sep 13, 2023
1 parent 5899fdb commit 4fb1c39
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ interface McPkgResponse {
description: string;
system: string;
disciplineCode: string;
m01: string;
m02: string;
status: string;
}

interface PersonResponse {
Expand Down
3 changes: 3 additions & 0 deletions src/modules/InvitationForPunchOut/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ export interface McPkgRow {
tableData?: {
isSelected: boolean;
};
m01?: string;
m02?: string;
status?: string;
}

export interface McScope {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ const McPkgTable = forwardRef(
discipline: mcPkg.disciplineCode,
system: mcPkg.system,
commPkgNo: commPkgNo,
status: mcPkg.status,
m01: mcPkg.m01,
m02: mcPkg.m02,
tableData: {
isSelected:
selectedMcPkgScope.selected.some(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {

import EdsIcon from '@procosys/components/EdsIcon';
import React from 'react';
import { getFormattedDate } from '@procosys/core/services/DateService';

const multipleDisciplinesWarning = (
<div>
Expand Down Expand Up @@ -111,13 +112,23 @@ const SelectedScope = ({
{mcPkg.description}
</Typography>
</div>
<div>
<Typography variant="caption">Status</Typography>
<Typography variant="body_long">
{mcPkg.status}
</Typography>
</div>
<div>
<Typography variant="caption">M-01 date</Typography>
<Typography variant="body_long">-</Typography>
<Typography variant="body_long">
{mcPkg.m01 ? getFormattedDate(mcPkg.m01) : '-'}
</Typography>
</div>
<div>
<Typography variant="caption">M-02 date</Typography>
<Typography variant="body_long">-</Typography>
<Typography variant="body_long">
{mcPkg.m02 ? getFormattedDate(mcPkg.m02) : '-'}
</Typography>
</div>
</AccordionContent>
</Accordion.Panel>
Expand Down

0 comments on commit 4fb1c39

Please sign in to comment.