From 50f124a3ee07e47bfa80569d9a127f2ddccb13b0 Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 5 Sep 2024 15:51:03 +0200 Subject: [PATCH] feat(application requests and connector management): update skipped status (#1074) --- CHANGELOG.md | 7 +++ DEPENDENCIES | 29 ++++++------ src/assets/locales/de/main.json | 10 ++++- src/assets/locales/en/main.json | 10 ++++- .../CompanyDetailsHelper.tsx | 8 ++++ .../RegistrationRequests.scss | 1 - .../CheckList/CheckListFullButtons.tsx | 15 +++++++ .../registrationTableColumns.tsx | 19 ++++++++ .../EdcConnector/edcConnectorTableColumns.tsx | 3 +- .../shared/basic/Progress/index.tsx | 44 +++++++++++-------- .../admin/applicationRequestApiSlice.ts | 4 ++ 11 files changed, 110 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9193313a9..03b5c48fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## unreleased (2.2.0-RC3) + +### Change + +- **Application Requests and Connector Management** + - update the status(skipped) in application requests and necessary changes with checkbox in connector management [#1019](https://github.com/eclipse-tractusx/portal-frontend/pull/1019) + ## 2.2.0-RC2 ### Feature diff --git a/DEPENDENCIES b/DEPENDENCIES index 7300986a7..57b4e27ec 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -64,7 +64,7 @@ npm/npmjs/-/ci-info/3.9.0, MIT, approved, clearlydefined npm/npmjs/-/cjs-module-lexer/1.2.3, MIT, approved, #9069 npm/npmjs/-/classnames/2.5.1, MIT, approved, clearlydefined npm/npmjs/-/cliui/8.0.1, ISC AND Artistic-2.0, approved, #3753 -npm/npmjs/-/clsx/2.1.1, MIT, approved, clearlydefined +npm/npmjs/-/clsx/2.1.0, MIT, approved, clearlydefined npm/npmjs/-/co/4.6.0, MIT, approved, clearlydefined npm/npmjs/-/collect-v8-coverage/1.0.2, MIT, approved, clearlydefined npm/npmjs/-/color-convert/1.9.3, MIT, approved, clearlydefined @@ -90,7 +90,7 @@ npm/npmjs/-/data-view-buffer/1.0.1, MIT, approved, clearlydefined npm/npmjs/-/data-view-byte-length/1.0.1, MIT, approved, clearlydefined npm/npmjs/-/data-view-byte-offset/1.0.0, MIT, approved, clearlydefined npm/npmjs/-/date-fns/3.6.0, MIT, approved, #14000 -npm/npmjs/-/dayjs/1.11.13, MIT, approved, #9149 +npm/npmjs/-/dayjs/1.11.12, MIT, approved, #9149 npm/npmjs/-/debug/3.2.7, MIT, approved, clearlydefined npm/npmjs/-/debug/4.3.4, MIT, approved, clearlydefined npm/npmjs/-/decimal.js/10.4.3, MIT, approved, clearlydefined @@ -389,7 +389,7 @@ npm/npmjs/-/path-is-absolute/1.0.1, MIT, approved, clearlydefined npm/npmjs/-/path-key/3.1.1, MIT, approved, clearlydefined npm/npmjs/-/path-parse/1.0.7, MIT, approved, clearlydefined npm/npmjs/-/path-type/4.0.0, MIT, approved, clearlydefined -npm/npmjs/-/phone/3.1.50, MIT, approved, #10500 +npm/npmjs/-/phone/3.1.49, MIT, approved, #10500 npm/npmjs/-/picocolors/1.0.0, ISC, approved, #14718 npm/npmjs/-/picomatch/2.3.1, MIT, approved, clearlydefined npm/npmjs/-/pirates/4.0.6, MIT, approved, #680 @@ -416,7 +416,7 @@ npm/npmjs/-/react-hook-form/7.51.5, MIT, approved, #13909 npm/npmjs/-/react-i18next/14.1.3, MIT AND Apache-2.0, approved, #13870 npm/npmjs/-/react-is/16.13.1, MIT, approved, clearlydefined npm/npmjs/-/react-is/17.0.2, MIT, approved, clearlydefined -npm/npmjs/-/react-is/18.3.1, MIT, approved, clearlydefined +npm/npmjs/-/react-is/18.2.0, MIT, approved, clearlydefined npm/npmjs/-/react-player/2.15.1, MIT, approved, #13914 npm/npmjs/-/react-redux/9.1.2, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-3-Clause, approved, #13913 npm/npmjs/-/react-refresh/0.14.0, MIT, approved, clearlydefined @@ -678,14 +678,14 @@ npm/npmjs/@jridgewell/sourcemap-codec/1.4.15, MIT, approved, clearlydefined npm/npmjs/@jridgewell/trace-mapping/0.3.25, MIT, approved, #9904 npm/npmjs/@jridgewell/trace-mapping/0.3.9, MIT, approved, #9904 npm/npmjs/@mui/base/5.0.0-beta.40, MIT, approved, #2992 -npm/npmjs/@mui/core-downloads-tracker/5.16.7, MIT, approved, clearlydefined -npm/npmjs/@mui/icons-material/5.15.21, MIT AND CC-BY-3.0, approved, #13171 -npm/npmjs/@mui/material/5.15.21, MIT AND CC-BY-3.0, approved, #13175 -npm/npmjs/@mui/private-theming/5.16.6, MIT, approved, #15717 -npm/npmjs/@mui/styled-engine/5.16.6, MIT, approved, #15718 -npm/npmjs/@mui/system/5.16.7, MIT, approved, #15715 -npm/npmjs/@mui/types/7.2.15, MIT, approved, #16017 -npm/npmjs/@mui/utils/5.16.6, MIT, approved, #15716 +npm/npmjs/@mui/core-downloads-tracker/5.15.15, MIT, approved, clearlydefined +npm/npmjs/@mui/icons-material/5.15.15, MIT AND CC-BY-3.0, approved, #13171 +npm/npmjs/@mui/material/5.15.15, MIT AND CC-BY-3.0, approved, #13175 +npm/npmjs/@mui/private-theming/5.15.14, MIT AND CC-BY-3.0, approved, #13174 +npm/npmjs/@mui/styled-engine/5.15.14, MIT AND CC-BY-3.0, approved, #13173 +npm/npmjs/@mui/system/5.15.15, MIT, approved, #13170 +npm/npmjs/@mui/types/7.2.14, MIT, approved, #16017 +npm/npmjs/@mui/utils/5.15.14, MIT AND OFL-1.1 AND CC-BY-3.0, approved, #13927 npm/npmjs/@mui/x-data-grid/6.19.11, MIT, approved, #14027 npm/npmjs/@mui/x-date-pickers/6.19.9, MIT, approved, #14025 npm/npmjs/@nodelib/fs.scandir/2.1.5, MIT, approved, clearlydefined @@ -694,7 +694,7 @@ npm/npmjs/@nodelib/fs.walk/1.2.8, MIT, approved, clearlydefined npm/npmjs/@popperjs/core/2.11.8, MIT, approved, clearlydefined npm/npmjs/@react-hook/cache/1.1.1, MIT, approved, clearlydefined npm/npmjs/@react-hook/latest/1.0.3, MIT, approved, clearlydefined -npm/npmjs/@reduxjs/toolkit/2.2.7, MIT AND (BSD-2-Clause AND ISC AND MIT) AND Apache-2.0, approved, #14170 +npm/npmjs/@reduxjs/toolkit/2.2.6, MIT AND (BSD-2-Clause AND ISC AND MIT) AND Apache-2.0, approved, #14170 npm/npmjs/@remix-run/router/1.15.3, MIT, approved, clearlydefined npm/npmjs/@rollup/pluginutils/5.1.0, MIT, approved, clearlydefined npm/npmjs/@rollup/rollup-android-arm-eabi/4.17.2, MIT, approved, clearlydefined @@ -729,7 +729,7 @@ npm/npmjs/@svgr/core/8.1.0, MIT, approved, clearlydefined npm/npmjs/@svgr/hast-util-to-babel-ast/8.0.0, MIT, approved, clearlydefined npm/npmjs/@svgr/plugin-jsx/8.1.0, MIT, approved, clearlydefined npm/npmjs/@testing-library/dom/9.3.4, MIT AND (MIT AND WTFPL), approved, #9038 -npm/npmjs/@testing-library/jest-dom/6.4.8, MIT, approved, clearlydefined +npm/npmjs/@testing-library/jest-dom/6.4.6, MIT, approved, clearlydefined npm/npmjs/@testing-library/react/14.2.2, MIT, approved, #13316 npm/npmjs/@testing-library/user-event/14.5.2, MIT, approved, clearlydefined npm/npmjs/@tootallnate/once/2.0.0, MIT, approved, clearlydefined @@ -760,7 +760,6 @@ npm/npmjs/@types/node/20.11.30, MIT, approved, #13826 npm/npmjs/@types/papaparse/5.3.14, MIT, approved, #10964 npm/npmjs/@types/parse-json/4.0.2, MIT, approved, clearlydefined npm/npmjs/@types/prop-types/15.7.11, MIT, approved, clearlydefined -npm/npmjs/@types/prop-types/15.7.12, MIT, approved, clearlydefined npm/npmjs/@types/qs/6.9.15, MIT, approved, #14071 npm/npmjs/@types/react-dom/18.2.22, MIT, approved, #8256 npm/npmjs/@types/react-redux/7.1.33, MIT, approved, #10970 diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index b566cf13b..9d791cb54 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -188,6 +188,7 @@ "buttonprogress": "in progress", "buttonrejected": "rejected", "buttoncompleted": "completed", + "buttonPartiallyCompleted": "teilweise abgeschlossen", "buttonerror": "error", "cellconfirmed": "bestätigt", "celldeclined": "abgelehnt", @@ -569,7 +570,7 @@ "location": "Location", "tooltipText": "Connector's status is pending", "sdDescription": "SD Registration", - "sdRegistrationToolTip": "Die Selbstbeschreibung wurde ausgelöst. Der Vorgang kann bis zu ein paar Minuten dauern.", + "sdRegistrationToolTip": "Das SD-Dokument ist noch nicht geladen. Dies könnte auf die Deaktivierung der SD-Fabrik zurückzuführen sein. Dieser Prozess wird so bald wie möglich vom CX-Administrator neu ausgelöst.", "hostCompanyName": "Host", "providerCompanyName": "Customer", "connectorUrl": "Connector-URL" @@ -1616,7 +1617,8 @@ "DONE": "approved", "IN_PROGRESS": "in progress", "FAILED": "failed", - "TO_DO": "to do" + "TO_DO": "to do", + "SKIPPED": "skipped" }, "buttonApprove": "Approve", "buttonConfirm": "Confirm", @@ -1774,6 +1776,10 @@ "FAILED": { "title": "Ihre Aktion ist erforderlich, um fortzufahren.", "description": "The self-description creation was unsuccessful. Details regarding the unsuccessful process can get found below. Additionally you can retrigger the endpoint (by resetting the status) or close/reject the company registration." + }, + "SKIPPED": { + "title": "Von Ihrer Seite sind keine Maßnahmen erforderlich", + "description": "Die Erstellung der Selbstbeschreibung wurde absichtlich übersprungen. Dieser Prozess wird vom CX-Operator so bald wie möglich wieder ausgelöst." } } }, diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index aef08c23b..de78c9269 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -187,6 +187,7 @@ "buttonprogress": "in progress", "buttonrejected": "rejected", "buttoncompleted": "completed", + "buttonPartiallyCompleted": "partially completed", "buttonerror": "error", "cellconfirmed": "confirmed", "celldeclined": "declined", @@ -568,7 +569,7 @@ "location": "Location", "tooltipText": "Connector's status is pending", "sdDescription": "SD Registration", - "sdRegistrationToolTip": "The Self-Description is triggered. Process might take up to a couple of minutes.", + "sdRegistrationToolTip": "The SD Document is not yet loaded. This could be due to the deactivation of the Sd Factory. This process will be retriggered as soon as possible by the CX Admin", "hostCompanyName": "Host", "providerCompanyName": "Customer", "connectorUrl": "Connector URL" @@ -1583,7 +1584,8 @@ "DONE": "approved", "IN_PROGRESS": "in progress", "FAILED": "failed", - "TO_DO": "to do" + "TO_DO": "to do", + "SKIPPED": "skipped" }, "buttonApprove": "Approve", "buttonConfirm": "Confirm", @@ -1741,6 +1743,10 @@ "FAILED": { "title": "Your action is needed.", "description": "The self-description creation was unsuccessful. Details regarding the unsuccessful process can get found below. Additionally you can retrigger the endpoint (by resetting the status) or close/reject the company registration." + }, + "SKIPPED": { + "title": "No action needed from your side", + "description": "The self-description creation was skipped on purpose. This process will be retriggered by the CX Operator as soon as possible." } } }, diff --git a/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/CompanyDetailsHelper.tsx b/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/CompanyDetailsHelper.tsx index 3834eda6f..4b1834ff1 100644 --- a/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/CompanyDetailsHelper.tsx +++ b/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/CompanyDetailsHelper.tsx @@ -36,6 +36,14 @@ export const getTitle = ( ) => { const getStatus = () => { if ( + selectedRequest?.applicationStatus === + ApplicationRequestStatus.CONFIRMED && + selectedRequest?.applicationChecklist?.filter( + (checklist) => checklist.statusId === ProgressStatus.SKIPPED + ).length > 0 + ) { + return t('content.admin.registration-requests.buttonPartiallyCompleted') + } else if ( selectedRequest?.applicationStatus === ApplicationRequestStatus.SUBMITTED ) { const failedItems = selectedRequest.applicationChecklist.filter( diff --git a/src/components/pages/Admin/components/RegistrationRequests/RegistrationRequests.scss b/src/components/pages/Admin/components/RegistrationRequests/RegistrationRequests.scss index 5ba76d408..0d6b192f4 100644 --- a/src/components/pages/Admin/components/RegistrationRequests/RegistrationRequests.scss +++ b/src/components/pages/Admin/components/RegistrationRequests/RegistrationRequests.scss @@ -197,7 +197,6 @@ align-items: center; border-radius: 30px; padding: 5px; - width: 140px; .statusText { margin: 0 auto; diff --git a/src/components/pages/Admin/components/RegistrationRequests/components/CheckList/CheckListFullButtons.tsx b/src/components/pages/Admin/components/RegistrationRequests/components/CheckList/CheckListFullButtons.tsx index f3ccec8ab..31d43e002 100644 --- a/src/components/pages/Admin/components/RegistrationRequests/components/CheckList/CheckListFullButtons.tsx +++ b/src/components/pages/Admin/components/RegistrationRequests/components/CheckList/CheckListFullButtons.tsx @@ -98,6 +98,19 @@ export default function CheckListFullButtons({ ), backgroundColor: '#FFF6FF', } + case ProgressStatus.SKIPPED: + return { + icon: ( + + ), + backgroundColor: '#ffffff', + } } } @@ -111,6 +124,8 @@ export default function CheckListFullButtons({ return 'confirmed' case ProgressStatus.FAILED: return 'declined' + case ProgressStatus.SKIPPED: + return 'label' } } diff --git a/src/components/pages/Admin/components/RegistrationRequests/registrationTableColumns.tsx b/src/components/pages/Admin/components/RegistrationRequests/registrationTableColumns.tsx index e185305bd..db62cd830 100644 --- a/src/components/pages/Admin/components/RegistrationRequests/registrationTableColumns.tsx +++ b/src/components/pages/Admin/components/RegistrationRequests/registrationTableColumns.tsx @@ -69,6 +69,11 @@ export const StatusProgress = ({ style={{ border: `2px solid ${style.border}`, background: style.background, + width: + statusText === + t('content.admin.registration-requests.buttonPartiallyCompleted') + ? 'max-width' + : '140px', }} > - { - switch (applicationStatus) { - case ApplicationRequestStatus.CONFIRMED: - return { - progressBg: '#e2f6c7', - progressColor: 'conic-gradient(#00aa55 360deg 360deg)', - } - case ApplicationRequestStatus.DECLINED: - case ApplicationRequestStatus.CANCELLED_BY_CUSTOMER: - return { - progressBg: '#fee7e2', - progressColor: 'conic-gradient(#d91e18 360deg 360deg)', - } - default: - return { - progressBg: '#ffffff', - progressColor: `conic-gradient(#00aa55 ${green}deg, #efb800 ${green}deg ${yellow}deg, #d91e18 ${yellow}deg ${red}deg, #ffffff ${red}deg 360deg)`, - } - } + if (ApplicationRequestStatus.CONFIRMED && items?.SKIPPED === 1) { + return { + progressBg: '#eaf1fe', + progressColor: '#0f71cb', + } + } else + switch (applicationStatus) { + case ApplicationRequestStatus.CONFIRMED: + return { + progressBg: '#e2f6c7', + progressColor: 'conic-gradient(#00aa55 360deg 360deg)', + } + case ApplicationRequestStatus.DECLINED: + case ApplicationRequestStatus.CANCELLED_BY_CUSTOMER: + return { + progressBg: '#fee7e2', + progressColor: 'conic-gradient(#d91e18 360deg 360deg)', + } + default: + return { + progressBg: '#ffffff', + progressColor: `conic-gradient(#00aa55 ${green}deg, #efb800 ${green}deg ${yellow}deg, #d91e18 ${yellow}deg ${red}deg, #ffffff ${red}deg 360deg)`, + } + } } return ( @@ -65,7 +71,7 @@ export const Progress = ({ }} > {applicationStatus !== ApplicationRequestStatus.DECLINED && - `${items.DONE}/${totalItems}`} + `${items.DONE + items.SKIPPED}/${totalItems}`} ) diff --git a/src/features/admin/applicationRequestApiSlice.ts b/src/features/admin/applicationRequestApiSlice.ts index 94c182f18..697d85e78 100644 --- a/src/features/admin/applicationRequestApiSlice.ts +++ b/src/features/admin/applicationRequestApiSlice.ts @@ -55,6 +55,7 @@ export enum ProgressStatus { TO_DO = 'TO_DO', DONE = 'DONE', FAILED = 'FAILED', + SKIPPED = 'SKIPPED', } export type ProgressType = { @@ -62,6 +63,7 @@ export type ProgressType = { DONE: number FAILED: number IN_PROGRESS: number + SKIPPED: number } export const initialProgressValue: ProgressType = { @@ -69,6 +71,7 @@ export const initialProgressValue: ProgressType = { DONE: 0, FAILED: 0, IN_PROGRESS: 0, + SKIPPED: 0, } export enum StatusType { @@ -128,6 +131,7 @@ export const progressMapper = { IN_PROGRESS: 5, TO_DO: 0, FAILED: 0, + SKIPPED: 0, } export interface ApplicationRequest {