diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb index 448db4b2..3f3dbe9a 100644 --- a/.idea/sonarlint/issuestore/index.pb +++ b/.idea/sonarlint/issuestore/index.pb @@ -23,8 +23,4 @@ g AUTHORS.md,a\2\a2b261d0119ad783ac285fbc4f699e96fc0b7e2f O -charts/country-risk/values.yaml,d\f\dfd8927926db4939f1420a87cf1eb4c3af6a3b0b -B -docs/User-Guide.md,b\f\bf6845072684d0fabe6f6c75b14ea44b6ec136b7 -K -docs/Arc42-Documentation.md,7\8\78886f8c4fd104c8647d1e81bfe3a52495e3ddee \ No newline at end of file +charts/country-risk/values.yaml,d\f\dfd8927926db4939f1420a87cf1eb4c3af6a3b0b \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0530b3ac..ced7083d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ 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.2.1] - [Unreleased] + +### Changed +- Updated arc42 documentation to align with the updated Country Risk application. +- Switched the shell interpreter from `bash` to `sh` in our scripts to enhance portability and reduce dependencies. +- Upgrade node version on Dockerfile + ## [1.2.0] - 2023-10-11 ### Added diff --git a/Dockerfile b/Dockerfile index af8d2060..b36015fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ #******************************************************************************* # Base image -FROM node:18-alpine AS compile-image +FROM node:20-alpine AS compile-image # Set work directory WORKDIR /app @@ -67,9 +67,8 @@ COPY ./scripts/inject-dynamic-env.sh /docker-entrypoint.d/00-inject-dynamic-env. RUN chmod +x /docker-entrypoint.d/00-inject-dynamic-env.sh -# Install bash and update vulnerable packages -RUN apk update && \ - apk add --no-cache bash +# Update vulnerable packages +RUN apk update # Change ownership and switch back to nginx user RUN chown -R 101:101 /usr/share/nginx/html/ diff --git a/docs/Arc42-Documentation.md b/docs/Arc42-Documentation.md index fa527529..f64d2220 100644 --- a/docs/Arc42-Documentation.md +++ b/docs/Arc42-Documentation.md @@ -12,9 +12,9 @@ contributors. See . # Introduction and Goals -### Inital Situation from Business View +### Initial Situation from Business View -Geographical risks become more relevant in VUCA times and User from Business need an excellent solution to fulfill their requirements. VUCA meens volatile, uncertain, complex, and ambigous. In VUCA times, situations can change quickly (e.g. Ukraine war). +Geographical risks become more relevant in VUCA times and User from Business need an excellent solution to fulfill their requirements. VUCA means volatile, uncertain, complex, and ambiguous. In VUCA times, situations can change quickly (e.g. Ukraine war). The Business challenge is to have awareness towards their business partners just in time. Be it in ongoing business or in the initiation of business. From business side the user needs to know who they are dealing with. This is especially true for business partners in a different country. @@ -54,7 +54,7 @@ The benefit is to get to know your business partner or potential business partne Role/Name | Contact | Expectations ----------------|-----------------------------------------------------------------------------------------------------------------------------------| ----------- -Member Company | A company that participates in the Catena-X ecosystem (use-cases and data sharing). | Participate in the overal value proposition/stream provided by Catena-X. +Member Company | A company that participates in the Catena-X ecosystem (use-cases and data sharing). | Participate in the overall value proposition/stream provided by Catena-X. Company Admin | A person that manages a single member companies integration into the dataspace on behalf of his employer. | Manage and monitor the proper integration and function of a member company within the Catena-X ecosystem. Company User | A person that acts within the provided functionality of Catena-X on behalf of his employer (that is a member company) | Execute various permitted tasks on behalf of a member company the user is assigned to. @@ -65,7 +65,7 @@ Company User | A person that acts within the provided functionality of Catena - Run anywhere: can be deployed as a docker image, e. g. on Kubernetes (platform-independent, cloud, on prem or local). - Modular design: core-components are loosely coupled. - Freedom of choice for technology components stops where UX is negatively impacted. - (currently under revision by the overall catena architecture roundtable) + (currently under revision by the overall catena architecture round table) - Roles & Rights Matrix: Roles & Rights Concept ## Roles Rights Management @@ -77,12 +77,21 @@ There shall be 3 roles specific to the country risk application in the portal: - Company Admin User - Company Standard User + ![RolesRightsManagement](../docs/Images/RolesRights.jpg) +There can be two more roles for now regarding what type of User this is, and they are: +- Customer +- Supplier + +Each User can have none , one or both. +It will determine what columns we will see on the Table. + +![table roles](../docs/Images/Table.png) # System Scope and Context -![System Scope](../docs/Images/image2023-1-15_19-3-44.png) +![System Scope](../docs/Images/StandardisedDataExchange.png) #### Example Data Sources @@ -197,7 +206,7 @@ UI/UX | HTML, JavaScript, CSS # Building Block View -## Whitebox Overall System +## White-box Overall System This components Diagram represents the possible actions to be done by the user when opening the dashboard. @@ -268,27 +277,49 @@ For this component, it is necessary to call three different APIs. The APIs used # Interfaces -Please Check Swagger Doku +Please Check Swagger Documentation https://vas-country-risk-backend.dev.demo.catena-x.net/swagger-ui/index.html#/ ### Endpoint explanation: +## Dashboard Controller + +![apiUpload](../docs/Images/reportUpdate.png) + +This endpoint is used to update the report. An example in the dashboard is when a user updates a report such as changing the selected rating ranges to change the rating colour ranges, the user can press the save reports button and the new settings will be updated. + +![updateReport](../docs/Images/updateReport.png) + +![saveChangesReport](../docs/Images/saveChangesReport.png) + + ![apiUpload](../docs/Images/image2022-10-10_13-32-5.png) -In this endpoint, it is automatically inserted the information from the user that is accessing the tool, and it needs a manually inserted name and also an CSV file that can be retrieved in the download template in the tool. After this it is created a new registry with the information inside of the inserted CSV file onto the database. As parameters it requires the rating name, year, and type (Global, Company or Custom). +This endpoint automatically inserts the information from the current user. The uploaded file needs to be in the format of the template which may be downloaded, with the file name being manually set. After upload, the data in the file is available to be utilised by the user in the application. Required parameters are rating name, rating year, and type (Global, Company or Custom). + Example: ![csvselector](../docs/Images/SaveRating.png) ![csvfile](../docs/Images/image2022-10-10_15-43-52.png) +![shareReport](../docs/Images/shareReport.png) + +This endpoint is used to share the ratings report. +When a user has already saved their report and would like to share it, the user can share the report with other users from their company who have the required permissions to the Country Risk Dashboard. + +![shareReportIcon](../docs/Images/shareReportIcon.png) + +![shareReportIconOption](../docs/Images/shareReportIconOption.png) + ![saveRanges](../docs/Images/image2022-10-10_13-31-47.png) In this endpoint, it is automatically inserted the information from the user that is accessing the tool, and it is manually inputted the three ranges currently selected by the user in the ranges component. These values are all saved using an object type. Example: ![ranges](../docs/Images/Ranges.png) + ![saveReports](../docs/Images/image2022-12-5_12-40-53.png) This endpoint is used to save an reports. It is used in the report component to save multiple selected data (Selected Ratings, Country, Range Values) and be able to use it in a later time. This endpoint receives as input field the Report name, the Type (Global, Company or Custom) of which the report should be saved for. Also it receives the current user information and an object that gathers all the selected data (Selected Ratings, Country, Range Values). Example: @@ -311,7 +342,17 @@ This endpoint retrieves a score based on selected ratings, year and current user This endpoint is used for retrieving an the current user ranges. The values retrieved are the three types of ranges (Minimum, middle and Maximum), each associated to a type of value. This values are used to populate the ranges component with the last saved ranges that the user inputted. -![RangesExample](../docs/Images/image2022-10-10_14-9-44.png) +![RangesExample](../docs/Images/ranges_example.png) + + +![template](../docs/Images/getUsersFromCompany.png) + +This endpoint allows the retrieval of users from the user's company. +The company is automatically extracted from the authentication token, thus avoiding filters. +It is used when a report is to be shared for example. + +![companyUsersResponse.png](../docs/Images/companyUsersResponse.png) + ![template](../docs/Images/image2022-10-10_13-36-1.png) @@ -335,6 +376,7 @@ This endpoint is used to retrieve reports. This endpoint receives as input field This endpoint is used to retrieve reports. It is used in the report component to to populate the table. This endpoint only receives as input field the current user information. ![exampleuserinfo](../docs/Images/image2022-12-5_13-31-59.png) +This endpoint is used to retrieve all the Reports that a user can choose from. ![getcountryfilter](../docs/Images/image2022-10-10_13-43-23.png) @@ -358,38 +400,43 @@ This endpoint retrieves all the countries that are associated to the Business pa This endpoint returns information from the BPDM Gate to show the User specific Business Partners -![getscoresperbpn](../docs/Images/image2022-12-5_13-33-24.png) -In this endpoint the User can request a Mapping of Business Partners to a specific Rating. As parameters it is needed an Rating and BPNs array and also the company of he user. +![getyears](../docs/Images/image2022-10-10_13-44-13.png) -![examplequery](../docs/Images/image2022-12-5_14-14-19.png) +This endpoint retrieves all the years that are currently saved on the database. This years are used to populate the year selection dropdown in the tool. -In this picture, we can see how both the Ratings and BPNs are composed. The Ratings array can contain multiple objects that have the dataSourceName and the +![deleteReport](../docs/Images/image2022-12-30_11-37-34.png) -following year. Regarding the BPNs array, it can also contain multiple objects, and each of them have the BPN name and a country of which can be given a value +This endpoint is used to delete an report created by the user. It is used in the report table in the Front-End application. It needs the id related to the report selected and also the user information to proceed with the delete request. -or no value. If the BPN has no country value, the backend will map it according to the BPN. -![exampleresultmatching](../docs/Images/image2022-12-5_14-14-53.png) +![deleteRating](../docs/Images/image2022-12-30_11-50-52.png) -![getRatingsforCompany](../docs/Images/image2022-12-5_13-33-41.png) +This endpoint is used to delete an rating created by the user. It is used in the report table in the Front-End application. It needs the id related to the rating selected and also the user information to proceed with the delete request. -In this endpoint it is possible for the user to request Information about which Ratings are available to his Company. The information needed is solely the Company and the Year. +## Sharing Controller -![exampleratingsforcompany](../docs/Images/image2022-12-5_14-8-29.png) +![scoreforEachBpn](../docs/Images/scoreforEachBpn.png) -![getyears](../docs/Images/image2022-10-10_13-44-13.png) +In this endpoint the User can request a Mapping of Business Partners to a specific Rating. As parameters it is needed an Rating and BPNs array and also the company of he user. -This endpoint retrieves all the years that are currently saved on the database. This years are used to populate the year selection dropdown in the tool. +![examplequery](../docs/Images/image2022-12-5_14-14-19.png) -![deleteReport](../docs/Images/image2022-12-30_11-37-34.png) +In this picture, we can see how both the Ratings and BPNs are composed. The Ratings array can contain multiple objects that have the dataSourceName and the -This endpoint is used to delete an report created by the user. It is used in the report table in the Front-End application. It needs the id related to the report selected and also the user information to proceed with the delete request. +following year. Regarding the BPNs array, it can also contain multiple objects, and each of them have the BPN name and a country of which can be given a value + +or no value. If the BPN has no country value, the backend will map it according to the BPN. +![exampleForEachBpn](../docs/Images/exampleForEachBpn.png) -![deleteRating](../docs/Images/image2022-12-30_11-50-52.png) -This endpoint is used to delete an rating created by the user. It is used in the report table in the Front-End application. It needs the id related to the rating selected and also the user information to proceed with the delete request. + +![endpointAllRatingsForCompany](../docs/Images/endpointAllRatingsForCompany.png) + +In this endpoint it is possible for the user to request Information about which Ratings are available to his Company. The information needed is solely the Company and the Year. + +![exampleratingsforcompany](../docs/Images/image2022-12-5_14-8-29.png) ## How to configure the Gate Connection @@ -397,17 +444,19 @@ This endpoint is used to delete an rating created by the user. It is used in the The first step to connect the Dashboard to a company specific "Gate" is setting up a Company Group. -![addcompanygroup](../docs/Configuration-of-Gates/2023-02-24_12_45_25.png) - -- company_name: Inser the Name of the requesting Company -- company_group_id: Set a numeric value counting up from the beginning 1 per company +![addcompanygroup](../docs/Configuration-of-Gates/configofgates03.png) we create a company group for the Case that a sharing Company has multiple "Gates" to which can be connected. + ### Setting up Company To be able to connect to a company specific Gate first the Company has to be inserted into the t_company table and connected to a company group: -![addcompany](../docs/Configuration-of-Gates/2023-02-24_12_43_46.png) +![addcompany](../docs/Configuration-of-Gates/configofgates02.png) + +- company_name: Insert the Name of the requesting Company +- company_group_id: Set a numeric value counting up from the beginning 1 per company + After the company has been added to the Table the next step is to set a "Gate" for this company. @@ -416,7 +465,7 @@ After the company has been added to the Table the next step is to set a "Gate" f To set the "Gate" Link the Administrator has to insert the following Information into the table t_company_group_gates -![addGate](../docs/Configuration-of-Gates/2023-02-24_12_41_14.png) +![addGate](../docs/Configuration-of-Gates/configofgates01.png) - gate_name: can be given freely preferably connected to name of the company - company_gate_value: Direct Link to "Gate" developed by the BPDM Team @@ -674,7 +723,7 @@ If the report would been duplicated, an Http Bad Request status would be shown, ![updateReports](../docs/Images/image2023-1-11_9-49-15.jpg) -In this endpoint, it is received as a parameter the CompanyUser and an ReportDTO that will be used to be upated. It is used to update an ReportDTO related to the CompanyUser parameter received. +In this endpoint, it is received as a parameter the CompanyUser and an ReportDTO that will be used to be updated. It is used to update an ReportDTO related to the CompanyUser parameter received. The method 1.1.1 getOrCreate will receive the parameter CompanyUser, and will do a verification if that user is already created. If not it will create that user. @@ -711,7 +760,7 @@ The method 1.1.1 getGatesForCompanyUser, it firstly done the method getCompanyBy After this, an List of CompanyGatesDTOS is returned in the main class (DashBoardResouce). -#### Endpoint: /dashboard/getAllRatingsForCompany +#### Endpoint: /sharing/getAllRatingsForCompany ![getAllRatingsforCompany](../docs/Images/image2023-1-11_9-58-31.jpg) @@ -724,7 +773,7 @@ After that, the method 1.1.1.2 findByYearPublishedAndCompanyUserCompanyNameAndTy After this, both lists are join onto one and returned in the main class as an List of DataSourceDTO. -#### Endpoint: /dashboard/getAllRatingsScoresForEachBpn +#### Endpoint: /sharing/getAllRatingsScoresForEachBpn ![getRatingsScore](../docs/Images/image2023-1-11_9-58-28.jpg) diff --git a/docs/Configuration-Of-Gates/config-of-gates-01.png b/docs/Configuration-of-Gates/configofgates01.png similarity index 100% rename from docs/Configuration-Of-Gates/config-of-gates-01.png rename to docs/Configuration-of-Gates/configofgates01.png diff --git a/docs/Configuration-Of-Gates/config-of-gates-02.png.png b/docs/Configuration-of-Gates/configofgates02.png similarity index 100% rename from docs/Configuration-Of-Gates/config-of-gates-02.png.png rename to docs/Configuration-of-Gates/configofgates02.png diff --git a/docs/Configuration-Of-Gates/config-of-gates-03.png.png b/docs/Configuration-of-Gates/configofgates03.png similarity index 100% rename from docs/Configuration-Of-Gates/config-of-gates-03.png.png rename to docs/Configuration-of-Gates/configofgates03.png diff --git a/docs/Images/StandardisedDataExchange.png b/docs/Images/StandardisedDataExchange.png new file mode 100644 index 00000000..cc33c105 Binary files /dev/null and b/docs/Images/StandardisedDataExchange.png differ diff --git a/docs/Images/Table.png b/docs/Images/Table.png new file mode 100644 index 00000000..f3758a5a Binary files /dev/null and b/docs/Images/Table.png differ diff --git a/docs/Images/companyUsersResponse.png b/docs/Images/companyUsersResponse.png new file mode 100644 index 00000000..d0e409f8 Binary files /dev/null and b/docs/Images/companyUsersResponse.png differ diff --git a/docs/Images/endpointAllRatingsForCompany.PNG b/docs/Images/endpointAllRatingsForCompany.PNG new file mode 100644 index 00000000..de13894e Binary files /dev/null and b/docs/Images/endpointAllRatingsForCompany.PNG differ diff --git a/docs/Images/endpointAllRatingsForCompany.png b/docs/Images/endpointAllRatingsForCompany.png new file mode 100644 index 00000000..de13894e Binary files /dev/null and b/docs/Images/endpointAllRatingsForCompany.png differ diff --git a/docs/Images/exampleForEachBpn.PNG b/docs/Images/exampleForEachBpn.PNG new file mode 100644 index 00000000..1cb9e5f2 Binary files /dev/null and b/docs/Images/exampleForEachBpn.PNG differ diff --git a/docs/Images/exampleForEachBpn.png b/docs/Images/exampleForEachBpn.png new file mode 100644 index 00000000..1cb9e5f2 Binary files /dev/null and b/docs/Images/exampleForEachBpn.png differ diff --git a/docs/Images/getUsersFromCompany.PNG b/docs/Images/getUsersFromCompany.PNG new file mode 100644 index 00000000..dba2bf0b Binary files /dev/null and b/docs/Images/getUsersFromCompany.PNG differ diff --git a/docs/Images/getUsersFromCompany.png b/docs/Images/getUsersFromCompany.png new file mode 100644 index 00000000..dba2bf0b Binary files /dev/null and b/docs/Images/getUsersFromCompany.png differ diff --git a/docs/Images/ranges_example.PNG b/docs/Images/ranges_example.PNG new file mode 100644 index 00000000..fda8af80 Binary files /dev/null and b/docs/Images/ranges_example.PNG differ diff --git a/docs/Images/ranges_example.png b/docs/Images/ranges_example.png new file mode 100644 index 00000000..fda8af80 Binary files /dev/null and b/docs/Images/ranges_example.png differ diff --git a/docs/Images/reportUpdate.png b/docs/Images/reportUpdate.png new file mode 100644 index 00000000..a9bf3d73 Binary files /dev/null and b/docs/Images/reportUpdate.png differ diff --git a/docs/Images/saveChangesReport.PNG b/docs/Images/saveChangesReport.PNG new file mode 100644 index 00000000..7b636bc7 Binary files /dev/null and b/docs/Images/saveChangesReport.PNG differ diff --git a/docs/Images/saveChangesReport.png b/docs/Images/saveChangesReport.png new file mode 100644 index 00000000..7b636bc7 Binary files /dev/null and b/docs/Images/saveChangesReport.png differ diff --git a/docs/Images/scoreforEachBpn.PNG b/docs/Images/scoreforEachBpn.PNG new file mode 100644 index 00000000..8c2e93d6 Binary files /dev/null and b/docs/Images/scoreforEachBpn.PNG differ diff --git a/docs/Images/scoreforEachBpn.png b/docs/Images/scoreforEachBpn.png new file mode 100644 index 00000000..8c2e93d6 Binary files /dev/null and b/docs/Images/scoreforEachBpn.png differ diff --git a/docs/Images/shareReport.PNG b/docs/Images/shareReport.PNG new file mode 100644 index 00000000..fb3bb75b Binary files /dev/null and b/docs/Images/shareReport.PNG differ diff --git a/docs/Images/shareReport.png b/docs/Images/shareReport.png new file mode 100644 index 00000000..fb3bb75b Binary files /dev/null and b/docs/Images/shareReport.png differ diff --git a/docs/Images/shareReportIcon.PNG b/docs/Images/shareReportIcon.PNG new file mode 100644 index 00000000..12a60952 Binary files /dev/null and b/docs/Images/shareReportIcon.PNG differ diff --git a/docs/Images/shareReportIcon.png b/docs/Images/shareReportIcon.png new file mode 100644 index 00000000..12a60952 Binary files /dev/null and b/docs/Images/shareReportIcon.png differ diff --git a/docs/Images/shareReportIconOption.PNG b/docs/Images/shareReportIconOption.PNG new file mode 100644 index 00000000..80b7a3ab Binary files /dev/null and b/docs/Images/shareReportIconOption.PNG differ diff --git a/docs/Images/shareReportIconOption.png b/docs/Images/shareReportIconOption.png new file mode 100644 index 00000000..80b7a3ab Binary files /dev/null and b/docs/Images/shareReportIconOption.png differ diff --git a/docs/Images/updateReport.PNG b/docs/Images/updateReport.PNG new file mode 100644 index 00000000..8f6c0839 Binary files /dev/null and b/docs/Images/updateReport.PNG differ diff --git a/docs/Images/updateReport.png b/docs/Images/updateReport.png new file mode 100644 index 00000000..8f6c0839 Binary files /dev/null and b/docs/Images/updateReport.png differ diff --git a/docs/User-Guide-Images/Table.png b/docs/User-Guide-Images/Table.png index daebf60b..f3758a5a 100644 Binary files a/docs/User-Guide-Images/Table.png and b/docs/User-Guide-Images/Table.png differ diff --git a/docs/User-Guide-Images/add_app.png b/docs/User-Guide-Images/add_app.png new file mode 100644 index 00000000..94e8ff2a Binary files /dev/null and b/docs/User-Guide-Images/add_app.png differ diff --git a/docs/User-Guide-Images/login.png b/docs/User-Guide-Images/login.png new file mode 100644 index 00000000..ce80195e Binary files /dev/null and b/docs/User-Guide-Images/login.png differ diff --git a/docs/User-Guide-Images/login_board.png b/docs/User-Guide-Images/login_board.png new file mode 100644 index 00000000..0640f9dd Binary files /dev/null and b/docs/User-Guide-Images/login_board.png differ diff --git a/docs/User-Guide-Images/main_page.png b/docs/User-Guide-Images/main_page.png new file mode 100644 index 00000000..62cfe4e7 Binary files /dev/null and b/docs/User-Guide-Images/main_page.png differ diff --git a/docs/User-Guide.md b/docs/User-Guide.md index 0b7a7491..c5748fc3 100644 --- a/docs/User-Guide.md +++ b/docs/User-Guide.md @@ -7,14 +7,14 @@ In this Section we are describing how you can gain Access to the Dashboard 2. Your Company needs to setup everything for the Connection with our Application: This can be found with the BPDM 'Create a Gate' And needs to be subscribed to the service -![Portal](../docs/User-Guide-Images/image2023-1-16_10-55-20.png) +![Portal](../docs/User-Guide-Images/add_app.png) 3. Your Accounts needs to have one of the two Roles currently available -![App](../docs/User-Guide-Images/image2023-1-16_10-54-3.png) +![App](../docs/User-Guide-Images/main_page.png) -After the Previous steps are finished the way to the Dashboar dis very simple: +After the Previous steps are finished the way to the Dashboard is very simple: 1. Go to the Catena-X Portal 2. Open your Applications @@ -24,9 +24,9 @@ After the Previous steps are finished the way to the Dashboar dis very simple: ![Login](../docs/User-Guide-Images/image2023-1-16_11-0-2.png) -Choose the Login Option you want and is setup. +Choose the Login Option you want and its setup. -![Input](../docs/User-Guide-Images/image2023-1-16_11-1-17.png) +![Input](../docs/User-Guide-Images/login_board.png) 5. After the Login you will be directed to the Dashboard @@ -56,17 +56,17 @@ Currently all Globally available Ratings are Open Source. We do not create Score ![RatingTable](../docs/User-Guide-Images/RatingSelection.png) -Next to the Year Selection you will find the the Gate selection. This selection will be done for you atuomatically on the first start-up of the Dashbaord. +Next to the Year Selection you will find the Gate selection. This selection will be done for you atuomatically on the first start-up of the Dashbaord. ![Gateselect](../docs/User-Guide-Images/GateSelection.png) -The Gate gives the Input on which Business Partners you will be able see in all components. +The Gate gives the Input on which Business Partners you will be able to see in all components. Thereafter you can select one or multiple Ratings in the Table. ![Ratingselected](../docs/User-Guide-Images/RatingSelected.png) -If you want to select more Ratings at once you can Opena Pop-Up with the 'Show Ratings' Button -In this Table you can manipulate the same way oyu can in the smaller Table. +If you want to select more Ratings at once you can Open a Pop-Up with the 'Show Ratings' Button +In this Table you can manipulate the same way you can in the smaller Table. ![Popupselection](../docs/User-Guide-Images/RatingListPopUp.png) @@ -87,8 +87,8 @@ The Rules for the weighting are: ![weighting](../docs/User-Guide-Images/WeightingOverlap.png) 2. automatic weighting overwrites upon selecting new Raings -3. when changing you need to confiem value by pressing "enter" - Changing the Weighting changes the Scores given in the Table below. How the Scores are calculated is this desbrided there. +3. when changing you need to confirm value by pressing "enter" + Changing the Weighting changes the Scores given in the Table below. How the Scores are calculated is described there. ### How can i Upload my own Rating and what do i need to know. @@ -100,13 +100,13 @@ The First step is to Download the Template. This is important since this is the ![excellist](../docs/User-Guide-Images/image2023-1-16_11-44-50.png) After filling out the Column E please save the File. The name is not important since the Name is set when the Rating is Uploaded. -After creating your own Rating all you have to Upload the File you start with clicking on 'Upload Rating' +After creating your own Rating all you have to do is Upload the File, you can start with clicking on 'Upload Rating' Then this Pop-Up is shown: ![popupupload](../docs/User-Guide-Images/RatingUpload.png) -You then have the Option to select who can see thiws Rating after Uploading. +You then have the Option to select who can see this Rating after Uploading. You have the Option between 'Only For me' or 'For the Company'. The secon Option is grayed out if you dont have administration rights. After selecting the Target group you can select the year for which this Rating is relevant for. Below the year selection you can Give a Name to the Rating. A Rating Name can only be given once. @@ -143,7 +143,7 @@ The Map shows an interactive Map of the World for the User - Upon zooming in the User can see Markers in countries. Those markers show the Location of the available Business Partners - Hovering over the Marker reveils the Company Name in that Location + Hovering over the Marker reveals the Company Name in that Location ![hoveringmarker](../docs/User-Guide-Images/WorldMapMarker.png) @@ -166,7 +166,7 @@ The Map shows an interactive Map of the World for the User The Company View shows a Map of the World. The Map is similar to the World Map. -In this Map the User can also zoom in to reveil more Information: +In this Map the User can also zoom in to reveal more Information: ![zoommap](../docs/User-Guide-Images/CompanyView.png) @@ -175,14 +175,14 @@ The User can also hover over one Country at a time. ![hovercountrymap](../docs/User-Guide-Images/CompanyViewHover.png) In the Company view we not only show the Name of the Country we also show how many Business Partners which are available to you are located in this country. -We also show the Score in the Hover since the COuntries are not being colored when a Rating is selected. +We also show the Score in the Hover since the Countries are not being colored when a Rating is selected. New in this View is the Option to Filter for a country ![searchcountry](../docs/User-Guide-Images/CompanyViewFiltered.png) After selecting a country the Map zooms to the country and shows the Markers for each Business Partner in this Country. -Also the Table below both Maps is filtered for the selected country. +Also the Table below is filtered for the selected country. ![tablesearched](../docs/User-Guide-Images/TableFiltered.png) @@ -191,7 +191,7 @@ The functionalities remain in the expanded Mode. ![expandcountrymap](../docs/User-Guide-Images/CompanyViewExpand.png) -![expandedcountrymap](../docs/User-Guide-Images/CompanyViewExpanded.png) +![expandedcountrymap](../docs/User-Guide-Images/ComapnyViewExpanded.png) After Expanding the Map the User can see the Option to Export the Image. Upon clicking on the Button a PNG is created and downloaded. The File is named "BusinessPartnerMap.png" @@ -211,17 +211,19 @@ Functionalities: - Export of Table as a CSV File (depending on the selected Business partners) -In the Table we show 9 Columns: +In the Table we show 7 Columns: - Business Partner Number - Legal Name -- Street -- House Number -- Zip-Code -- City Country +- Country +- City - Score - Ratings (In the Rating Column we then show the selected Ratings.) +In the Table you can also have 2 more columns dependent of the roles you have: +- Customer +- Supplier + Upon starting the Application we are setting up a connection to the Gate your Company has setup and you are allowed to access. We then make a request to get the Information for each BPN-L, BPN-S and BPN-A. diff --git a/package.json b/package.json index b48c8b93..e6f62a94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dashboard-app", - "version": "1.2.0", + "version": "1.2.1", "private": true, "dependencies": { "@emotion/react": "^11.10.5", diff --git a/scripts/inject-dynamic-env.sh b/scripts/inject-dynamic-env.sh index a975f172..91380f8f 100644 --- a/scripts/inject-dynamic-env.sh +++ b/scripts/inject-dynamic-env.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ############################################################### # Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation # @@ -31,11 +31,11 @@ REACT_APP_COUNTRY_RISK_CLIENT_anchor='REACT_APP_COUNTRY_RISK_CLIENT:"country_ris index_html_reference=`cat /usr/share/nginx/html/index.html.reference` -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") -index_html=$(sed -r 's%'$REACT_APP_COUNTRY_RISK_CLIENT_anchor'%'$custom_env_vars_REACT_APP_COUNTRY_RISK_CLIENT'%g' <<< "$index_html") +index_html=$(echo "$index_html_reference" | sed -r 's%'$REACT_APP_AUTH_URL_anchor'%'$custom_env_vars_REACT_APP_AUTH_URL'%g') +index_html=$(echo "$index_html" | sed -r 's%'$REACT_APP_COUNTRY_RISK_API_anchor'%'$custom_env_vars_REACT_APP_COUNTRY_RISK_API'%g') +index_html=$(echo "$index_html" | sed -r 's%'$REACT_APP_PORTAL_FRONTEND_anchor'%'$custom_env_vars_REACT_APP_PORTAL_FRONTEND'%g') +index_html=$(echo "$index_html" | sed -r 's%'$REACT_APP_PORTAL_BACKEND_anchor'%'$custom_env_vars_REACT_APP_PORTAL_BACKEND'%g') +index_html=$(echo "$index_html" | sed -r 's%'$REACT_APP_COUNTRY_RISK_CLIENT_anchor'%'$custom_env_vars_REACT_APP_COUNTRY_RISK_CLIENT'%g') echo "$index_html" -echo "$index_html" > /usr/share/nginx/html/index.html \ No newline at end of file +echo "$index_html" > /usr/share/nginx/html/index.html