diff --git a/.env b/.env index 791013ac..06c2b5e1 100644 --- a/.env +++ b/.env @@ -1,24 +1,20 @@ -REACT_URL_ENV=http://localhost:8080 -REACT_APP_AUTH_URL=http://localhost:8080/auth -REACT_APP_PORTAL_URL=http://localhost:8080/auth -REACT_APP_PORTAL_BACKEND_URL=http://localhost:8080/auth -REACT_APP_DASHBOARD_URL=${REACT_URL_ENV}/api/dashboard/getTableInfo? -REACT_APP_DASHBOARD_URL_RATINGSTABLE=${REACT_URL_ENV}/api/dashboard/ratingsByYear? -REACT_APP_DATEFORM_URL=${REACT_URL_ENV}/api/dashboard/allYears -REACT_APP_DASHBOARD_WOLRD_MAP_URL=${REACT_URL_ENV}/api/dashboard/getWorldMap? -REACT_APP_DASHBOARD_FILE_TEMPLATE_DOWNLOAD=${REACT_URL_ENV}/api/dashboard/getTemplate? -REACT_APP_GET_RANGES=${REACT_URL_ENV}/api/dashboard/getUserRanges? -REACT_APP_SAVE_RANGES=${REACT_URL_ENV}/api/dashboard/saveUserRanges? -REACT_APP_UPLOAD_FILE=${REACT_URL_ENV}/api/dashboard/uploadCsv? -REACT_APP_GET_COUNTRYS=${REACT_URL_ENV}/api/dashboard/getCountryFilterByISO2? -REACT_APP_GET_BPN_COUNTRYS=${REACT_URL_ENV}/api/dashboard/getBpnCountrys? -REACT_APP_GET_BPNS=${REACT_URL_ENV}/api/dashboard/getCompanyBpns? -REACT_APP_GET_REPORTS_BY_USER=${REACT_URL_ENV}/api/dashboard/getReportsByCompanyUser? -REACT_APP_GET_REPORT_VALUES_BY_REPORT=${REACT_URL_ENV}/api/dashboard/getReportsValueByReport? -REACT_APP_SAVE_REPORTS=${REACT_URL_ENV}/api/dashboard/saveReports? -REACT_APP_SHARE_REPORTS=${REACT_URL_ENV}/api/dashboard/shareReport? -REACT_APP_UPDATE_REPORTS=${REACT_URL_ENV}/api/dashboard/updateReports? -REACT_APP_DELETE_REPORTS=${REACT_URL_ENV}/api/dashboard/deleteReport -REACT_APP_GET_USER_BPDM_GATES=${REACT_URL_ENV}/api/dashboard/getAllUserBPDMGates? -REACT_APP_DELETE_RATINGS=${REACT_URL_ENV}/api/dashboard/deleteRating -REACT_APP_GET_COMPANY_USERS=${REACT_URL_ENV}/api/dashboard/getUserFromCompany? +REACT_APP_DASHBOARD_URL=/api/dashboard/getTableInfo? +REACT_APP_DASHBOARD_URL_RATINGSTABLE=/api/dashboard/ratingsByYear? +REACT_APP_DATEFORM_URL=/api/dashboard/allYears +REACT_APP_DASHBOARD_WOLRD_MAP_URL=/api/dashboard/getWorldMap? +REACT_APP_DASHBOARD_FILE_TEMPLATE_DOWNLOAD=/api/dashboard/getTemplate? +REACT_APP_GET_RANGES=/api/dashboard/getUserRanges? +REACT_APP_SAVE_RANGES=/api/dashboard/saveUserRanges? +REACT_APP_UPLOAD_FILE=/api/dashboard/uploadCsv? +REACT_APP_GET_COUNTRYS=/api/dashboard/getCountryFilterByISO2? +REACT_APP_GET_BPN_COUNTRYS=/api/dashboard/getBpnCountrys? +REACT_APP_GET_BPNS=/api/dashboard/getCompanyBpns? +REACT_APP_GET_REPORTS_BY_USER=/api/dashboard/getReportsByCompanyUser? +REACT_APP_GET_REPORT_VALUES_BY_REPORT=/api/dashboard/getReportsValueByReport? +REACT_APP_SAVE_REPORTS=/api/dashboard/saveReports? +REACT_APP_SHARE_REPORTS=/api/dashboard/shareReport? +REACT_APP_UPDATE_REPORTS=/api/dashboard/updateReports? +REACT_APP_DELETE_REPORTS=/api/dashboard/deleteReport +REACT_APP_GET_USER_BPDM_GATES=/api/dashboard/getAllUserBPDMGates? +REACT_APP_DELETE_RATINGS=/api/dashboard/deleteRating +REACT_APP_GET_COMPANY_USERS=/api/dashboard/getUserFromCompany? diff --git a/.env.development b/.env.development deleted file mode 100644 index abadf3b2..00000000 --- a/.env.development +++ /dev/null @@ -1,20 +0,0 @@ -REACT_APP_DASHBOARD_URL=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getTableInfo? -REACT_APP_DASHBOARD_URL_RATINGSTABLE=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/ratingsByYear? -REACT_APP_DATEFORM_URL=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/allYears -REACT_APP_DASHBOARD_WOLRD_MAP_URL=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getWorldMap? -REACT_APP_DASHBOARD_FILE_TEMPLATE_DOWNLOAD=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getTemplate? -REACT_APP_GET_RANGES=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getUserRanges? -REACT_APP_SAVE_RANGES=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/saveUserRanges? -REACT_APP_UPLOAD_FILE=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/uploadCsv? -REACT_APP_GET_COUNTRYS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getCountryFilterByISO2? -REACT_APP_GET_BPN_COUNTRYS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getBpnCountrys? -REACT_APP_GET_BPNS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getCompanyBpns? -REACT_APP_GET_REPORTS_BY_USER=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getReportsByCompanyUser? -REACT_APP_GET_REPORT_VALUES_BY_REPORT=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getReportsValueByReport? -REACT_APP_SAVE_REPORTS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/saveReports? -REACT_APP_SHARE_REPORTS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/shareReport? -REACT_APP_UPDATE_REPORTS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/updateReports? -REACT_APP_DELETE_REPORTS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/deleteReport -REACT_APP_GET_USER_BPDM_GATES=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getAllUserBPDMGates? -REACT_APP_DELETE_RATINGS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/deleteRating -REACT_APP_GET_COMPANY_USERS=https://vas-country-risk-backend.dev.demo.catena-x.net/api/dashboard/getUserFromCompany? \ No newline at end of file diff --git a/.env.production b/.env.production deleted file mode 100644 index 96181dcf..00000000 --- a/.env.production +++ /dev/null @@ -1,24 +0,0 @@ -REACT_URL_ENV=https://vas-country-risk-backend.int.demo.catena-x.net -REACT_APP_AUTH_URL=https://centralidp.int.demo.catena-x.net/auth -REACT_APP_PORTAL_URL=https://portal.dev.demo.catena-x.net -REACT_APP_PORTAL_BACKEND_URL=https://portal-backend.dev.demo.catena-x.net -REACT_APP_DASHBOARD_URL=${REACT_URL_ENV}/api/dashboard/getTableInfo? -REACT_APP_DASHBOARD_URL_RATINGSTABLE=${REACT_URL_ENV}/api/dashboard/ratingsByYear? -REACT_APP_DATEFORM_URL=${REACT_URL_ENV}/api/dashboard/allYears -REACT_APP_DASHBOARD_WOLRD_MAP_URL=${REACT_URL_ENV}/api/dashboard/getWorldMap? -REACT_APP_DASHBOARD_FILE_TEMPLATE_DOWNLOAD=${REACT_URL_ENV}/api/dashboard/getTemplate? -REACT_APP_GET_RANGES=${REACT_URL_ENV}/api/dashboard/getUserRanges? -REACT_APP_SAVE_RANGES=${REACT_URL_ENV}/api/dashboard/saveUserRanges? -REACT_APP_UPLOAD_FILE=${REACT_URL_ENV}/api/dashboard/uploadCsv? -REACT_APP_GET_COUNTRYS=${REACT_URL_ENV}/api/dashboard/getCountryFilterByISO2? -REACT_APP_GET_BPN_COUNTRYS=${REACT_URL_ENV}/api/dashboard/getBpnCountrys? -REACT_APP_GET_BPNS=${REACT_URL_ENV}/api/dashboard/getCompanyBpns? -REACT_APP_GET_REPORTS_BY_USER=${REACT_URL_ENV}/api/dashboard/getReportsByCompanyUser? -REACT_APP_GET_REPORT_VALUES_BY_REPORT=${REACT_URL_ENV}/api/dashboard/getReportsValueByReport? -REACT_APP_SAVE_REPORTS=${REACT_URL_ENV}/api/dashboard/saveReports? -REACT_APP_SHARE_REPORTS=${REACT_URL_ENV}/api/dashboard/shareReport? -REACT_APP_UPDATE_REPORTS=${REACT_URL_ENV}/api/dashboard/updateReports? -REACT_APP_DELETE_REPORTS=${REACT_URL_ENV}/api/dashboard/deleteReport -REACT_APP_GET_USER_BPDM_GATES=${REACT_URL_ENV}/api/dashboard/getAllUserBPDMGates? -REACT_APP_DELETE_RATINGS=${REACT_URL_ENV}/api/dashboard/deleteRating -REACT_APP_GET_COMPANY_USERS=${REACT_URL_ENV}/api/dashboard/getUserFromCompany? diff --git a/.idea/sonarlint/issuestore/d/a/dac799070c2d0c2fa24462b02c1f2dcc3fb3a1e9 b/.idea/sonarlint/issuestore/d/a/dac799070c2d0c2fa24462b02c1f2dcc3fb3a1e9 deleted file mode 100644 index e69de29b..00000000 diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb index 17f00e2f..4499b622 100644 --- a/.idea/sonarlint/issuestore/index.pb +++ b/.idea/sonarlint/issuestore/index.pb @@ -13,11 +13,20 @@ c ,src/components/dashboard/Ratings/styles.scss,4\d\4de8d3bfe1c9d5b916a3562a19e3ab2a3f10325f V &src/components/services/UserService.js,4\3\43b64a74751ee9053b0052baa95dab17ca3aba2b -g -7src/components/dashboard/CountryPicker/CountryPicker.js,9\e\9e64c56a3d55d4c4bff840610045dad14026a967 -U -%src/components/dashboard/dashboard.js,4\d\4d483efec471c46a10a0e967ac5e1f0c4cba0425 B src/index-dev.scss,2\1\2141da40a2e04f68f12e4fcdcc340d14a126d224 B -src/index-int.scss,f\9\f9b786e2767e92774adcc43fe3e2691333b09c42 \ No newline at end of file +src/index-int.scss,f\9\f9b786e2767e92774adcc43fe3e2691333b09c42 +@ +.conf/nginx.conf,1\b\1b7d3f43ac3f65995537f164c511c094fd46fcba +g +7src/components/dashboard/CountryPicker/CountryPicker.js,9\e\9e64c56a3d55d4c4bff840610045dad14026a967 +K +.github/workflows/build.yml,f\e\fe77d5d1439f26e353a42bbd38dece2467ff6558 +P + .github/workflows/sonarcloud.yml,0\7\077a84aad902191fd63fd374880221279f02a65d +: + +AUTHORS.md,a\2\a2b261d0119ad783ac285fbc4f699e96fc0b7e2f +] +-charts/country-risk-frontend-charts/README.md,1\3\13fac6809f5f81eb63578cb1c8eaac14b20c6702 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a56e74bb..fa0e2ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2023-03-02 + +### Changed +- Changed file scripts/inject-dynamic-env.sh adding more dynamic vars into application +- Changed value  .securityContext.runAsUser   on values.yaml to run in the container as the same privileged user created on the dockerfile +- Changed copy command on docker file to a more clean sintaxis combining cp command with chwon command + +### Removed +- Remove env files not used +- Remove images on public folder not used and not needed + +### Fixes +- Fixed $REACT_APP_AUTH_URL from vars  to be reused on many more files-services for api calling using only common path ## [1.1.0] - 2023-02-22 @@ -14,13 +27,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added script for injecting vars on nginx -- Added arq42 documentation +- Added arq42 documentation - Added UserGuide ### Fixes - Fixed a bug in the Help Dialog regarding broken attachments that we´re missing -## [1.0.1] - 2023-02-21 +## [1.0.1] - 2023-02-21 ### Changed @@ -42,6 +55,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First Release -[unreleased]: https://github.com/eclipse-tractusx/vas-country-risk-frontend/compare -[1.0.0]: https://github.com/eclipse-tractusx/vas-country-risk-frontend/compare -[1.1.0]: https://github.com/eclipse-tractusx/vas-country-risk-frontend/compare + diff --git a/Dockerfile b/Dockerfile index 9e4c3a4e..49927f34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,12 @@ FROM node:16.15.1 AS compile-image WORKDIR /app COPY package.json . -COPY package-lock.json . +COPY --chown=root:node package-lock.json . COPY public ./public -copy .env* . +COPY --chown=root:node .env* . COPY src ./src -RUN chown -R root:node . RUN chmod -R u+rwx,g+rwx,o+rwx . -RUN chmod -R 775 package-lock.json USER node @@ -24,16 +22,25 @@ RUN npm run build FROM nginxinc/nginx-unprivileged:stable-alpine -WORKDIR /usr/share/nginx/html +COPY .conf/nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=compile-image /app/build . +COPY --from=compile-image /app/build /usr/share/nginx/html -ENTRYPOINT ["nginx", "-g", "daemon off;"] +# Change to root user for renaming of index.html to index.html.reference, to be used by env variables inject script +USER root +RUN mv /usr/share/nginx/html/index.html /usr/share/nginx/html/index.html.reference -EXPOSE 8080 +# Add env variables inject script and mark as executable +COPY ./scripts/inject-dynamic-env.sh /docker-entrypoint.d/00-inject-dynamic-env.sh +RUN chmod +x /docker-entrypoint.d/00-inject-dynamic-env.sh -EXPOSE 80 +# Install bash for env variables inject script +RUN apk update && apk add bash + +# Make nginx owner of /usr/share/nginx/html/ and change to nginx user +RUN chown -R 101:101 /usr/share/nginx/html/ +USER 101 diff --git a/charts/country-risk-frontend-charts/Chart.yaml b/charts/country-risk-frontend-charts/Chart.yaml index 3fb76bb8..7c147b58 100644 --- a/charts/country-risk-frontend-charts/Chart.yaml +++ b/charts/country-risk-frontend-charts/Chart.yaml @@ -34,13 +34,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.0.8 +version: 2.0.9 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.1.0" +appVersion: "1.1.1" diff --git a/charts/country-risk-frontend-charts/values-dev.yaml b/charts/country-risk-frontend-charts/values-dev.yaml index 4189a0b4..36589a1f 100644 --- a/charts/country-risk-frontend-charts/values-dev.yaml +++ b/charts/country-risk-frontend-charts/values-dev.yaml @@ -35,3 +35,11 @@ ingress: certificate: host: "country-risk-dashboard.dev.demo.catena-x.net" +configmap: + # Specifies whether a configmap should be created or not + data: + REACT_APP_AUTH_URL: 'https://centralidp.dev.demo.catena-x.net/auth' + REACT_APP_COUNTRY_RISK_API: 'https://vas-country-risk-backend.dev.demo.catena-x.net' + REACT_APP_PORTAL_FRONTEND: 'https://portal.dev.demo.catena-x.net' + REACT_APP_PORTAL_BACKEND: 'https://portal-backend.dev.demo.catena-x.net' + diff --git a/charts/country-risk-frontend-charts/values-int.yaml b/charts/country-risk-frontend-charts/values-int.yaml index dc9f21f3..14849c11 100644 --- a/charts/country-risk-frontend-charts/values-int.yaml +++ b/charts/country-risk-frontend-charts/values-int.yaml @@ -32,4 +32,12 @@ ingress: certificate: host: "country-risk-dashboard.int.demo.catena-x.net" +configmap: + # Specifies whether a configmap should be created or not + data: + REACT_APP_AUTH_URL: 'https://centralidp.int.demo.catena-x.net/auth' + REACT_APP_COUNTRY_RISK_API: 'https://vas-country-risk-backend.int.demo.catena-x.net' + REACT_APP_PORTAL_FRONTEND: 'https://portal.int.demo.catena-x.net' + REACT_APP_PORTAL_BACKEND: 'https://portal-backend.int.demo.catena-x.net' + diff --git a/charts/country-risk-frontend-charts/values.yaml b/charts/country-risk-frontend-charts/values.yaml index fabdcceb..c1bd4f89 100644 --- a/charts/country-risk-frontend-charts/values.yaml +++ b/charts/country-risk-frontend-charts/values.yaml @@ -61,7 +61,7 @@ securityContext: # -- Specifies whether the process inside the container should run as a non-root user runAsNonRoot: true # -- Specifies the user ID that the process inside the container should run - runAsUser: 10001 + runAsUser: 101 # -- Specifies the group ID that the process inside the container should run runAsGroup: 3000 # -- Capabilities that the process inside the container should have diff --git a/package.json b/package.json index b8f693aa..bb76d910 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashboard-app", - "version": "1.1.0", + "version": "1.1.1", "private": true, "dependencies": { "@emotion/react": "^11.10.5", diff --git a/public/index.html b/public/index.html index f7091e08..da7047d5 100644 --- a/public/index.html +++ b/public/index.html @@ -3,16 +3,16 @@ + React App
- diff --git a/public/left_map.PNG b/public/left_map.PNG deleted file mode 100644 index bad45aaf..00000000 Binary files a/public/left_map.PNG and /dev/null differ diff --git a/public/right_map.PNG b/public/right_map.PNG deleted file mode 100644 index 1892e875..00000000 Binary files a/public/right_map.PNG and /dev/null differ diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index e9e57dc4..00000000 --- a/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/scripts/inject-dynamic-env.sh b/scripts/inject-dynamic-env.sh index 9f236663..d9b84db1 100644 --- a/scripts/inject-dynamic-env.sh +++ b/scripts/inject-dynamic-env.sh @@ -1,9 +1,38 @@ #!/bin/bash +############################################################### +# Copyright (c) 2021, 2023 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 +############################################################### +custom_env_vars_REACT_APP_AUTH_URL='REACT_APP_AUTH_URL:"'$REACT_APP_AUTH_URL'"' +custom_env_vars_REACT_APP_COUNTRY_RISK_API='REACT_APP_COUNTRY_RISK_API:"'$REACT_APP_COUNTRY_RISK_API'"' +custom_env_vars_REACT_APP_PORTAL_FRONTEND='REACT_APP_PORTAL_FRONTEND:"'$REACT_APP_PORTAL_FRONTEND'"' +custom_env_vars_REACT_APP_PORTAL_BACKEND='REACT_APP_PORTAL_BACKEND:"'$REACT_APP_PORTAL_BACKEND'"' - -custom_env_vars='{REACT_URL_ENV:"'$REACT_URL_ENV'",REACT_APP_AUTH_URL:"'$REACT_APP_AUTH_URL'"}' -custom_env_vars_anchor='{REACT_URL_ENV:"http://localhost:8080",REACT_APP_AUTH_URL:"http://localhost:8080/auth"}' +REACT_APP_AUTH_URL_anchor='REACT_APP_AUTH_URL:"http://localhost:8080/auth"' +REACT_APP_COUNTRY_RISK_API_anchor='REACT_APP_COUNTRY_RISK_API:"http://localhost:8080"' +REACT_APP_PORTAL_FRONTEND_anchor='REACT_APP_PORTAL_FRONTEND:"http://localhost:8080"' +REACT_APP_PORTAL_BACKEND_anchor='REACT_APP_PORTAL_BACKEND:"http://localhost:8080"' index_html_reference=`cat /usr/share/nginx/html/index.html.reference` -index_html=${index_html_reference//$custom_env_vars_anchor/$custom_env_vars} + +index_html=$(sed -r 's%'$REACT_APP_AUTH_URL_anchor'%'$custom_env_vars_REACT_APP_AUTH_URL'%g' <<< "$index_html_reference") +index_html=$(sed -r 's%'$REACT_APP_COUNTRY_RISK_API_anchor'%'$custom_env_vars_REACT_APP_COUNTRY_RISK_API'%g' <<< "$index_html") +index_html=$(sed -r 's%'$REACT_APP_PORTAL_FRONTEND_anchor'%'$custom_env_vars_REACT_APP_PORTAL_FRONTEND'%g' <<< "$index_html") +index_html=$(sed -r 's%'$REACT_APP_PORTAL_BACKEND_anchor'%'$custom_env_vars_REACT_APP_PORTAL_BACKEND'%g' <<< "$index_html") + +echo "$index_html" echo "$index_html" > /usr/share/nginx/html/index.html \ No newline at end of file diff --git a/src/App.js b/src/App.js index 70ca05ea..dfc85a0c 100644 --- a/src/App.js +++ b/src/App.js @@ -1,34 +1,33 @@ /******************************************************************************** -* Copyright (c) 2022,2023 BMW Group AG -* Copyright (c) 2022,2023 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 Dashboard from './components/dashboard/dashboard' -import './App.scss' -import { RatesProvider } from './contexts/rates' -import { PageHeader } from 'cx-portal-shared-components' -import { Footer } from './components/dashboard/Footer/Footer' -import { RangesProvider } from './contexts/ranges' -import { CountryProvider } from './contexts/country' -import { CompanyUserProvider } from './contexts/companyuser' -import { ReportProvider } from './contexts/reports' -import { ReloadProvider } from './contexts/refresh' -import { GatesProvider } from './contexts/gates' -import NavigationBar from './components/dashboard/NavigationBar/NavigationBar' + * Copyright (c) 2022,2023 BMW Group AG + * Copyright (c) 2022,2023 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 Dashboard from "./components/dashboard/dashboard"; +import "./App.scss"; +import { RatesProvider } from "./contexts/rates"; +import { Footer } from "./components/dashboard/Footer/Footer"; +import { RangesProvider } from "./contexts/ranges"; +import { CountryProvider } from "./contexts/country"; +import { CompanyUserProvider } from "./contexts/companyuser"; +import { ReportProvider } from "./contexts/reports"; +import { ReloadProvider } from "./contexts/refresh"; +import { GatesProvider } from "./contexts/gates"; +import NavigationBar from "./components/dashboard/NavigationBar/NavigationBar"; function App() { return ( <> @@ -54,7 +53,7 @@ function App() { - ) + ); } -export default App +export default App; diff --git a/src/components/dashboard/DeleteUpdateComponent/DeleteUpdateComponent.js b/src/components/dashboard/DeleteUpdateComponent/DeleteUpdateComponent.js index 28fd9983..921131ac 100644 --- a/src/components/dashboard/DeleteUpdateComponent/DeleteUpdateComponent.js +++ b/src/components/dashboard/DeleteUpdateComponent/DeleteUpdateComponent.js @@ -42,7 +42,6 @@ const DeleteUpdateComponent = ({ const { report, reportValuesContext } = useContext(ReportContext); const decideAction = () => { - console.log("UserOperation"); if (deleteUpdateData.operation === "Save Changes") { closeDialogsAndSave(); } else if (deleteUpdateData.operation === "Delete Report") { @@ -129,9 +128,9 @@ const DeleteUpdateComponent = ({ return (
-