diff --git a/CHANGELOG.md b/CHANGELOG.md
index 26f17a786..7d44f8ced 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@
- fix loading button issue to invite multiple companies in succession
- Company Name
- Update pattern in invite form and app release process
+- Portal login navigation
+ - handle navigation as per applicationType and applicationStatus
## 1.8.0-RC3
diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json
index 685ff3ea2..02fad98ac 100644
--- a/src/assets/locales/de/main.json
+++ b/src/assets/locales/de/main.json
@@ -148,6 +148,10 @@
"helpText": "If you have any questions regarding your registration please contact our helpdesk:",
"email": "help@catena-x.com"
},
+ "registrationDeclined": {
+ "title": "Registration Status",
+ "description": "After careful consideration, we regret to inform you that we are unable to approve your registration at this time.
Details/reasons for the cancellation have been provided via email.Your account will get disabled soon."
+ },
"admin": {
"registration-requests": {
"columns": {
diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json
index 64b40df77..3a49a0b2f 100644
--- a/src/assets/locales/en/main.json
+++ b/src/assets/locales/en/main.json
@@ -147,6 +147,10 @@
"helpText": "If you have any questions regarding your registration please contact our helpdesk:",
"email": "help@catena-x.com"
},
+ "registrationDeclined": {
+ "title": "Registration Status",
+ "description": "After careful consideration, we regret to inform you that we are unable to approve your registration at this time.
Details/reasons for the cancellation have been provided via email.Your account will get disabled soon."
+ },
"admin": {
"registration-requests": {
"columns": {
diff --git a/src/components/Main.tsx b/src/components/Main.tsx
index 079aa9b57..38374f520 100644
--- a/src/components/Main.tsx
+++ b/src/components/Main.tsx
@@ -28,12 +28,13 @@ import { useTranslation } from 'react-i18next'
import AccessService from '../services/AccessService'
import MainOverlay from './MainOverlay'
import { show } from 'features/control/overlay'
-import type { OVERLAYS } from 'types/Constants'
+import { OVERLAYS } from 'types/Constants'
import MainNotify from './MainNotify'
import MainSearchOverlay from './shared/frame/SearchOverlay'
import { MenuInfo } from './pages/Home/components/MenuInfo'
import {
ApplicationStatus,
+ ApplicationType,
useFetchApplicationsQuery,
} from 'features/registration/registrationApiSlice'
import './styles/main.scss'
@@ -55,22 +56,31 @@ export default function Main() {
if (
companyData &&
- companyData.applicationStatus !== ApplicationStatus.SUBMITTED &&
- Object.values(ApplicationStatus).includes(companyData.applicationStatus)
+ [
+ ApplicationStatus.CREATED,
+ ApplicationStatus.ADD_COMPANY_DATA,
+ ApplicationStatus.INVITE_USER,
+ ApplicationStatus.SELECT_COMPANY_ROLE,
+ ApplicationStatus.UPLOAD_DOCUMENTS,
+ ApplicationStatus.VERIFY,
+ ].includes(companyData.applicationStatus) &&
+ !location.search.includes('overlay=consent_osp')
) {
- return (
- <>
-
-
- {window.location.pathname === '/logout' ? (
-
- ) : (
-
- )}
-
-
- >
- )
+ if (companyData.applicationType === ApplicationType.INTERNAL) {
+ return (
+ <>
+
+
+ {window.location.pathname === '/logout' ? (
+
+ ) : (
+
+ )}
+
+
+ >
+ )
+ } else dispatch(show(OVERLAYS.CONSENT_OSP))
}
return (
diff --git a/src/components/shared/frame/Header/RegistrationDeclinedOverlay/index.tsx b/src/components/shared/frame/Header/RegistrationDeclinedOverlay/index.tsx
new file mode 100644
index 000000000..06936bea9
--- /dev/null
+++ b/src/components/shared/frame/Header/RegistrationDeclinedOverlay/index.tsx
@@ -0,0 +1,73 @@
+/********************************************************************************
+ * Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Apache License, Version 2.0 which is available at
+ * https://www.apache.org/licenses/LICENSE-2.0.
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ********************************************************************************/
+
+import { Trans, useTranslation } from 'react-i18next'
+import {
+ Dialog,
+ DialogContent,
+ DialogHeader,
+ DialogActions,
+ Typography,
+} from '@catena-x/portal-shared-components'
+
+export type StatusTagIcon = {
+ type?: 'confirmed' | 'pending' | 'declined' | 'label'
+}
+
+export type RegistrationDeclinedProps = {
+ openDialog: boolean
+ handleOverlayClose: React.MouseEventHandler
+}
+
+const RegistrationDeclinedOverlay = ({
+ openDialog,
+ handleOverlayClose,
+}: RegistrationDeclinedProps) => {
+ const { t } = useTranslation()
+
+ return (
+
+ )
+}
+
+export default RegistrationDeclinedOverlay
diff --git a/src/components/shared/frame/Header/RegistrationReviewOverlay/index.tsx b/src/components/shared/frame/Header/RegistrationReviewOverlay/index.tsx
index c5b1a2c97..9b42c186c 100644
--- a/src/components/shared/frame/Header/RegistrationReviewOverlay/index.tsx
+++ b/src/components/shared/frame/Header/RegistrationReviewOverlay/index.tsx
@@ -51,38 +51,34 @@ const RegistrationReviewOverlay = ({
})
return (
-