From 3ba721eb251b45aeb486dfd8b13a25694f99d35b Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 13:00:36 +0100 Subject: [PATCH 01/14] fix(security): updated axios library to v1.6.6 and runned ip checks --- DEPENDENCIES_FRONTEND | 2 +- package-lock.json | 18 +++++++++--------- package.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DEPENDENCIES_FRONTEND b/DEPENDENCIES_FRONTEND index 8c0e320b0..b387385bf 100644 --- a/DEPENDENCIES_FRONTEND +++ b/DEPENDENCIES_FRONTEND @@ -11,7 +11,7 @@ npm/npmjs/-/anymatch/3.1.3, ISC, approved, #5050 npm/npmjs/-/argparse/1.0.10, MIT, approved, #2174 npm/npmjs/-/astral-regex/2.0.0, MIT, approved, clearlydefined npm/npmjs/-/asynckit/0.4.0, MIT, approved, clearlydefined -npm/npmjs/-/axios/1.6.3, MIT, approved, #11338 +npm/npmjs/-/axios/1.6.7, MIT, approved, #11338 npm/npmjs/-/balanced-match/1.0.2, MIT, approved, clearlydefined npm/npmjs/-/base64-js/1.5.1, MIT, approved, clearlydefined npm/npmjs/-/binary-extensions/2.2.0, MIT, approved, clearlydefined diff --git a/package-lock.json b/package-lock.json index 7dfba514d..ab172b704 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.0", + "axios": ">=1.6.6", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", @@ -1027,11 +1027,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -4087,11 +4087,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } diff --git a/package.json b/package.json index ee1af517d..cd8544f44 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.0", + "axios": ">=1.6.6", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", From 4b9bc333b4cd5018e4f30d75c2aa59b7b4b31d14 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 13:01:04 +0100 Subject: [PATCH 02/14] fix(translations): fixed tab translation structure --- src/components/general/TabsComponent.vue | 4 +- src/components/passport/GeneralCards.vue | 4 +- src/components/passport/TransmissionCards.vue | 40 +++++++++---------- src/translations/de.json | 18 +++++++++ src/translations/en.json | 24 +++++++++++ src/views/PassportView.vue | 28 +++++++------ 6 files changed, 82 insertions(+), 36 deletions(-) diff --git a/src/components/general/TabsComponent.vue b/src/components/general/TabsComponent.vue index c05cf51d9..5f2c07c5a 100644 --- a/src/components/general/TabsComponent.vue +++ b/src/components/general/TabsComponent.vue @@ -29,7 +29,7 @@ :value="section.component" > - {{ $t(`passportView.dppComponentsNames.${section.label}`) }} + {{ section.label.includes("passportView")?$t(`${section.label}`):$t(`passportView.dppComponentsNames.${section.label}`) }} @@ -109,4 +109,4 @@ export default { componentsData: { type: Object, default: Object }, }, }; - + \ No newline at end of file diff --git a/src/components/passport/GeneralCards.vue b/src/components/passport/GeneralCards.vue index bb681aa46..3b5508f0e 100644 --- a/src/components/passport/GeneralCards.vue +++ b/src/components/passport/GeneralCards.vue @@ -144,7 +144,9 @@ export default { this.$props.data.aspect.sustainability["PEF"].carbon ? this.$props.data.aspect.sustainability["PEF"].carbon[0].value : "-", - valueUnits: "t CO2 Total", + valueUnits: (this.$props.data.aspect.sustainability["PEF"].carbon[0].unit !== "" + ? this.$props.data.aspect.sustainability["PEF"].carbon[0].unit + : "t CO₂") + "Total", secondValue: this.$props.data.aspect.commercial ? this.$props.data.aspect.commercial.warranty : "-", diff --git a/src/components/passport/TransmissionCards.vue b/src/components/passport/TransmissionCards.vue index 2ba4bebf9..73c469719 100644 --- a/src/components/passport/TransmissionCards.vue +++ b/src/components/passport/TransmissionCards.vue @@ -31,7 +31,7 @@ style="padding: 6px !important" >
- {{ card.title }} + {{ $t(card.title) }}
- {{ card.label }} + {{ $t(card.label) }}
{{ card.value ? card.value : "-" }} {{ card.valueUnits }} @@ -51,7 +51,7 @@
- {{ card.secondLabel }} + {{ $t(card.secondLabel) }}
{{ card.secondValue ? card.secondValue : "-" }} @@ -63,10 +63,10 @@ @@ -94,9 +94,9 @@ export default { return { cards: [ { - title: "GENERAL", - label: "Product description", - secondLabel: "Product type", + title: "generalCards.titleGeneral", + label: "generalCards.productName", + secondLabel: "generalCards.productType", icon: "mdi-pound", value: this.$props.data.aspect.generalInformation ? this.$props.data.aspect.generalInformation.productDescription @@ -106,9 +106,9 @@ export default { : "-", }, { - title: "MANUFACTURING", - label: "Manufacturer Id", - secondLabel: "Matrix code", + title: "generalCards.titleManufacturing", + label: "generalCards.manufacturerId", + secondLabel: "generalCards.dateOfManufacturing", icon: "mdi-chart-timeline-variant-shimmer", value: this.$props.data.aspect.identification ? this.$props.data.aspect.identification.manufacturerId @@ -122,9 +122,9 @@ export default { }, }, { - title: "SPECIFIC PARAMETERS", - label: "Drive type", - secondLabel: "Oil type", + title: "tranmissionCards.parameters", + label: "tranmissionCards.driveType", + secondLabel: "tranmissionCards.oilType", icon: "mdi-aspect", value: this.$props.data.aspect.productSpecificParameters.driveType, secondValue: @@ -135,9 +135,9 @@ export default { }, }, { - title: "SUSTAINABILITY", - label: "Total CO2 footprint", - secondLabel: "Warranty period", + title: "generalCards.titleSustainability", + label: "generalCards.totalCo2Footprint", + secondLabel: "generalCards.warrantyPeriod", icon: "mdi-leaf", value: this.$props.data.aspect.sustainability && @@ -153,12 +153,12 @@ export default { ? "months" : "", description: { - title: "Sustainability", - value: "Description of the Sustainability", + title: "generalCards.descriptionSustainabilityTitle", + value: "generalCards.descriptionSustainabilityValue", }, }, ], }; }, }; - + \ No newline at end of file diff --git a/src/translations/de.json b/src/translations/de.json index 0a8415f92..5e364e873 100644 --- a/src/translations/de.json +++ b/src/translations/de.json @@ -22,6 +22,24 @@ } }, "passportView": { + "policyAgreement":{ + "title": "Wählen Sie eine Richtlinie aus:", + "contractId": "Vertrags-ID:", + "policy": "Richtlinie", + "type": "Typ", + "decline": "Ablehnen", + "agree": "Zustimmen", + "details": { + "moreDetails": "Weitere Details", + "lessDetails": "Weniger Details" + }, + "declineModal": { + "question": "Sind Sie sicher, dass Sie ablehnen möchten?", + "homepage": "Dies bringt Sie zurück zur Startseite", + "cancel": "Abbrechen", + "confirm": "Ja, Ablehnen" + } + }, "dpp": "Digitaler Produkt Pass", "bpp": "Batterie Pass", "tpp": "Getriebe Pass", diff --git a/src/translations/en.json b/src/translations/en.json index 20eede3f7..47e3e8ef7 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -22,6 +22,24 @@ } }, "passportView": { + "policyAgreement":{ + "title": "Choose a policy:", + "contractId": "Contract ID:", + "policy": "Policy", + "type": "type", + "decline": "Decline", + "agree": "Agree", + "details":{ + "moreDetails": "More details", + "lessDetails": "Less details" + }, + "declineModal":{ + "question": "Are you sure you want to decline?", + "homepage": "This will take you back to the Homepage", + "cancel": "Cancel", + "confirm": "Yes, Decline" + } + }, "dpp": "Digital Product Passport", "bpp": "Battery Product Passport", "tpp": "Transmission Product Passport", @@ -121,6 +139,12 @@ "descriptionSustainabilityTitle": "Sustainability", "descriptionSustainabilityValue": "Description of the Sustainability" }, + "transmissionCards":{ + "matrixCode": "Matrix code", + "parameters": "SPECIFIC PARAMETERS", + "driveType": "Drive type", + "oilType": "Oil type" + }, "passportHeader": { "backBtn": "Back" }, diff --git a/src/views/PassportView.vue b/src/views/PassportView.vue index 103ba95fa..c586ff946 100644 --- a/src/views/PassportView.vue +++ b/src/views/PassportView.vue @@ -53,7 +53,7 @@
-
Choose a policy:
+
{{ $t("passportView.policyAgreement.title") }}
@@ -62,7 +62,7 @@ :key="contractId" >
- Contract ID: + {{ $t("passportView.policyAgreement.contractId") }} {{ contractId }}
Decline{{ $t("passportView.policyAgreement.decline") }} Agree{{ $t("passportView.policyAgreement.agree") }} @@ -127,11 +127,11 @@
- Are you sure you want to decline? + {{ $t("passportView.policyAgreement.declineModal.question") }}
- This will take you back to the Homepage + {{ $t("passportView.policyAgreement.declineModal.homepage") }}
@@ -140,7 +140,7 @@ class="text-none" variant="outlined" @click="cancelDeclineContract()" - >Cancel{{ $t("passportView.policyAgreement.declineModal.cancel") }}
@@ -281,7 +281,7 @@ export default { contractItems: reactive([]), radios: "0.0", details: false, - detailsTitle: "More details", + detailsTitle: this.$t("passportView.policyAgreement.details.moreDetails"), policies: [], declineContractModal: false, showContractModal: true, @@ -362,6 +362,8 @@ export default { return Array.isArray(value) ? value.length > 0 : Object.keys(value).length > 0; + }else if (Array.isArray(value) && value !== null){ + return value.length > 0; } return true; // Include if it's not an object/array or if it's a non-empty primitive value }); @@ -423,9 +425,9 @@ export default { toggleDetails() { this.details = !this.details; if (this.details) { - this.detailsTitle = "Less details"; + this.detailsTitle = this.$t("passportView.policyAgreement.details.lessDetails"); } else { - this.detailsTitle = "More details"; + this.detailsTitle = this.$t("passportView.policyAgreement.details.moreDetails"); } }, chooseContract(contract, policy) { From f6d25a0a91fae6a9446ce9391b694568586787a4 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 13:50:00 +0100 Subject: [PATCH 03/14] fix(translations): added translations for transmission pass --- src/components/general/TabsComponent.vue | 10 +++++++++- src/translations/de.json | 11 +++++++++++ src/translations/en.json | 11 +++++++++++ src/views/PassportView.vue | 2 ++ 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/components/general/TabsComponent.vue b/src/components/general/TabsComponent.vue index 5f2c07c5a..cc8a99dcb 100644 --- a/src/components/general/TabsComponent.vue +++ b/src/components/general/TabsComponent.vue @@ -29,7 +29,14 @@ :value="section.component" > - {{ section.label.includes("passportView")?$t(`${section.label}`):$t(`passportView.dppComponentsNames.${section.label}`) }} + {{ + section.label.includes("passportView") + ? $t(`${section.label}`) + : semanticId === + "urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass" + ? $t(`passportView.tppComponentsNames.${section.label}`) + : $t(`passportView.dppComponentsNames.${section.label}`) + }} @@ -107,6 +114,7 @@ export default { props: { componentsNames: { type: Object, default: Object }, componentsData: { type: Object, default: Object }, + semanticId: { type: String, default: "" }, }, }; \ No newline at end of file diff --git a/src/translations/de.json b/src/translations/de.json index 5e364e873..8522b0d63 100644 --- a/src/translations/de.json +++ b/src/translations/de.json @@ -66,6 +66,17 @@ "sustainability": "Nachhaltigkeit", "operation": "Betrieb", "exchange": "Austausch" + }, + "tppComponentsNames": { + "productSpecificParameters": "Produktspezifische Parameter", + "intructions": "Anleitungen", + "sparePartSupplier": "Ersatzteil-Lieferant", + "components": "Komponenten", + "stateOfHealth": "Zustand der Gesundheit", + "identification": "Identifikation", + "generalInformation": "Allgemeine Informationen", + "sustainability": "Nachhaltigkeit", + "exchange": "Austausch" } }, "home": { diff --git a/src/translations/en.json b/src/translations/en.json index 47e3e8ef7..0ad3f1f87 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -66,6 +66,17 @@ "sustainability": "Sustainability", "operation": "Operation", "exchange": "Exchange" + }, + "tppComponentsNames": { + "productSpecificParameters": "Product Specific Parameters", + "intructions": "Instructions", + "sparePartSupplier": "Spare Part Supplier", + "components": "Components", + "stateOfHealth": "State of Health", + "identification": "Identification", + "generalInformation": "General Information", + "sustainability": "Sustainability", + "exchange": "Exchange" } }, "home": { diff --git a/src/views/PassportView.vue b/src/views/PassportView.vue index c586ff946..2ddfa8eaa 100644 --- a/src/views/PassportView.vue +++ b/src/views/PassportView.vue @@ -216,12 +216,14 @@
From 8a8669e7bd68db5f505b6adef3d609ee2386898f Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 15:31:55 +0100 Subject: [PATCH 04/14] fix(translations): updated rest of transmission pass translations to german --- src/components/passport/TransmissionCards.vue | 6 +-- .../passport/sections/GeneralInformation.vue | 12 +++--- .../sections/ProductSpecificParameters.vue | 28 ++++++------ .../passport/sections/SparePartSupplier.vue | 6 +-- .../passport/sections/StateOfHealth.vue | 8 ++-- src/translations/de.json | 43 +++++++++++++++++++ src/translations/en.json | 39 ++++++++++++++++- 7 files changed, 111 insertions(+), 31 deletions(-) diff --git a/src/components/passport/TransmissionCards.vue b/src/components/passport/TransmissionCards.vue index 73c469719..e6b4b0b3c 100644 --- a/src/components/passport/TransmissionCards.vue +++ b/src/components/passport/TransmissionCards.vue @@ -122,9 +122,9 @@ export default { }, }, { - title: "tranmissionCards.parameters", - label: "tranmissionCards.driveType", - secondLabel: "tranmissionCards.oilType", + title: "transmissionCards.parameters", + label: "transmissionCards.driveType", + secondLabel: "transmissionCards.oilType", icon: "mdi-aspect", value: this.$props.data.aspect.productSpecificParameters.driveType, secondValue: diff --git a/src/components/passport/sections/GeneralInformation.vue b/src/components/passport/sections/GeneralInformation.vue index c2441f829..46dd75ec7 100644 --- a/src/components/passport/sections/GeneralInformation.vue +++ b/src/components/passport/sections/GeneralInformation.vue @@ -31,7 +31,7 @@ @@ -42,7 +42,7 @@ @@ -76,14 +76,14 @@ diff --git a/src/components/passport/sections/ProductSpecificParameters.vue b/src/components/passport/sections/ProductSpecificParameters.vue index 0dfcba53e..294c2c647 100644 --- a/src/components/passport/sections/ProductSpecificParameters.vue +++ b/src/components/passport/sections/ProductSpecificParameters.vue @@ -33,7 +33,7 @@ >
@@ -41,72 +41,72 @@ -
Standard gear ratio
+
{{ $t('sections.productSpecificParameters.standardGearRatio') }}
-
Speed resistance
+
{{ $t('sections.productSpecificParameters.speedResistance') }}
@@ -117,7 +117,7 @@ >
diff --git a/src/components/passport/sections/SparePartSupplier.vue b/src/components/passport/sections/SparePartSupplier.vue index 0382a295f..d127789dd 100644 --- a/src/components/passport/sections/SparePartSupplier.vue +++ b/src/components/passport/sections/SparePartSupplier.vue @@ -28,7 +28,7 @@
diff --git a/src/components/passport/sections/StateOfHealth.vue b/src/components/passport/sections/StateOfHealth.vue index 6c0c37725..139ace8b8 100644 --- a/src/components/passport/sections/StateOfHealth.vue +++ b/src/components/passport/sections/StateOfHealth.vue @@ -30,7 +30,7 @@
@@ -38,14 +38,14 @@ diff --git a/src/components/passport/sections/Instructions.vue b/src/components/passport/sections/Instructions.vue index 57db1074f..efe96d3c0 100644 --- a/src/components/passport/sections/Instructions.vue +++ b/src/components/passport/sections/Instructions.vue @@ -25,29 +25,29 @@ -
Packaging instructions
+
{{ $t('sections.instructions.packagingInstructions') }}
-
Transportation instructions
+
{{ $t('sections.instructions.transportationInstructions') }}
-
Dismantling procedure
+
{{ $t('sections.instructions.dismantlingProcedure') }}
-
Safety measures
+
{{ $t('sections.instructions.safetyMeasures') }}
-
Vehicle dismantling procedure
+
{{ $t('sections.instructions.vehicleDismantlingProcedure') }}
From 91cb144d9d16bb3fca808f55691926a733442f46 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 16:30:42 +0100 Subject: [PATCH 09/14] chore: added debugger to fix additionalData --- src/components/passport/sections/AdditionalData.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/passport/sections/AdditionalData.vue b/src/components/passport/sections/AdditionalData.vue index bb7b06a1d..bce346142 100644 --- a/src/components/passport/sections/AdditionalData.vue +++ b/src/components/passport/sections/AdditionalData.vue @@ -63,6 +63,8 @@ export default { }; }, created() { + console.log(this.$props.data.aspect); + console.log(this.propsData); this.columnWidth = this.columnCounter(this.propsData); }, methods: { From 01a503f70333e53ff73e67ff5307175ed61f1263 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 16:37:07 +0100 Subject: [PATCH 10/14] chore: updated axios to latest version --- CHANGELOG.md | 2 +- docs/RELEASE_USER.md | 2 +- package-lock.json | 2 +- package.json | 2 +- src/config/templates/passports.json | 23 +---------------- src/views/PassportView.vue | 40 ++++++++++++++++++----------- 6 files changed, 30 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06b270e7a..ffd13c141 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e - Integrated dependabot to automate the dependencies updates ## Updated -- Updated axios library from `v1.6.0` to `v1.6.6` to fix vulnerability +- Updated axios library from `v1.6.0` to `v1.6.7` to fix vulnerability - Updated the license headers in all the files to the latest "license and copyright header" of 2024 ## Issues Fixed diff --git a/docs/RELEASE_USER.md b/docs/RELEASE_USER.md index cfe9ac820..71621b802 100644 --- a/docs/RELEASE_USER.md +++ b/docs/RELEASE_USER.md @@ -39,7 +39,7 @@ Integrated dependabot to automate the dependencies updates and comply to the tra The License and copyright header was changed and the latest version was updated to every files needed in the application folder to the year 2024. #### Fixed security vulnerabilies related to axios -Updated the axios library to the latest version `v1.6.6` in order to solve the library vulnerability. +Updated the axios library to the latest version `v1.6.7` in order to solve the library vulnerability. **February 02 2024 (Version 2.1.0)** *02.02.2024* diff --git a/package-lock.json b/package-lock.json index fa755960f..5ec5f951e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.6", + "axios": ">=1.6.7", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", diff --git a/package.json b/package.json index 5b0ca6a94..4bdd474ac 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@mdi/font": "5.9.55", "@popperjs/core": "^2.11.2", "@vitejs/plugin-vue": "^4.0.0", - "axios": ">=1.6.6", + "axios": ">=1.6.7", "clipboard": "^2.0.11", "core-js": "^3.8.3", "crypto-js": "^4.2.0", diff --git a/src/config/templates/passports.json b/src/config/templates/passports.json index 8b79d1185..13be9c0b0 100644 --- a/src/config/templates/passports.json +++ b/src/config/templates/passports.json @@ -132,28 +132,7 @@ ] } }, - "additionalData": [ - { - "description": null, - "label": null, - "type": { - "typeUnit": null, - "dataType": null - }, - "data": null, - "children": [ - { - "description": null, - "label": null, - "type": { - "typeUnit": null, - "dataType": null - }, - "data": null - } - ] - } - ], + "additionalData": [], "sustainability": { "PEF": { "carbon": [ diff --git a/src/views/PassportView.vue b/src/views/PassportView.vue index e66968338..1c0e2817e 100644 --- a/src/views/PassportView.vue +++ b/src/views/PassportView.vue @@ -158,19 +158,7 @@
- -
- -
-
-
+
@@ -592,8 +592,8 @@ export default { "Timeout! Failed to negotiate and return the passport!"; this.errorObj.description = "The request took too long... Please retry or try again later."; - this.status = 408; - this.statusText = "Request Timeout"; + this.errorObj.status = 408; + this.errorObj.statusText = "Request Timeout"; } this.data = result; } catch (e) { @@ -621,11 +621,21 @@ export default { this.errorObj.reload = false; this.error = true; } else { + let additionalData = [] + if(jsonUtil.exists("additionalData", this.data["aspect"])){ + additionalData = jsonUtil.copy(this.data["aspect"]["additionalData"]); + } + this.data = configUtil.normalizePassport( jsonUtil.get("data.aspect", this.data), jsonUtil.get("data.metadata", this.data), jsonUtil.get("data.semanticId", this.data) ); + console.log(this.data); + if(jsonUtil.exists("additionalData", this.data["aspect"])){ + this.data["aspect"]["additionalData"] = additionalData + } + console.log(this.data); this.error = false; this.processId = this.$store.getters.getProcessId; // Get process id from the store this.irsData = this.backendService.getIrsData( From 0ebd4b79192dd294f705b7f7769fd8367f3776a9 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 17:23:49 +0100 Subject: [PATCH 11/14] chore: updated additional data --- src/config/templates/passports.json | 9 +-------- src/views/PassportView.vue | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/config/templates/passports.json b/src/config/templates/passports.json index 13be9c0b0..fe197c636 100644 --- a/src/config/templates/passports.json +++ b/src/config/templates/passports.json @@ -80,14 +80,7 @@ "carrierLayout": null } }, - "sources": [ - { - "header": null, - "category": null, - "type": null, - "content": null - } - ], + "sources": [], "handling": { "spareParts": { "left": { diff --git a/src/views/PassportView.vue b/src/views/PassportView.vue index 1c0e2817e..f175b6a15 100644 --- a/src/views/PassportView.vue +++ b/src/views/PassportView.vue @@ -621,21 +621,29 @@ export default { this.errorObj.reload = false; this.error = true; } else { - let additionalData = [] - if(jsonUtil.exists("additionalData", this.data["aspect"])){ - additionalData = jsonUtil.copy(this.data["aspect"]["additionalData"]); + let additionalData = []; + let sources = []; + // In order to have the additional data available we need to copy it in deep + if(jsonUtil.exists("additionalData", this.data["data"]["aspect"])){ + additionalData = jsonUtil.copy(this.data["data"]["aspect"]["additionalData"]); + } + // When extend deep is called this property will be replaced + if(jsonUtil.exists("sources", this.data["data"]["aspect"])){ + sources = jsonUtil.copy(this.data["data"]["aspect"]["sources"]); } - this.data = configUtil.normalizePassport( jsonUtil.get("data.aspect", this.data), jsonUtil.get("data.metadata", this.data), jsonUtil.get("data.semanticId", this.data) ); - console.log(this.data); + // Re-add the additionalData if(jsonUtil.exists("additionalData", this.data["aspect"])){ - this.data["aspect"]["additionalData"] = additionalData + this.data["aspect"]["additionalData"] = additionalData; + } + // Re-add the sources + if(jsonUtil.exists("sources", this.data["aspect"])){ + this.data["aspect"]["sources"] = sources; } - console.log(this.data); this.error = false; this.processId = this.$store.getters.getProcessId; // Get process id from the store this.irsData = this.backendService.getIrsData( From df04534555669d9c95c8a9c242a20c73a57541a8 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 18:13:05 +0100 Subject: [PATCH 12/14] chore: solved lint issues and prepared released --- CHANGELOG.md | 3 +++ charts/digital-product-pass/values-dev.yaml | 3 +-- charts/digital-product-pass/values.yaml | 5 +++-- src/components/passport/GeneralCards.vue | 2 +- src/components/passport/sections/AdditionalData.vue | 2 -- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd13c141..b4c4dca4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e ## Added - Added missing german translations to the transmission pass +- Added missing german translations to the policy selection feature - Integrated dependabot to automate the dependencies updates ## Updated @@ -39,6 +40,8 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e ## Issues Fixed - Fixed tabs bugs related to translations - Fixed translations of battery pass and digital product pass +- Fixed missing additional data visualization +- Fixed missing total sources visualization ## [released] ## [v2.1.0] - 02-02-2024 diff --git a/charts/digital-product-pass/values-dev.yaml b/charts/digital-product-pass/values-dev.yaml index 09a58dc17..7d4039294 100644 --- a/charts/digital-product-pass/values-dev.yaml +++ b/charts/digital-product-pass/values-dev.yaml @@ -104,5 +104,4 @@ oauth: enabled: true bpn: *bpn roleCheck: - enabled: false - + enabled: false \ No newline at end of file diff --git a/charts/digital-product-pass/values.yaml b/charts/digital-product-pass/values.yaml index 3a6cc9dd1..35ac6bcfd 100644 --- a/charts/digital-product-pass/values.yaml +++ b/charts/digital-product-pass/values.yaml @@ -95,7 +95,8 @@ backend: catalog: "/catalog/request" negotiation: "/contractnegotiations" transfer: "/transferprocesses" - delay: 100 # -- Negotiation status Delay in milliseconds in between async requests [<= 500] + # -- Negotiation status Delay in milliseconds in between async requests [<= 500] + delay: 100 # -- backend hostname (without protocol prefix [DEFAULT HTTPS] for security ) hostname: *hostname @@ -181,7 +182,7 @@ frontend: ingress: enabled: false hosts: [] - + # -- The [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) defines privilege and access control settings for a Pod within the deployment podSecurityContext: seccompProfile: diff --git a/src/components/passport/GeneralCards.vue b/src/components/passport/GeneralCards.vue index 3b5508f0e..d6736d823 100644 --- a/src/components/passport/GeneralCards.vue +++ b/src/components/passport/GeneralCards.vue @@ -146,7 +146,7 @@ export default { : "-", valueUnits: (this.$props.data.aspect.sustainability["PEF"].carbon[0].unit !== "" ? this.$props.data.aspect.sustainability["PEF"].carbon[0].unit - : "t CO₂") + "Total", + : "t CO₂") + " Total", secondValue: this.$props.data.aspect.commercial ? this.$props.data.aspect.commercial.warranty : "-", diff --git a/src/components/passport/sections/AdditionalData.vue b/src/components/passport/sections/AdditionalData.vue index bce346142..bb7b06a1d 100644 --- a/src/components/passport/sections/AdditionalData.vue +++ b/src/components/passport/sections/AdditionalData.vue @@ -63,8 +63,6 @@ export default { }; }, created() { - console.log(this.$props.data.aspect); - console.log(this.propsData); this.columnWidth = this.columnCounter(this.propsData); }, methods: { From a9b14e540df526a1711b735919243d556e9c6837 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 18:32:03 +0100 Subject: [PATCH 13/14] chore: updated readme application name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f2552df4..4d75f45e3 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ To get started you can have a look into our documentation: ## Installation -For installing the Digital Product Pass application please consult our [Intallation Guide](./INSTALL.md). +For installing the Digital Product Pass Application please consult our [Intallation Guide](./INSTALL.md). ## License From 1569e1032ee2ad91f34010b93852f25cb19ad6ae Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 5 Feb 2024 18:41:43 +0100 Subject: [PATCH 14/14] chore: updated pvc-data linting --- deployment/local/storage/pv-data.yaml | 5 +++-- deployment/local/storage/pvc-data.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deployment/local/storage/pv-data.yaml b/deployment/local/storage/pv-data.yaml index 22cf66db5..2e64354ba 100644 --- a/deployment/local/storage/pv-data.yaml +++ b/deployment/local/storage/pv-data.yaml @@ -20,6 +20,7 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################# + apiVersion: v1 kind: PersistentVolume metadata: @@ -33,6 +34,6 @@ spec: storageClassName: standard claimRef: name: pvc-data - namespace: default + namespace: {{ .Values.namespace }} hostPath: - path: "/mnt" + path: "/mnt" \ No newline at end of file diff --git a/deployment/local/storage/pvc-data.yaml b/deployment/local/storage/pvc-data.yaml index dbcc22388..f9936817d 100644 --- a/deployment/local/storage/pvc-data.yaml +++ b/deployment/local/storage/pvc-data.yaml @@ -27,7 +27,7 @@ metadata: name: pvc-data labels: {{- include "chart.labels" . | nindent 4 }} - namespace: default + namespace: {{ .Values.namespace }} spec: storageClassName: standard accessModes: