Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

New Release 1.1.0 #9

Merged
merged 11 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ 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).

## [Unreleased]

## [1.0.1] - 2023-02-21

### Changed

- Styling changes on some components according to portal style guidelines;
- Fix whitespace handling that removed apiVersion declaration from Helm templates;

### Added

- Added user information icon on right top corner and logout option;
- Added Help Button which has documentation explained how to use the application;

### Fixes

- Bug fix. Country selected manually by the user would not persist when the map dialog was opened;

## [1.0.0] - 2023-01-26

Expand All @@ -15,4 +30,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

[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.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
4 changes: 2 additions & 2 deletions charts/country-risk-frontend-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.7
version: 2.0.8

# 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.0.0"
appVersion: "1.0.1"



4 changes: 2 additions & 2 deletions charts/country-risk-frontend-charts/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

{{- if .Values.configmap.create -}}
{{ if .Values.configmap.create }}
apiVersion: v1
kind: ConfigMap
metadata:
name: config-frontend
data:
{{- toYaml .Values.configmap.data | nindent 2 }}
{{- end -}}
{{ end }}
4 changes: 2 additions & 2 deletions charts/country-risk-frontend-charts/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
###############################################################

{{- if .Values.ingress.enabled -}}
{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -53,4 +53,4 @@ spec:
# Default secret for certificate creation already provided to your namespace
secretName: tls-secret

{{- end }}
{{ end }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard-app",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.5",
Expand Down
49 changes: 26 additions & 23 deletions src/components/dashboard/CustomCompanyMap/CustomCompanyMap.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/********************************************************************************
* 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
********************************************************************************/
* 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 React, { useState, useEffect, useContext } from "react";
import UserService from "../../services/UserService";
import { getAll } from "../../services/dashboard-api";
Expand All @@ -28,6 +28,7 @@ import ImageMarker from "../../../resources/marker.png";
import { ReportContext } from "../../../contexts/reports";
import { getWorldMapInfo } from "../../services/dashboard-api";
import { GatesContext } from "../../../contexts/gates";

import {
ComposableMap,
Geographies,
Expand Down Expand Up @@ -82,11 +83,13 @@ const CustomCompanyMap = (ratings) => {
(r) => r.name === "Country"
);

updateCountry(
reportCountry.length && !Array.isArray(reportCountry[0].objectValue)
? reportCountry[0].objectValue
: "none"
);
if (!ratings.expand) {
updateCountry(
reportCountry.length && !Array.isArray(reportCountry[0].objectValue)
? reportCountry[0].objectValue
: "none"
);
}
}, [reportValuesContext]);

const geoUrl = require("./world-countries.json");
Expand Down
2 changes: 1 addition & 1 deletion src/components/dashboard/DashBoardTable/DashboardTable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022,2023 BMW Group AG
* 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
Expand Down
4 changes: 2 additions & 2 deletions src/components/dashboard/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2022,2023 BMW Group AG
* 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
Expand Down Expand Up @@ -55,7 +55,7 @@ const DatePicker = ({ passYearSelected }) => {
passYearSelected(date);
}, [date]);

const { reportValuesContext, updateReport } = useContext(ReportContext);
const { reportValuesContext } = useContext(ReportContext);

useEffect(() => {
const reportRates = reportValuesContext.filter((r) => r.name === "Ratings");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
/********************************************************************************
* 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
********************************************************************************/
* 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 React, { useContext } from "react";
import "./styles.scss";
import { CompanyUserContext } from "../../../contexts/companyuser";
import { Button } from "cx-portal-shared-components";
import {
Button,
DialogHeader,
DialogContent,
DialogActions,
} from "cx-portal-shared-components";
import { updateReports, deleteReport } from "../../services/reports-api";
import UserService from "../../services/UserService";
import { Report } from "../../model/Report";
Expand Down Expand Up @@ -124,18 +129,18 @@ const DeleteUpdateComponent = ({

return (
<div className="Dialog-Expand-Div">
<h2>{deleteUpdateData.operation}</h2>
<div>
<h3>{deleteUpdateData.doubleCheckMessage}</h3>
</div>
<div className="warning-header">
<DialogHeader
title={deleteUpdateData.operation}
intro={deleteUpdateData.doubleCheckMessage}
/>
<DialogActions>
<Button className="btn-no" variant="outlined" onClick={closeDialog}>
No
</Button>
<Button data-testid="btnYes" onClick={decideAction}>
Yes
</Button>
</div>
</DialogActions>
</div>
);
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/dashboard/DeleteUpdateComponent/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@

.Dialog-Expand-Div {
text-align: center;
background-color: #edf0f4;
background-color: #FFFFFF;
border-radius: 39px !important;
border: 2px solid #000;

.FirstLabel {
margin-left: auto;
Expand Down
68 changes: 36 additions & 32 deletions src/components/dashboard/LeftMap/LeftMap.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
/********************************************************************************
* 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
********************************************************************************/
* 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
********************************************************************************/
/* eslint-disable no-console */
import React, { useState } from "react";
import { Dialog, IconButton, Button } from "cx-portal-shared-components";
import {
Dialog,
IconButton,
Button,
DialogHeader,
} from "cx-portal-shared-components";
import "./styles.scss";
import CustomWorldMap from "../CustomWorld/CustomWorldMap";
import OpenWithIcon from "@mui/icons-material/ZoomIn";
Expand Down Expand Up @@ -58,22 +63,22 @@ const LeftMap = (ratings) => {
className="left-dialog-expand-map"
>
<div className="expand-box-div">
<div className="CloseIcon">
<IconButton
className="close-button"
onClick={openDialog}
size="medium"
variant="primary"
>
<CloseIcon></CloseIcon>
</IconButton>
</div>
<Box className="expand-mui-box">
<DialogHeader title="World Map" />
<div className="buttons">
<h2>World Map</h2>
<Button size="small" onClick={printMap}>
Export Image
</Button>

<IconButton
className="close-button"
color="primary"
onClick={openDialog}
size="medium"
variant="text"
>
<CloseIcon></CloseIcon>
</IconButton>
</div>
<div className="map-and-progressbar" id="idCustomWorldMap">
<div className="expand-custom-world-map">
Expand All @@ -96,11 +101,10 @@ const LeftMap = (ratings) => {
</Dialog>
</div>
<div className="left-map-container">
<h2>World Map</h2>
<h3 className="headerName">World Map</h3>
<IconButton
data-testid="expand-btn"
className="expand-button"
color="primary"
onClick={openDialog}
size="medium"
variant="text"
Expand Down
Loading