Skip to content

Commit

Permalink
Merge branch 'release/v1.8.0-RC6' into feat/489/OSP-IDP
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanya-bmw authored Feb 21, 2024
2 parents 07794c5 + 1f24bcb commit 8f183de
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
- Connect listing page, upload certificate and details page to back end api
- Delete ownuser Redirect URL
- fixed logout redirect url issue
- Consent Pop-Up after registration
- fix reappear overlay on every page even after consent updated
- OSP IDP
- add disable & delete sub-menu's to managed IdPs


### Bugfix

- Idp User Invite Logic
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ npm/npmjs/@babel/traverse/7.23.3, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD
npm/npmjs/@babel/types/7.23.0, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #11521
npm/npmjs/@babel/types/7.23.3, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #11521
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/2.1.30, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@catena-x/portal-shared-components/2.1.31, Apache-2.0 AND CC-BY-4.0, approved, #10502
npm/npmjs/@csstools/normalize.css/12.0.0, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-cascade-layers/1.1.1, CC0-1.0, approved, clearlydefined
npm/npmjs/@csstools/postcss-color-function/1.1.1, CC0-1.0 AND (MIT AND W3C-20150513) AND W3C-20150513 AND MIT, approved, #3022
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^2.1.30",
"@catena-x/portal-shared-components": "^2.1.31",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@hookform/error-message": "^2.0.1",
Expand Down
19 changes: 17 additions & 2 deletions src/components/overlays/OSPConsent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
} from '@catena-x/portal-shared-components'
import { useDispatch } from 'react-redux'
import { closeOverlay } from 'features/control/overlay'
import { useState } from 'react'
import { useEffect, useState } from 'react'
import { OSPConsentContent } from './OSPConsentContent'
import { error, success } from 'services/NotifyService'
import {
Expand All @@ -39,6 +39,7 @@ import {
emptyPartnerRegistrationConsent,
useFetchRegistrationApplicationsQuery,
useFetchRegistrationApplicationDataQuery,
REGISTRATION_APPLICATION_STATUS,
} from 'features/admin/networkApiSlice'

export const OSPApplicationConsent = ({ id }: { id: string }) => {
Expand Down Expand Up @@ -130,7 +131,21 @@ export const OSPApplicationConsent = ({ id }: { id: string }) => {
}

export const OSPConsent = () => {
const applications = useFetchRegistrationApplicationsQuery().data
const dispatch = useDispatch()
const { data: applications, refetch } =
useFetchRegistrationApplicationsQuery()

useEffect(() => {
refetch()
if (
applications &&
applications?.length > 0 &&
applications[0].applicationStatus ===
REGISTRATION_APPLICATION_STATUS.SUBMITTED
)
dispatch(closeOverlay())
}, [refetch, applications])

return applications && applications.length > 0 ? (
<OSPApplicationConsent id={applications[0].applicationId} />
) : (
Expand Down
9 changes: 8 additions & 1 deletion src/features/admin/networkApiSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@ export enum CONSENT_STATUS {
}

export enum REGISTRATION_APPLICATION_STATUS {
PENDING = 'PENDING',
CREATED = 'CREATED',
ADD_COMPANY_DATA = 'ADD_COMPANY_DATA',
INVITE_USER = 'INVITE_USER',
SELECT_COMPANY_ROLE = 'SELECT_COMPANY_ROLE',
UPLOAD_DOCUMENTS = 'UPLOAD_DOCUMENTS',
VERIFY = 'VERIFY',
SUBMITTED = 'SUBMITTED',
DECLINED = 'DECLINED',
CONFIRMED = 'CONFIRMED',
}

export enum REGISTRATION_APPLICATION_ITEM_TYPE {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1193,10 +1193,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@catena-x/portal-shared-components@^2.1.30":
version "2.1.30"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.1.30.tgz#0c9082a576d5c1cb5fabf1e731f81f5ca7f10c80"
integrity sha512-BHO/2OOUihdOAA/Uql+s/VUBfl9ToHVQRL8mFMXhb9DuYPi213+LDXP3422sGLNQrlzIdCdD2U6yRHh8CVMlEQ==
"@catena-x/portal-shared-components@^2.1.31":
version "2.1.31"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.1.31.tgz#43b80ca8587aa546268bb29309d56314e7135cc4"
integrity sha512-UaUqjZpf+PVV6aOa/QoB3dtZH3/HpEa3QAeY/GIOrfAQfHe3FI4sbxdAfMV8tPUcl1D/4NPitTGon6M3ZzBc7g==
dependencies:
"@mui/base" "^5.0.0-beta.3"
"@mui/system" "^5.13.2"
Expand Down

0 comments on commit 8f183de

Please sign in to comment.