From 8cee28e76ad1a1b9aaede59201ea032da4bbd357 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw Date: Tue, 13 Feb 2024 17:06:28 +0530 Subject: [PATCH 01/10] feat(osp): created osp page --- public/index.html | 2 +- src/assets/locales/de/main.json | 12 ++ src/assets/locales/en/main.json | 12 ++ src/components/Main.tsx | 46 ++++-- src/components/overlays/OSPConsent/index.tsx | 139 ------------------ .../OSPConsent/OSPConsentContent.tsx | 0 src/components/pages/OSPConsent/index.tsx | 78 ++++++++++ .../{overlays => pages}/OSPConsent/style.scss | 40 +++-- src/services/AccessService.tsx | 2 +- src/types/Config.tsx | 8 +- src/types/Constants.ts | 1 + 11 files changed, 173 insertions(+), 167 deletions(-) delete mode 100644 src/components/overlays/OSPConsent/index.tsx rename src/components/{overlays => pages}/OSPConsent/OSPConsentContent.tsx (100%) create mode 100644 src/components/pages/OSPConsent/index.tsx rename src/components/{overlays => pages}/OSPConsent/style.scss (62%) diff --git a/public/index.html b/public/index.html index 97a5814fe..0dddd6783 100644 --- a/public/index.html +++ b/public/index.html @@ -30,7 +30,7 @@
diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 02fad98ac..a84ccf7df 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -1795,6 +1795,18 @@ "retryBtn": "Retry Deletion", "notSupportedTitle": "Company account deletion is not supported. You registration is already submitted/closed. To unsubscribe you need to use the platform off-boarding process.", "notSupportedDescription": "You can close the screen now or redirect to the portal >> get to the platform" + }, + "osp": { + "heading": "Registration Summary", + "descHeading": "Company Details", + "descMessage": "Below you can find your company registration details shared by your onboarding provider. Please review the details and proceed to the Company Role selection below before submitting your registration.", + "companyName": "Company Name", + "bmw": "BMW AG", + "street": "Street & Number", + "zip": "ZIP", + "city": "City", + "region": "Region", + "country": "Country" } }, "navigation": { diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index 3a49a0b2f..c3fdfac93 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -1759,6 +1759,18 @@ "retryBtn": "Retry Deletion", "notSupportedTitle": "Company account deletion is not supported. You registration is already submitted/closed. To unsubscribe you need to use the platform off-boarding process.", "notSupportedDescription": "You can close the screen now or redirect to the portal >> get to the platform" + }, + "osp": { + "heading": "Registration Summary", + "descHeading": "Company Details", + "descMessage": "Below you can find your company registration details shared by your onboarding provider. Please review the details and proceed to the Company Role selection below before submitting your registration.", + "companyName": "Company Name", + "bmw": "BMW AG", + "street": "Street & Number", + "zip": "ZIP", + "city": "City", + "region": "Region", + "country": "Country" } }, "navigation": { diff --git a/src/components/Main.tsx b/src/components/Main.tsx index 7623e8bdf..7a54bb23a 100644 --- a/src/components/Main.tsx +++ b/src/components/Main.tsx @@ -28,7 +28,7 @@ import { useTranslation } from 'react-i18next' import AccessService from '../services/AccessService' import MainOverlay from './MainOverlay' import { show } from 'features/control/overlay' -import { OVERLAYS, PAGES } from 'types/Constants' +import { type OVERLAYS, PAGES } from 'types/Constants' import MainNotify from './MainNotify' import MainSearchOverlay from './shared/frame/SearchOverlay' import { MenuInfo } from './pages/Home/components/MenuInfo' @@ -41,6 +41,7 @@ import './styles/main.scss' import RegistrationStatus from './pages/RegistrationStatus' import Logout from './pages/Logout' import Redirect from './actions/Redirect' +import { OSPConsent } from './pages/OSPConsent' export default function Main() { document.title = useTranslation().t('title') @@ -70,21 +71,40 @@ export default function Main() { ].includes(companyData.applicationStatus) && !location.search.includes('overlay=consent_osp') ) { - if (companyData.applicationType === ApplicationType.INTERNAL) { - return ( - <> -
- - {window.location.pathname === '/logout' ? ( + return ( + <> +
+ + {companyData.applicationType === ApplicationType.INTERNAL ? ( + window.location.pathname === '/logout' ? ( ) : ( - )} -