From ec94696ac3f750de149f81b3c83d6a003944f3ac Mon Sep 17 00:00:00 2001 From: Nidhi garg Date: Fri, 14 Oct 2022 17:40:52 +0530 Subject: [PATCH 1/6] finish page fix --- src/components/verifyRegistration.tsx | 13 ++++++++++--- .../features/applicationVerifyRegister/slice.ts | 7 +++++++ .../features/applicationVerifyRegister/types.ts | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/components/verifyRegistration.tsx b/src/components/verifyRegistration.tsx index 3be578e0..3eccfb2c 100644 --- a/src/components/verifyRegistration.tsx +++ b/src/components/verifyRegistration.tsx @@ -25,8 +25,8 @@ import { FooterButton } from './footerButton' import { connect, useDispatch, useSelector } from 'react-redux' import { IState } from '../state/features/user/redux.store.types' import { addCurrentStep } from '../state/features/user/action' -import { withRouter } from 'react-router-dom' -import { useEffect } from 'react' +import { useHistory, withRouter } from 'react-router-dom' +import { useEffect, useState } from 'react' import { Dispatch } from 'redux' import { ToastContainer, toast } from 'react-toastify' import { @@ -34,7 +34,7 @@ import { saveRegistration, } from '../state/features/applicationVerifyRegister/actions' import { applicationSelector } from '../state/features/application/slice' -import { stateSelector } from '../state/features/applicationVerifyRegister/slice' +import { registrationSuccessSelector, stateSelector } from '../state/features/applicationVerifyRegister/slice' import { stateSelector as documentSelector } from '../state/features/applicationDocuments/slice' interface VerifyRegistrationProps { @@ -47,13 +47,19 @@ export const VerifyRegistration = ({ addCurrentStep, }: VerifyRegistrationProps) => { const { t } = useTranslation() + const history = useHistory() const dispatch = useDispatch() + const [ confirmState, setConfirmState ] = useState(false) + const { status, error, companyDetails } = useSelector(applicationSelector) const { registrationData } = useSelector(stateSelector) + const registrationSuccess = useSelector(registrationSuccessSelector) const { documents } = useSelector(documentSelector) + if(confirmState && registrationSuccess) history.push('/finish') + const obj = status[status.length - 1] const applicationId = obj['applicationId'] if (error) { @@ -69,6 +75,7 @@ export const VerifyRegistration = ({ } const nextClick = () => { + setConfirmState(true) dispatch(saveRegistration(applicationId)) } diff --git a/src/state/features/applicationVerifyRegister/slice.ts b/src/state/features/applicationVerifyRegister/slice.ts index 47801a54..1a49f27c 100644 --- a/src/state/features/applicationVerifyRegister/slice.ts +++ b/src/state/features/applicationVerifyRegister/slice.ts @@ -26,6 +26,7 @@ import { RegistrationState, InitialRegistrationValue } from './types' const initialState: RegistrationState = { registrationData: InitialRegistrationValue, loading: false, + success: false, error: null, } @@ -55,16 +56,19 @@ const applicationSlice = createSlice({ builder.addCase(saveRegistration.pending, (state) => ({ ...state, loading: true, + success: false, error: null, })) builder.addCase(saveRegistration.fulfilled, (state) => ({ ...state, loading: false, + success: true, error: null, })) builder.addCase(saveRegistration.rejected, (state, action) => ({ ...state, loading: false, + success: false, error: action.error.message as string, })) }, @@ -73,4 +77,7 @@ const applicationSlice = createSlice({ export const stateSelector = (state: RootState): RegistrationState => state.registrationData +export const registrationSuccessSelector = (state: RootState): boolean => + state.registrationData.success + export default applicationSlice diff --git a/src/state/features/applicationVerifyRegister/types.ts b/src/state/features/applicationVerifyRegister/types.ts index 0ae8790e..9bd93a39 100644 --- a/src/state/features/applicationVerifyRegister/types.ts +++ b/src/state/features/applicationVerifyRegister/types.ts @@ -21,6 +21,7 @@ export interface RegistrationState { registrationData: RegistrationDetails | null loading: boolean + success: boolean, error: string } From 436f9610729bd6d03daf547f3311a731bfda0279 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 18 Oct 2022 17:22:37 +0200 Subject: [PATCH 2/6] CPLP-1401: Add changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..e6781cf0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +New features, fixed bugs, known defects and other noteworthy changes to each release of the Catena-X Portal Frontend Registration. + +### 0.6.0 + +* Bugfix - Finish page +* Bugfix - Closed loading time issue +* Bugfix - BPN save and submit applicationId api url +* Enabler - Merge delta since eclipse foundation initial contribution From 7741d612f098ab768215270d47f0fac437ce6d36 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 18 Oct 2022 17:23:08 +0200 Subject: [PATCH 3/6] Bump version to 0.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e73a7362..ee4bbdcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "product-portal-frontend-registration", - "version": "0.5.5.1", + "version": "0.6.0", "license": "Apache-2.0", "homepage": "/registration", "scripts": { From bd43e93c82b0c19d3acd568e0cd248bcd7ab6da9 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 18 Oct 2022 17:26:19 +0200 Subject: [PATCH 4/6] CPLP-1576: Add header templates --- .vscode/settings.json | 158 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..e5bbb5d6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,158 @@ +{ + "fileHeaderComment.parameter": { + "*": { + "commentbegin": "/********************************************************************************", + "commentend": " ********************************************************************************/", + "commentprefix": "", + "commentbegin#": "###############################################################", + "commentend#": "###############################################################", + "commentprefix#": "#", + "cx_header_default_bmw":[ + "* Copyright (c) 2021,2022 BMW Group AG", + " * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + " *", + " * 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" + ], + "cx_header_with_#_bmw":[ + "Copyright (c) 2021,2022 BMW Group AG", + "# Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + "#", + "# 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" + ], + "cx_header_default_mercedes":[ + "* Copyright (c) 2021,2022 Mercedes-Benz Group AG and BMW Group AG", + " * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + " *", + " * 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" + ], + "cx_header_with_#_mercedes":[ + "Copyright (c) 2021,2022 Mercedes-Benz Group AG and BMW Group AG", + "# Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + "#", + "# 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" + ], + "cx_header_default_tsystems":[ + "* Copyright (c) 2021,2022 T-Systems International GmbH and BMW Group AG", + " * Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + " *", + " * 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" + ], + "cx_header_with_#_tsystems":[ + "Copyright (c) 2021,2022 T-Systems International GmbH and BMW Group AG", + "# Copyright (c) 2021,2022 Contributors to the CatenaX (ng) GitHub Organisation.", + "#", + "# 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" + ], + } + }, + "fileHeaderComment.template": { + "cx_header_default_bmw":[ + "${commentbegin}", + "${commentprefix} ${cx_header_default_bmw}", + "${commentend}" + ], + "cx_header_with_#_bmw":[ + "${commentbegin#}", + "${commentprefix#} ${cx_header_with_#_bmw}", + "${commentend#}" + ], + "cx_header_default_mercedes":[ + "${commentbegin}", + "${commentprefix} ${cx_header_default_mercedes}", + "${commentend}" + ], + "cx_header_with_#_mercedes":[ + "${commentbegin#}", + "${commentprefix#} ${cx_header_with_#_mercedes}", + "${commentend#}" + ], + "cx_header_default_tsystems":[ + "${commentbegin}", + "${commentprefix} ${cx_header_default_tsystems}", + "${commentend}" + ], + "cx_header_with_#_tsystems":[ + "${commentbegin#}", + "${commentprefix#} ${cx_header_with_#_tsystems}", + "${commentend#}" + ] + }, +} \ No newline at end of file From f3d3619842641f3e75b3650f19257fe8171c1db8 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 19 Oct 2022 10:51:11 +0200 Subject: [PATCH 5/6] CPLP-1401: Add 0.7.0 to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6781cf0..8ecdc5d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ New features, fixed bugs, known defects and other noteworthy changes to each release of the Catena-X Portal Frontend Registration. +### 0.7.0 + +... + ### 0.6.0 * Bugfix - Finish page From 0e2174cb1cd088322341658553b99f22e2e53720 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 19 Oct 2022 11:17:14 +0200 Subject: [PATCH 6/6] CPLP-1401: Remove 0.7.0 from changelog --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ecdc5d3..e6781cf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,6 @@ New features, fixed bugs, known defects and other noteworthy changes to each release of the Catena-X Portal Frontend Registration. -### 0.7.0 - -... - ### 0.6.0 * Bugfix - Finish page