Skip to content

Commit

Permalink
Merge branch 'main' into release/v2.1.0/user-manual
Browse files Browse the repository at this point in the history
  • Loading branch information
matbmoser authored Feb 2, 2024
2 parents a3325ac + 86dd4aa commit f6a1f01
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 80 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# SPDX-License-Identifier: Apache-2.0
##################################################################################

__pycache__/
.DS_Store
node_modules
dist
Expand Down
3 changes: 1 addition & 2 deletions charts/digital-product-pass/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#################################################################################
# Catena-X - Digital Passport Passport Application
# Catena-X - Product Passport Consumer Application
#
# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA
# Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down
1 change: 0 additions & 1 deletion charts/digital-product-pass/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ A Helm chart for Tractus-X Digital Product Pass Kubernetes
| backend.discovery.edcDiscovery | object | `{"key":"bpn"}` | edc discovery configuration |
| backend.discovery.hostname | string | `""` | discovery finder configuration |
| backend.edc | object | `{"apis":{"catalog":"/catalog/request","management":"/management/v2","negotiation":"/contractnegotiations","transfer":"/transferprocesses"},"delay":100,"hostname":"","participantId":"<Add participant id here>","xApiKey":"<Add API key here>"}` | in this section we configure the values that are inserted as secrets in the backend |
| backend.edc.delay | int | `100` | Negotiation status Delay in milliseconds in between async requests [<= 500] |
| backend.edc.hostname | string | `""` | edc consumer connection configuration |
| backend.edc.participantId | string | `"<Add participant id here>"` | BPN Number |
| backend.edc.xApiKey | string | `"<Add API key here>"` | the secret for assesing the edc management API |
Expand Down
2 changes: 1 addition & 1 deletion dpp-backend/charts/digital-product-pass-backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#################################################################################
# Catena-X - Digital Product Passport Application
# Catena-X - Product Passport Consumer Application
#
# Copyright (c) 2022, 2024 BASF SE, BMW AG, Henkel AG & Co. KGaA
# Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
Expand Down
2 changes: 2 additions & 0 deletions dpp-backend/scripts/getPassport.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def search_contract(process_id, serialized_id, id_type=None, semantic_id=None, s
data["children"] = children

logger.debug(f"Searching for contract: {str(data)}")

headers={
"Authorization": "Bearer "+ access_token,
"Content-Type": "application/json"
Expand Down Expand Up @@ -174,6 +175,7 @@ def negotiate_contract(process_id, contract_id, token, session=None):
"Content-Type": "application/json"
}
logger.debug(f"Negotiate contract: {str(data)}")

url = Constants.SERVER_URL + Constants.AGREE_API
try:
response = HttpUtils.do_post(url=url, session=session, headers=headers, verify=False, json=data)
Expand Down
2 changes: 1 addition & 1 deletion src/assets/MOCK/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"status": 200,
"data": {
"id": "ededdca7-998d-4cd6-94a1-dd1e24025a85",
"token": "37da8e38e4dc14d32c0edfa82a0ea94bbf39e4013c010bfdfececdc58eadf0c5",
"token": "<tokenTest>",
"contract": {
"@id": "urn:uuid:0ec8cf2b-f58e-3f13-b5ef-e7dd01d15b19",
"@type": "dcat:Dataset",
Expand Down
2 changes: 1 addition & 1 deletion src/components/general/TabsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
:value="section.component"
>
<v-icon start md :icon="section.icon"> </v-icon>
{{ $t(section.label) }}
{{ $t(`passportView.dppComponentsNames.${section.label}`) }}
</v-tab>
</v-tabs>
<v-card-text>
Expand Down
9 changes: 6 additions & 3 deletions src/components/passport/GeneralCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@ export default {
label: "generalCards.totalCo2Footprint",
secondLabel: "generalCards.warrantyPeriod",
icon: "mdi-leaf",
value: this.$props.data.aspect.sustainability["PEF"].carbon
? this.$props.data.aspect.sustainability["PEF"].carbon[0].value
: "-",
value:
this.$props.data.aspect.sustainability &&
this.$props.data.aspect.sustainability["PEF"] &&
this.$props.data.aspect.sustainability["PEF"].carbon
? this.$props.data.aspect.sustainability["PEF"].carbon[0].value
: "-",
valueUnits: "t CO2 Total",
secondValue: this.$props.data.aspect.commercial
? this.$props.data.aspect.commercial.warranty
Expand Down
10 changes: 6 additions & 4 deletions src/components/passport/TransmissionCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ export default {
label: "Total CO2 footprint",
secondLabel: "Warranty period",
icon: "mdi-leaf",
value: this.$props.data.aspect.sustainability.carbonFootprint
? this.$props.data.aspect.sustainability.carbonFootprint
.co2FootprintTotal
: "-",
value:
this.$props.data.aspect.sustainability &&
this.$props.data.aspect.sustainability.carbonFootprint
? this.$props.data.aspect.sustainability.carbonFootprint
.co2FootprintTotal
: "-",
valueUnits: "t CO2 Total",
secondValue:
this.$props.data.aspect.generalInformation.warrantyPeriod,
Expand Down
4 changes: 2 additions & 2 deletions src/components/passport/sections/Characteristics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
v-for="attr in propsData.lifespan"
:key="attr"
:icon="callIconFinder('lifespan')"
label="Lifespan"
:label="$t('sections.characteristics.lifespan')"
:value="attr.value"
:unit="attr.unit"
/>
Expand All @@ -58,7 +58,7 @@
<template v-if="propsData.physicalState">
<Field
:icon="callIconFinder('physicalState')"
label="Physical state"
:label="$t('sections.characteristics.physicalState')"
:value="propsData.physicalState"
/>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/components/passport/sections/Commercial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('placedOnMarket')"
label="Place on the market"
:label="$t('sections.commercial.placedOnMarket')"
:value="propsData.placedOnMarket"
/>
</v-col>
Expand Down
42 changes: 22 additions & 20 deletions src/components/passport/sections/Handling.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Field
:icon="callIconFinder('producer')"
:value="attr.id"
label="Producer Id"
:label="$t('sections.handling.producerId')"
/>
</template>
<template
Expand All @@ -44,76 +44,78 @@
<Field
:icon="callIconFinder('part')"
:value="attr.name"
label="Part name"
:label="$t('sections.handling.partName')"
/>
<Field
:icon="callIconFinder('part')"
:value="attr.gtin"
label="Part gtin"
:label="$t('sections.handling.partGtin')"
/>
</template>
</v-col>
</template>
<template v-if="propsData.substanceOfConcern">
<v-col sm="12" md="4" class="pa-0 ma-0">
<!-- eslint-disable-next-line vue/no-v-for-template-key -->
<template
v-for="attr in propsData.substanceOfConcern.left"
:key="attr"
>
<!-- eslint-disable-next-line vue/no-v-for-template-key -->
<template
v-for="attr in propsData.substanceOfConcern.left"
:key="attr"
>
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('substanceOfConcern')"
:value="attr.name.name"
label="Substance of concern"
:label="$t('sections.handling.substanceOfConcern')"
/>
<Field
:icon="callIconFinder('type')"
:value="attr.name.type"
label="Type"
:label="$t('sections.handling.type')"
/>
<Field
:icon="callIconFinder('location')"
:value="attr.location"
label="location"
:label="$t('sections.handling.location')"
/>
<Field
:icon="callIconFinder('unit')"
:value="callUnitRemover(attr.unit)"
label="Unit"
:label="$t('sections.handling.unit')"
/>
</v-col>
<v-col sm="12" md="4" class="pa-0 ma-0">
<!-- eslint-disable-next-line vue/no-v-for-template-key -->
<template v-for="attr in attr.concentration.left" :key="attr">
<Field
:icon="callIconFinder('unit')"
:value="attr.max"
label="Concentration max"
:label="$t('sections.handling.concentrationMax')"
/>
<Field
:icon="callIconFinder('unit')"
:value="attr.min"
label="Concentration min"
:label="$t('sections.handling.concentrationMin')"
/>
</template>
<Field
:icon="callIconFinder('exemption')"
:value="attr.exemption"
label="Exemption"
:label="$t('sections.handling.exemption')"
/>
<!-- eslint-disable-next-line vue/no-v-for-template-key -->
<template v-for="attr in attr.id" :key="attr">
<Field
:icon="callIconFinder('type')"
:value="attr.type"
label="Id type"
:label="$t('sections.handling.idType')"
/>
<Field
:icon="callIconFinder('type')"
:value="attr.id"
label="Id"
:label="$t('sections.handling.id')"
/>
</template>
</template>
</v-col>
</v-col>
</template>
</template>
</v-row>
</v-container>
Expand Down
4 changes: 2 additions & 2 deletions src/components/passport/sections/Identification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<Field
:icon="callIconFinder('additionalCode')"
:value="propsData.manufacturerId"
label="Manufacturer ID"
:label="$t('sections.identification.manufacturerId')"
/>
</template>
<template v-for="attr in propsData.localIdentifiers" :key="attr">
Expand All @@ -49,7 +49,7 @@
<Field
:icon="callIconFinder('additionalCode')"
:value="propsData.dataMatrixCode"
label="Data matrix code"
:label="$t('sections.identification.dataMatrixCode')"
/>
</template>
</v-col>
Expand Down
14 changes: 7 additions & 7 deletions src/components/passport/sections/Metadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,43 @@
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('predecessor')"
label="Predecessor"
:label="$t('sections.metadata.predecessor')"
:value="propsData.predecessor"
/>
<Field
:icon="callIconFinder('issueDate')"
label="Issue date"
:label="$t('sections.metadata.issueDate')"
:value="propsData.issueDate"
/>
<Field
:icon="callIconFinder('version')"
label="Version"
:label="$t('sections.metadata.version')"
:value="propsData.version"
/>
</v-col>
<template v-if="propsData.economicOperator">
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('legitimization')"
label="Legitimization"
:label="$t('sections.metadata.legitimization')"
:value="propsData.economicOperator.legitimization"
/>
<Field
:icon="callIconFinder('identification')"
label="Identification"
:label="$t('sections.metadata.identification')"
:value="propsData.economicOperator.identification"
/>
</v-col>
</template>
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('status')"
label="Status"
:label="$t('sections.metadata.status')"
:value="propsData.status"
/>
<Field
:icon="callIconFinder('expirationDate')"
label="Expiration date"
:label="$t('sections.metadata.expirationDate')"
:value="propsData.expirationDate"
/>
</v-col>
Expand Down
8 changes: 4 additions & 4 deletions src/components/passport/sections/Operation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<v-col sm="12" md="4" class="pa-0 ma-0">
<Field
:icon="callIconFinder('importer')"
label="Importer Id"
:label="$t('sections.operation.importer')"
:value="propsData.importer.left.id"
/>
</v-col>
Expand All @@ -37,17 +37,17 @@
<template v-if="propsData.manufacturer">
<Field
:icon="callIconFinder('manufacturer')"
label="Manufacturer Id"
:label="$t('sections.operation.manufacturerId')"
:value="propsData.manufacturer.manufacturer"
/>
<Field
:icon="callIconFinder('facility')"
label="Facility Id"
:label="$t('sections.operation.facilityId')"
:value="propsData.manufacturer.facility"
/>
<Field
:icon="callIconFinder('manufacturingDate')"
label="Manufacturing date"
:label="$t('sections.operation.manufacturingDate')"
:value="propsData.manufacturer.manufacturingDate"
/>
</template>
Expand Down
Loading

0 comments on commit f6a1f01

Please sign in to comment.