From 92c7b6c3d841731b432a96bb5387a62dd2bd83cf Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Mon, 12 Feb 2024 13:48:01 +0100 Subject: [PATCH 1/9] chore: updated the test data --- .../testing/testdata/testdata-payload.json | 956 +++++++++++++++++- deployment/local/testing/upload-testdata.sh | 6 +- 2 files changed, 935 insertions(+), 27 deletions(-) diff --git a/deployment/local/testing/testdata/testdata-payload.json b/deployment/local/testing/testdata/testdata-payload.json index dc5a7f449..fde486815 100644 --- a/deployment/local/testing/testdata/testdata-payload.json +++ b/deployment/local/testing/testdata/testdata-payload.json @@ -42,12 +42,12 @@ { "name": "partInstanceId", "value": "IMR18650V1", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "Battery", @@ -354,12 +354,12 @@ { "name": "partInstanceId", "value": "NCR186850B", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "Battery", @@ -666,12 +666,12 @@ { "name": "partInstanceId", "value": "X123456789012X12345678901234566", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "Battery", @@ -978,12 +978,12 @@ { "name": "partInstanceId", "value": "Y792927456954B81677903848654570", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "Battery", @@ -1394,12 +1394,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "partInstanceId", "value": "BAT-XYZ789", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "Battery", @@ -1421,7 +1421,7 @@ "quantityNumber": 5.0, "measurementUnit": "piece" }, - "businessPartner": "BPNL00000000CBA5", + "businessPartner": "BPNL00000007RVTB", "createdOn": "2023-01-09T17:26:54.709Z", "lastModifiedOn": "2023-01-09T17:26:54.709Z" } @@ -1586,12 +1586,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "partInstanceId", "value": "EVMODULE-TRJ712", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "BatteryModule", @@ -1613,7 +1613,7 @@ "quantityNumber": 100.0, "measurementUnit": "piece" }, - "businessPartner": "BPNL00000000CBA5", + "businessPartner": "BPNL00000007RVTB", "createdOn": "2023-01-09T17:26:54.709Z", "lastModifiedOn": "2023-01-09T17:26:54.709Z" } @@ -1787,12 +1787,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] }, { "name": "partInstanceId", "value": "CTA-13123", - "allowedBpns": ["BPNL00000000CBA5", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] } ], "type": "BatteryCell", @@ -1977,12 +1977,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "KLZ-90-8564-96", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] } ], "type": "SecondaryMaterialContent", @@ -2212,12 +2212,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "SNJ-4654-76", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] } ], "type": "Transmission", @@ -2372,12 +2372,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "ABC123", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] } ], "type": "physicalDimensions", @@ -2411,12 +2411,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "SN12345678", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] } ], "type": "Transmission", @@ -2719,6 +2719,914 @@ "semanticId": "urn:samm:io.catenax.generic.digital_product_passport:2.0.0#DigitalProductPassport" } ] + }, + { + "catenaXId": "urn:uuid:e5ab3398-bde1-4ef2-bb70-fd6dd1138e58", + "specificAssetIds": [ + { + "name": "manufacturerPartId", + "value": "MFG024", + "allowedBpns": ["BPNL00000007RVTB"] + }, + { + "name": "partInstanceId", + "value": "PRT-30001", + "allowedBpns": ["BPNL00000007RVTB"] + } + ], + "type": "Transmission", + "description": [ + { + "language": "en", + "text": "Transmission Digital Twin" + } + ], + "submodels": [ + { + "name": "singleLevelBomAsBuilt", + "data": { + "catenaXId": "urn:uuid:e5ab3398-bde1-4ef2-bb70-fd6dd1138e58", + "childItems": [ + { + "catenaXId": "urn:uuid:2f4da2d6-c49e-46b1-a60f-da8a2afbb448", + "quantity": { + "quantityNumber": 5.0, + "measurementUnit": "piece" + }, + "businessPartner": "BPNL00000007RVTB", + "createdOn": "2023-01-09T17:26:54.709Z", + "lastModifiedOn": "2023-01-09T17:26:54.709Z" + } + ] + }, + "description": "Single level Bom As Built Submodel", + "semanticId": "urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt" + }, + { + "name": "SerialPart", + "data": { + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "MFG024", + "nameAtManufacturer": "PRT-30001" + }, + "validityPeriod": { + "validFrom": "2026-10-06T14:50:23.230+01:00", + "validTo": "2026-08-06T14:50:23.230+01:00" + }, + "catenaXId": "urn:uuid:4a47a4e3-f39e-4c0d-85bf-c5f32094e601" + }, + "description": "Transmission pass SerialPart Submodel", + "semanticId": "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart" + }, + { + "name": "digitalProductPass", + "data": { + "typology": { + "shortName": "8HP60", + "class": { + "definition": "Manual transmission (motor vehicle)", + "code": "44-09-02-02" + }, + "longName": "Product Description long text" + }, + "metadata": { + "predecessor": "null", + "issueDate": "2000-01-01", + "version": "1.0.0", + "economicOperator": { + "legitimization": "DE123456789", + "identification": "BPNL1234567890ZZ" + }, + "status": "draft", + "expirationDate": "2000-01-01" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 20.5, + "unit": "unit:kilogram" + }, + "weightOrVolume": { + "left": { + "value": 20.5, + "unit": "unit:cubicMetre" + } + }, + "diameter": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "grossVolume": { + "value": 20.5, + "unit": "unit:cubicMetre" + }, + "width": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "length": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "height": { + "value": 20.5, + "unit": "unit:millimetre" + } + }, + "lifespan": [ + { + "value": 36, + "unit": "unit:day", + "key": "guaranteed lifetime" + } + ], + "physicalState": "solid" + }, + "commercial": { + "placedOnMarket": "2000-01-01" + }, + "identification": { + "localIdentifier": { + "value": "PRT-30001", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8703 24 10 00", + "key": "TARIC" + }, + { + "value": "MFG024", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "upper-left side" + } + }, + "sources": [ + { + "header": "Sustainability Document Material XY", + "category": "Product Specifications", + "type": "URL", + "content": "www.alink.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL1234567890ZZ" + } + ], + "part": [ + { + "name": "Aluminum Housing", + "gtin": "12345678" + } + ] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "location": "Housing", + "unit": "unit:partPerMillion", + "concentration": { + "left": [ + { + "max": 2.6, + "min": 2.1 + } + ] + }, + "exemption": "shall not apply to product x containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ] + } + ] + } + }, + "additionalData": [ + { + "description": "This is the machine parameters that are produced when the machine is used", + "label": "Specific Manufacturer Machine Parameters", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "The usage of the eletricity in the machine", + "label": "Eletricity Usage", + "type": { + "typeUnit": "unit:volts", + "dataType": "integer" + }, + "data": "25" + }, + { + "description": "The name of the machine that produced the product", + "label": "Machine Name", + "type": { + "typeUnit": null, + "dataType": "string" + }, + "data": "Laser Machine MX-421W" + }, + { + "description": "The list of products the machine can produce", + "label": "Product Names", + "type": { + "typeUnit": null, + "dataType": "array" + }, + "data": ["Tranmissions", "Batteries", "Seats", "Doors"] + } + ] + }, + { + "description": "This are the properties of interest", + "label": "Properties of Interest", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "This are the main properties of interest", + "label": "Main Properties", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "This is the Normal temperature of production", + "label": "Normal Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": 62.7 + }, + { + "description": "This is the minimmum temperature of production", + "label": "Minimum Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": -80.68 + }, + { + "description": "This is the maximum temperature of production", + "label": "Maximum Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": 800.85 + } + ] + } + ] + } + ], + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + } + ], + "carbon2": { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + }, + "environmental": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 72.678 + } + ] + }, + "state": "first life", + "material": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "unit": "unit:partPerMillion", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ], + "value": 5, + "renewable": true + } + ] + }, + "critical": { + "left": ["eOMtThyhVNLWUZNRcBaQKxI"] + } + }, + "operation": { + "importer": { + "left": { + "eori": "GB123456789000", + "id": "BPNL1234567890ZZ" + } + }, + "manufacturer": { + "facility": "BPNS1234567890ZZ", + "manufacturingDate": "2000-01-31", + "manufacturer": "BPNL1234567890ZZ" + } + } + }, + "description": "Digital Product Pass Submodel", + "semanticId": "urn:samm:io.catenax.generic.digital_product_passport:2.0.0#DigitalProductPassport" + } + ] + }, + { + "catenaXId": "urn:uuid:2f4da2d6-c49e-46b1-a60f-da8a2afbb448", + "specificAssetIds": [ + { + "name": "partInstanceId", + "value": "GR08-T789", + "allowedBpns": ["BPNL00000007RVTB"] + }, + { + "name": "manufacturerPartId", + "value": "GP67890", + "allowedBpns": ["BPNL00000007RVTB"] + } + ], + "type": "Gear", + "description": [ + { + "language": "en", + "text": "Gear shell descriptor" + } + ], + "submodels": [ + { + "name": "digitalproductpass", + "data": { + "typology": { + "shortName": "Performance Gear", + "class": { + "definition": "Gear", + "code": "42-03-02-01" + }, + "longName": "High-performance gear for automotive applications" + }, + "metadata": { + "predecessor": null, + "issueDate": "2023-08-30", + "version": "2.1.6", + "economicOperator": { + "legitimization": "DE987654321000", + "identification": "BPNL1R2S3T4U5V6W" + }, + "status": "Approved", + "expirationDate": "2023-08-30" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 50.5, + "unit": "unit:kilogram" + }, + "width": { + "value": 200.0, + "unit": "unit:millimetre" + }, + "length": { + "value": 300.0, + "unit": "unit:millimetre" + }, + "height": { + "value": 150.0, + "unit": "unit:millimetre" + } + }, + "lifespan": [ + { + "value": 36, + "unit": "unit:day", + "key": "guaranteed lifetime" + } + ], + "physicalState": "solid" + }, + "commercial": { + "placedOnMarket": "2023-08-30" + }, + "identification": { + "localIdentifier": { + "value": "GR08-T789", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8483 30 10 00", + "key": "TARIC" + }, + { + "value": "GP67890", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "upper-left side" + } + }, + "sources": [ + { + "header": "Safety Datasheet for Gear Set", + "category": "Safety", + "type": "link", + "content": "www.example.com/gear_safety_datasheet.pdf" + }, + { + "header": "User Manual for Gear Set", + "category": "User Manual", + "type": "link", + "content": "www.example.com/gear_user_manual.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL1R2S3T4U5V6W" + } + ], + "part": [ + { + "name": "Aluminum Housing", + "gtin": "12345678" + } + ] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "location": "Housing", + "unit": "unit:partPerMillion", + "concentration": { + "left": [ + { + "max": 2.6, + "min": 2.1 + } + ] + }, + "exemption": "shall not apply to product x containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ] + } + ] + } + }, + "additionalData": [ + { + "description": "Machine parameters related to gear production", + "label": "Machine Parameters", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "Gear cutting speed in rotations per minute", + "label": "Cutting Speed", + "type": { + "typeUnit": "unit:rpm", + "dataType": "integer" + }, + "data": 1500 + }, + { + "description": "Machine model used for gear production", + "label": "Machine Model", + "type": { + "typeUnit": null, + "dataType": "string" + }, + "data": "GearMaster G550" + }, + { + "description": "List of gear types produced by the machine", + "label": "Gear Types", + "type": { + "typeUnit": null, + "dataType": "array" + }, + "data": ["Spur Gears", "Helical Gears", "Bevel Gears", "Worm Gears"] + } + ] + }, + { + "description": "Gear material properties", + "label": "Material Properties", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "Material hardness measured in Rockwell C scale", + "label": "Hardness", + "type": { + "typeUnit": null, + "dataType": "float" + }, + "data": 55.3 + }, + { + "description": "Material strength measured in megapascals", + "label": "Strength", + "type": { + "typeUnit": "unit:MPa", + "dataType": "float" + }, + "data": 800.5 + } + ] + } + ], + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "ISO 14067", + "unit": "kg CO2 eq", + "type": "ISO 14067", + "value": 2.5 + } + ], + "carbon2": null, + "environmental": null + }, + "state": "first life", + "material": { + "left": [ + { + "name": "Steel Alloy", + "unit": "unit:partPerMillion", + "recycled": false, + "renewable": false, + "percentage": 95.0 + }, + { + "name": "Aluminum Alloy", + "unit": "unit:partPerMillion", + "recycled": false, + "renewable": false, + "percentage": 46.0 + } + ] + }, + "critical": { + "left": ["Steel"] + } + }, + "operation": { + "importer": { + "left": { + "eori": "DE987654321000", + "id": "BPNL1R2S3T4U5V6W" + } + }, + "manufacturer": { + "facility": "BPNS4B5C6D7E8F9G", + "manufacturingDate": "2023-08-30T14:30:00", + "manufacturer": "BPNL1R2S3T4U5V6W" + } + } + }, + "description": "DPP Submodel", + "semanticId": "urn:samm:io.catenax.generic.digital_product_passport:2.0.0#DigitalProductPassport" + }, + { + "name": "singleLevelBomAsBuilt", + "data": { + "catenaXId": "urn:uuid:a8a638ae-1c9c-49ba-90ce-eb127383d206", + "childItems": [] + }, + "description": "single level Bom As Built Submodel", + "semanticId": "urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt" + }, + { + "name": "SerialPart", + "data": { + "partTypeInformation": { + "classification": "component", + "manufacturerPartId": "GP67890", + "nameAtManufacturer": "BPNL00000007RVTB" + }, + "validityPeriod": { + "validFrom": "2023-10-06T14:50:23.230+01:00", + "validTo": "2024-08-06T14:50:23.230+01:00" + }, + "catenaXId": "urn:uuid:2f4da2d6-c49e-46b1-a60f-da8a2afbb448" + }, + "description": "SerialPart Submodel", + "semanticId": "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart" + } + ] + }, + { + "catenaXId": "urn:uuid:4f77c7b3-65bd-402a-b1ce-1edc0e49d302", + "specificAssetIds": [ + { + "name": "manufacturerPartId", + "value": "MAT7814", + "allowedBpns": ["BPNL00000007RVTB"] + }, + { + "name": "partInstanceId", + "value": "NCM-6789", + "allowedBpns": ["BPNL00000007RVTB"] + } + ], + "type": "Material", + "description": [ + { + "language": "en", + "text": "NCM Digital Twin" + } + ], + "submodels": [ + { + "name": "digitalProductPass", + "data": { + "typology": { + "shortName": "NCM", + "class": { + "definition": "Material", + "code": "42-542-542" + }, + "longName": "Nickel-Cobalt-Manganese Cathode Material" + }, + "metadata": { + "predecessor": null, + "issueDate": "2024-01-23", + "version": "1.0.0", + "economicOperator": { + "legitimization": "DE123456789", + "identification": "BPNL1234567890ZZ" + }, + "status": "Approved", + "expirationDate": "2025-01-23" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 33.7, + "unit": "unit:kilogram" + }, + "grossVolume": { + "value": 6.74, + "unit": "unit:liter" + } + }, + "lifespan": [ + { + "value": 10, + "unit": "unit:year", + "key": "guaranteed lifetime" + } + ], + "physicalState": "liquid" + }, + "commercial": { + "placedOnMarket": "1945-02-12" + }, + "identification": { + "localIdentifier": { + "value": "NCM-6789", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8703 24 10 00", + "key": "TARIC" + }, + { + "value": "MAT7814", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "safety instruction in top right corner" + } + }, + "sources": [ + { + "header": "Sustainability Document for Materials", + "category": "Product Specifications", + "type": "URL", + "content": "www.examplelink.pdf" + }, + { + "header": "Sustainability Document for Nickel-Cobalt-Manganese", + "category": "Product Specifications", + "type": "URL", + "content": "www.alink.pdf" + }, + { + "header": "Safety Intructions for Nickel-Cobalt-Manganese", + "category": "Safety", + "type": "URL", + "content": "www.alink.pdf" + }, + { + "header": "Reclycling Guide for Cathode Materials", + "category": "Reclycling Instructions", + "type": "URL", + "content": "www.alink.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL00000007RVTB" + } + ], + "part": [] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "Nickel", + "type": "Ni-TYPE-7890" + }, + "location": "Material", + "unit": "unit:kilogram", + "concentration": { + "left": [ + { + "max": 1.5, + "min": 2.0 + } + ] + }, + "exemption": "Shall not apply to battery packs containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "7440-02-0" + } + ] + } + ] + } + }, + "additionalData": [], + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 5.421 + } + ], + "environmental": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + } + ] + }, + "state": "second life", + "material": { + "left": [ + { + "name": { + "name": "Nickel", + "type": "Ni" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7440-02-0" + } + ], + "value": 60, + "renewable": true + }, + { + "name": { + "name": "Cobalt", + "type": "Co" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7440-48-4" + } + ], + "value": 15, + "renewable": true + }, + { + "name": { + "name": "Cobalt", + "type": "Co" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7439-96-5" + } + ], + "value": 12, + "renewable": true + } + ] + }, + "critical": { + "left": ["Ni", "Co", "Mn"] + } + }, + "operation": { + "importer": { + "left": { + "eori": "GB123456789000", + "id": "BPNL12345566212" + } + }, + "manufacturer": { + "facility": "BPNS120120015AS", + "manufacturingDate": "2023-12-25", + "manufacturer": "BPNL000000000000" + } + } + }, + "description": "Digital Product Pass Submodel", + "semanticId": "urn:samm:io.catenax.generic.digital_product_passport:2.0.0#DigitalProductPassport" + } + ] } ] } diff --git a/deployment/local/testing/upload-testdata.sh b/deployment/local/testing/upload-testdata.sh index 6b5594c9c..c41a89291 100644 --- a/deployment/local/testing/upload-testdata.sh +++ b/deployment/local/testing/upload-testdata.sh @@ -22,8 +22,8 @@ # SPDX-License-Identifier: Apache-2.0 ################################################################################# -./transform-and-upload.sh -s https://materialpass.dev.demo.catena-x.net/provider_backend \ - -e https://materialpass.dev.demo.catena-x.net/BPNL000000000000 \ - -a https://materialpass.dev.demo.catena-x.net/semantics/registry/api/v3.0 \ +./transform-and-upload.sh -s https://materialpass.int.demo.catena-x.net/provider_backend \ + -e https://materialpass.int.demo.catena-x.net/BPNL000000000000 \ + -a https://materialpass.int.demo.catena-x.net/semantics/registry/api/v3.0 \ -k \ -f ./testdata/testdata-payload.json From 6fdb772c6eb2ace1497dd0d60b6d910d200961a7 Mon Sep 17 00:00:00 2001 From: david zynda Date: Thu, 15 Feb 2024 13:26:50 +0100 Subject: [PATCH 2/9] WiP: units update --- src/assets/MOCK/SNJ-4654-76.json | 131 +++++ src/assets/MOCK/digitalProductPass-2.0.0.json | 456 ++++++++++++++++++ src/assets/MOCK/dpp-materialPass-2.0.0.json | 384 +++++++++++++++ .../gearDigitalProductPass-v2-refined.json | 252 ++++++++++ src/components/passport/Field.vue | 6 +- .../passport/sections/Characteristics.vue | 72 ++- src/translations/de.json | 10 +- src/translations/en.json | 18 +- 8 files changed, 1302 insertions(+), 27 deletions(-) create mode 100644 src/assets/MOCK/SNJ-4654-76.json create mode 100644 src/assets/MOCK/digitalProductPass-2.0.0.json create mode 100644 src/assets/MOCK/dpp-materialPass-2.0.0.json create mode 100644 src/assets/MOCK/gearDigitalProductPass-v2-refined.json diff --git a/src/assets/MOCK/SNJ-4654-76.json b/src/assets/MOCK/SNJ-4654-76.json new file mode 100644 index 000000000..a67afccc7 --- /dev/null +++ b/src/assets/MOCK/SNJ-4654-76.json @@ -0,0 +1,131 @@ +{ + "productSpecificParameters": { + "torqueConverter": ["ABC1234567890", "XYZ9876543210"], + "driveType": "Combustion Engine", + "oilType": "ZF Lifeguard Hybrid 2", + "spreading": 6.79, + "torque": 500.0, + "power": 300.0, + "standardGearRatio": { + "gear": "1", + "ratio": 4.1567 + }, + "oilCapacity": 8.9, + "electricPerformance": ["Electric Performance Specification A", "Electric Performance Specification B"], + "speedResistance": { + "speed": 7800, + "gear": "1" + } + }, + "instructions": { + "packagingInstructions": [ + { + "documentTitle": "Packaging Instructions", + "documentLink": "https://www.example.com/packaging-instructions.pdf" + } + ], + "transportationInstructions": [ + { + "documentTitle": "Transportation Instructions", + "documentLink": "https://www.example.com/transportation-instructions.pdf" + } + ], + "dismantlingProcedure": [ + { + "documentTitle": "Dismantling Procedure", + "documentLink": "https://www.example.com/dismantling-procedure.pdf" + } + ], + "safetyMeasures": [ + { + "documentTitle": "Safety Measures", + "documentLink": "https://www.example.com/safety-measures.pdf" + } + ], + "vehicleDismantlingProcedure": [ + { + "documentTitle": "Vehicle Dismantling Procedure", + "documentLink": "https://www.example.com/vehicle-dismantling-procedure.pdf" + } + ] + }, + "identification": { + "manufacturerId": "XYZ78901", + "localIdentifiers": [ + { + "value": "SNJ-4654-76", + "key": "PartInstanceID" + } + ], + "dataMatrixCode": "ABCDEF1234567890" + }, + "sparePartSupplier": [ + { + "supplierContact": { + "faxNumber": "+49 89 0987654321", + "website": "https://www.example-supplier.com", + "phoneNumber": "+49 89 1234567890", + "email": "supplier@example.com" + }, + "supplierId": "BPNL1234567890ZZ", + "sparePartName": "Torque Converter" + } + ], + "stateOfHealth": { + "serviceHistory": ["2023-05-22T13:16:47.239+02:00"], + "expectedLifespan": 500000, + "remanufacturing": { + "remanufacturingDate": "2023-05-22T13:16:47.239+02:00", + "productStatusValue": "First Life" + } + }, + "generalInformation": { + "additionalInformation": "This is a test product with realistic data.", + "physicalDimensionsProperty": { + "width": 1000.0, + "length": 20000.1, + "weight": 100.7, + "diameter": 0.03, + "height": 0.1 + }, + "warrantyPeriod": 60.0, + "productDescription": "Manual Transmission", + "productType": "8HP60MH" + }, + "sustainability": { + "substancesOfConcern": ["Substance A", "Substance B"], + "responsibleSourcingDocument": [ + { + "documentTitle": "Responsible Sourcing Document", + "documentLink": "https://www.example.com/responsible-sourcing.pdf" + } + ], + "recyclateContent": { + "nickel": 0.05, + "lithium": 0.01, + "cobalt": 0.02, + "otherSubstance": [ + { + "substancePercentage": 0.1, + "substanceName": "Lead" + } + ] + }, + "criticalRawMaterials": ["Material X", "Material Y"], + "carbonFootprint": { + "crossSectoralStandardsUsed": [ + { + "crossSectoralStandard": "GHG Protocol Product Standard" + } + ], + "co2FootprintTotal": 200.0, + "productOrSectorSpecificRules": [ + { + "operator": "PEF", + "ruleNames": "ABC 2021", + "otherOperatorName": "NSF" + } + ] + } + } + } \ No newline at end of file diff --git a/src/assets/MOCK/digitalProductPass-2.0.0.json b/src/assets/MOCK/digitalProductPass-2.0.0.json new file mode 100644 index 000000000..11b895012 --- /dev/null +++ b/src/assets/MOCK/digitalProductPass-2.0.0.json @@ -0,0 +1,456 @@ +{ + "metadata": { + "contract": { + "@id": "9b3c0977-6b14-4201-bd76-55f681a92872", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:dc616f20-2781-450a-837a-290d861c8e0a", + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpProxy" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + } + ], + "edc:description": "Battery Passport test data", + "edc:id": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + }, + "negotiation": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "NegotiationInitiateRequestDto", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "protocol": "dataspace-protocol-http", + "connectorId": "BPNL00000000CBA5", + "offer": { + "offerId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:dc616f20-2781-450a-837a-290d861c8e0a", + "assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + } + } + }, + "response": { + "@id": "b8a41089-1eac-462a-b8e8-e40f724b302f", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393629505, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "b8a41089-1eac-462a-b8e8-e40f724b302f", + "@type": "edc:ContractNegotiationDto", + "edc:type": "CONSUMER", + "edc:protocol": "dataspace-protocol-http", + "edc:state": "FINALIZED", + "edc:counterPartyAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "edc:callbackAddresses": [], + "edc:contractAgreementId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + }, + "transfer": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "contractId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390", + "dataDestination": { + "properties": { + "type": "HttpProxy" + } + }, + "managedResources": false, + "privateProperties": { + "receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/bb8d235e-96c1-4fa3-a9ea-2ec71255ed18" + }, + "protocol": "dataspace-protocol-http", + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } + }, + "response": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393631831, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:TransferProcessDto", + "edc:state": "COMPLETED", + "edc:stateTimestamp": 1688393633142, + "edc:type": "CONSUMER", + "edc:callbackAddresses": [], + "edc:dataDestination": { + "edc:type": "HttpProxy" + }, + "edc:dataRequest": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:DataRequestDto", + "edc:assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "edc:contractId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390" + }, + "edc:receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/bb8d235e-96c1-4fa3-a9ea-2ec71255ed18", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + } + }, + "semanticId": "general", + "aspect": { + "typology": { + "shortName": "8HP60", + "class": { + "definition": "Manual transmission (motor vehicle)", + "code": "44-09-02-02" + }, + "longName": "Product Description long text" + }, + "metadata": { + "predecessor": "null", + "issueDate": "2000-01-01", + "version": "1.0.0", + "economicOperator": { + "legitimization": "DE123456789", + "identification": "BPNL1234567890ZZ" + }, + "status": "draft", + "expirationDate": "2000-01-01" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 20.5, + "unit": "unit:kilogram" + }, + "weightOrVolume": { + "left": { + "value": 20.5, + "unit": "unit:cubicMetre" + } + }, + "diameter": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "grossVolume": { + "value": 20.5, + "unit": "unit:cubicMetre" + }, + "width": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "length": { + "value": 20.5, + "unit": "unit:millimetre" + }, + "height": { + "value": 20.5, + "unit": "unit:millimetre" + } + }, + "lifespan": [ + { + "value": 36, + "unit": "unit:day", + "key": "guaranteed lifetime" + } + ], + "physicalState": "solid" + }, + "commercial": { + "placedOnMarket": "2000-01-01" + }, + "identification": { + "localIdentifier": { + "value": "PRT-30001", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8703 24 10 00", + "key": "TARIC" + }, + { + "value": "MFG024", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "upper-left side" + } + }, + "sources": [ + { + "header": "Sustainability Document Material XY", + "category": "Product Specifications", + "type": "URL", + "content": "www.alink.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL1234567890ZZ" + } + ], + "part": [ + { + "name": "Aluminum Housing", + "gtin": "12345678" + } + ] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "location": "Housing", + "unit": "unit:partPerMillion", + "concentration": { + "left": [ + { + "max": 2.6, + "min": 2.1 + } + ] + }, + "exemption": "shall not apply to product x containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ] + } + ] + } + }, + "additionalData": [ + { + "description": "This is the machine parameters that are produced when the machine is used", + "label": "Specific Manufacturer Machine Parameters", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "The usage of the eletricity in the machine", + "label": "Eletricity Usage", + "type": { + "typeUnit": "unit:volts", + "dataType": "integer" + }, + "data": "25" + }, + { + "description": "The name of the machine that produced the product", + "label": "Machine Name", + "type": { + "typeUnit": null, + "dataType": "string" + }, + "data": "Laser Machine MX-421W" + }, + { + "description": "The list of products the machine can produce", + "label": "Product Names", + "type": { + "typeUnit": null, + "dataType": "array" + }, + "data": [ + "Tranmissions", + "Batteries", + "Seats", + "Doors" + ] + } + ] + }, + { + "description": "This are the properties of interest", + "label": "Properties of Interest", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "This are the main properties of interest", + "label": "Main Properties", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "This is the Normal temperature of production", + "label": "Normal Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": 62.7 + }, + { + "description": "This is the minimmum temperature of production", + "label": "Minimum Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": -80.68 + }, + { + "description": "This is the maximum temperature of production", + "label": "Maximum Temperature", + "type": { + "typeUnit": "unit:celcius", + "dataType": "float" + }, + "data": 800.85 + } + ] + } + ] + } + ], + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + } + ], + "carbon2": { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + }, + "environmental": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 72.678 + } + ] + }, + "state": "first life", + "material": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "unit": "unit:partPerMillion", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ], + "value": 5, + "renewable": true + } + ] + }, + "critical": { + "left": [ + "eOMtThyhVNLWUZNRcBaQKxI" + ] + } + }, + "operation": { + "importer": { + "left": { + "eori": "GB123456789000", + "id": "BPNL1234567890ZZ" + } + }, + "manufacturer": { + "facility": "BPNS1234567890ZZ", + "manufacturingDate": "2000-01-31", + "manufacturer": "BPNL1234567890ZZ" + } + } + } +} \ No newline at end of file diff --git a/src/assets/MOCK/dpp-materialPass-2.0.0.json b/src/assets/MOCK/dpp-materialPass-2.0.0.json new file mode 100644 index 000000000..85806b2df --- /dev/null +++ b/src/assets/MOCK/dpp-materialPass-2.0.0.json @@ -0,0 +1,384 @@ +{ + "metadata": { + "contract": { + "@id": "9b3c0977-6b14-4201-bd76-55f681a92872", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:dc616f20-2781-450a-837a-290d861c8e0a", + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpProxy" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + } + ], + "edc:description": "Battery Passport test data", + "edc:id": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + }, + "negotiation": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "NegotiationInitiateRequestDto", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "protocol": "dataspace-protocol-http", + "connectorId": "BPNL00000000CBA5", + "offer": { + "offerId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:dc616f20-2781-450a-837a-290d861c8e0a", + "assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918" + } + } + }, + "response": { + "@id": "b8a41089-1eac-462a-b8e8-e40f724b302f", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393629505, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "b8a41089-1eac-462a-b8e8-e40f724b302f", + "@type": "edc:ContractNegotiationDto", + "edc:type": "CONSUMER", + "edc:protocol": "dataspace-protocol-http", + "edc:state": "FINALIZED", + "edc:counterPartyAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "edc:callbackAddresses": [], + "edc:contractAgreementId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + }, + "transfer": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "contractId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390", + "dataDestination": { + "properties": { + "type": "HttpProxy" + } + }, + "managedResources": false, + "privateProperties": { + "receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/bb8d235e-96c1-4fa3-a9ea-2ec71255ed18" + }, + "protocol": "dataspace-protocol-http", + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } + }, + "response": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393631831, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:TransferProcessDto", + "edc:state": "COMPLETED", + "edc:stateTimestamp": 1688393633142, + "edc:type": "CONSUMER", + "edc:callbackAddresses": [], + "edc:dataDestination": { + "edc:type": "HttpProxy" + }, + "edc:dataRequest": { + "@id": "b9ab18f2-b624-4e2c-a922-c2e727467bb2", + "@type": "edc:DataRequestDto", + "edc:assetId": "365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918", + "edc:contractId": "3:365e6fbe-bb34-11ec-8422-0242ac120002-61125dc3-5e6f-4f4b-838d-447432b97918:102bae7a-22de-44b2-9ed5-ca5f62023390" + }, + "edc:receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/bb8d235e-96c1-4fa3-a9ea-2ec71255ed18", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + } + }, + "semanticId": "general", + "aspect": { + "typology": { + "shortName": "NCM", + "class": { + "definition": "Material", + "code": "42-542-542" + }, + "longName": "Nickel-Cobalt-Manganese Cathode Material" + }, + "metadata": { + "predecessor": null, + "issueDate": "2024-01-23", + "version": "1.0.0", + "economicOperator": { + "legitimization": "DE123456789", + "identification": "BPNL1234567890ZZ" + }, + "status": "Approved", + "expirationDate": "2025-01-23" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 33.7, + "unit": "unit:kilogram" + }, + "grossVolume": { + "value": 6.74, + "unit": "unit:liter" + } + }, + "lifespan": [ + { + "value": 10, + "unit": "unit:year", + "key": "guaranteed lifetime" + } + ], + "physicalState": "liquid" + }, + "commercial": { + "placedOnMarket": "1945-02-12" + }, + "identification": { + "localIdentifier": { + "value": "NCM-6789", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8703 24 10 00", + "key": "TARIC" + }, + { + "value": "MAT7814", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "safety instruction in top right corner" + } + }, + "sources": [ + { + "header": "Sustainability Document for Materials", + "category": "Product Specifications", + "type": "URL", + "content": "www.examplelink.pdf" + }, + { + "header": "Sustainability Document for Nickel-Cobalt-Manganese", + "category": "Product Specifications", + "type": "URL", + "content": "www.alink.pdf" + }, + { + "header": "Safety Intructions for Nickel-Cobalt-Manganese", + "category": "Safety", + "type": "URL", + "content": "www.alink.pdf" + }, + { + "header": "Reclycling Guide for Cathode Materials", + "category": "Reclycling Instructions", + "type": "URL", + "content": "www.alink.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL00000000CBA5" + } + ], + "part": [] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "Nickel", + "type": "Ni-TYPE-7890" + }, + "location": "Material", + "unit": "unit:kilogram", + "concentration": { + "left": [ + { + "max": 1.5, + "min": 2.0 + } + ] + }, + "exemption": "Shall not apply to battery packs containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "7440-02-0" + } + ] + } + ] + } + }, + "additionalData": [], + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 5.421 + } + ], + "environmental": [ + { + "lifecycle": "main product production", + "rulebook": "https://www.alink.pdf/", + "unit": "kg CO2 eq", + "type": "Climate Change Total", + "value": 12.678 + } + ] + }, + "state": "second life", + "material": { + "left": [ + { + "name": { + "name": "Nickel", + "type": "Ni" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7440-02-0" + } + ], + "value": 60, + "renewable": true + }, + { + "name": { + "name": "Cobalt", + "type": "Co" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7440-48-4" + } + ], + "value": 15, + "renewable": true + }, + { + "name": { + "name": "Cobalt", + "type": "Co" + }, + "unit": "unit:massPercentage", + "recycled": false, + "id": [ + { + "type": "CAS", + "id": "7439-96-5" + } + ], + "value": 12, + "renewable": true + } + ] + }, + "critical": { + "left": [ + "Ni", + "Co", + "Mn" + ] + } + }, + "operation": { + "importer": { + "left": { + "eori": "GB123456789000", + "id": "BPNL12345566212" + } + }, + "manufacturer": { + "facility": "BPNS120120015AS", + "manufacturingDate": "2023-12-25", + "manufacturer": "BPNL000000000000" + } + } + } +} diff --git a/src/assets/MOCK/gearDigitalProductPass-v2-refined.json b/src/assets/MOCK/gearDigitalProductPass-v2-refined.json new file mode 100644 index 000000000..e13777618 --- /dev/null +++ b/src/assets/MOCK/gearDigitalProductPass-v2-refined.json @@ -0,0 +1,252 @@ +{ + "typology": { + "shortName": "Performance Gear", + "class": { + "definition": "Gear", + "code": "42-03-02-01" + }, + "longName": "High-performance gear for automotive applications" + }, + "metadata": { + "predecessor": null, + "issueDate": "2023-08-30", + "version": "2.1.6", + "economicOperator": { + "legitimization": "DE987654321000", + "identification": "BPNL1R2S3T4U5V6W" + }, + "status": "Approved", + "expirationDate": "2023-08-30" + }, + "characteristics": { + "physicalDimension": { + "grossWeight": { + "value": 50.5, + "unit": "unit:kilogram" + }, + "width": { + "value": 200.0, + "unit": "unit:millimetre" + }, + "length": { + "value": 300.0, + "unit": "unit:millimetre" + }, + "height": { + "value": 150.0, + "unit": "unit:millimetre" + } + }, + "lifespan": [ + { + "value": 36, + "unit": "unit:day", + "key": "guaranteed lifetime" + } + ], + "physicalState": "solid" + }, + "commercial": { + "placedOnMarket": "2023-08-30" + }, + "identification": { + "localIdentifier": { + "value": "GR08-T789", + "key": "PartInstanceId" + }, + "additionalCode": [ + { + "value": "8483 30 10 00", + "key": "TARIC" + }, + { + "value": "GP67890", + "key": "manufacturerPartId" + } + ], + "dataCarrier": { + "carrierType": "QR", + "carrierLayout": "upper-left side" + } + }, + "sources": [ + { + "header": "Safety Datasheet for Gear Set", + "category": "Safety", + "type": "link", + "content": "www.example.com/gear_safety_datasheet.pdf" + }, + { + "header": "User Manual for Gear Set", + "category": "User Manual", + "type": "link", + "content": "www.example.com/gear_user_manual.pdf" + } + ], + "handling": { + "spareParts": { + "left": { + "producer": [ + { + "id": "BPNL1R2S3T4U5V6W" + } + ], + "part": [ + { + "name": "Aluminum Housing", + "gtin": "12345678" + } + ] + } + }, + "substanceOfConcern": { + "left": [ + { + "name": { + "name": "phenolphthalein", + "type": "IUPAC" + }, + "location": "Housing", + "unit": "unit:partPerMillion", + "concentration": { + "left": [ + { + "max": 2.6, + "min": 2.1 + } + ] + }, + "exemption": "shall not apply to product x containing not more than 1,5 ml of liquid", + "id": [ + { + "type": "CAS", + "id": "201-004-7" + } + ] + } + ] + } + }, + "additionalData": [ + { + "description": "Machine parameters related to gear production", + "label": "Machine Parameters", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "Gear cutting speed in rotations per minute", + "label": "Cutting Speed", + "type": { + "typeUnit": "unit:rpm", + "dataType": "integer" + }, + "data": 1500 + }, + { + "description": "Machine model used for gear production", + "label": "Machine Model", + "type": { + "typeUnit": null, + "dataType": "string" + }, + "data": "GearMaster G550" + }, + { + "description": "List of gear types produced by the machine", + "label": "Gear Types", + "type": { + "typeUnit": null, + "dataType": "array" + }, + "data": [ + "Spur Gears", + "Helical Gears", + "Bevel Gears", + "Worm Gears" + ] + } + ] + }, + { + "description": "Gear material properties", + "label": "Material Properties", + "type": { + "typeUnit": null, + "dataType": "object" + }, + "children": [ + { + "description": "Material hardness measured in Rockwell C scale", + "label": "Hardness", + "type": { + "typeUnit": null, + "dataType": "float" + }, + "data": 55.3 + }, + { + "description": "Material strength measured in megapascals", + "label": "Strength", + "type": { + "typeUnit": "unit:MPa", + "dataType": "float" + }, + "data": 800.5 + } + ] + } +] , + "sustainability": { + "PEF": { + "carbon": [ + { + "lifecycle": "main product production", + "rulebook": "ISO 14067", + "unit": "kg CO2 eq", + "type": "ISO 14067", + "value": 2.5 + } + ], + "carbon2": null, + "environmental": null + }, + "state": "first life", + "material": { + "left": [ + { + "name": "Steel Alloy", + "unit": "unit:partPerMillion", + "recycled": false, + "renewable": false, + "percentage": 95.0 + }, + { + "name": "Aluminum Alloy", + "unit": "unit:partPerMillion", + "recycled": false, + "renewable": false, + "percentage": 46.0 + } + ] + }, + "critical": { + "left": ["Steel"] + } + }, + "operation": { + "importer": { + "left": { + "eori": "DE987654321000", + "id": "BPNL1R2S3T4U5V6W" + } + }, + "manufacturer": { + "facility": "BPNS4B5C6D7E8F9G", + "manufacturingDate": "2023-08-30T14:30:00", + "manufacturer": "BPNL1R2S3T4U5V6W" + } + } +} \ No newline at end of file diff --git a/src/components/passport/Field.vue b/src/components/passport/Field.vue index 9c22721ae..025d8a67a 100644 --- a/src/components/passport/Field.vue +++ b/src/components/passport/Field.vue @@ -79,9 +79,9 @@ - L: {{ length }}{{ callUnitRemover(unit) }}, - H: {{ height }}{{ callUnitRemover(unit) }}, - W: {{ width }}{{ callUnitRemover(unit) }} + L: {{ length }} {{ callUnitRemover(unit) }}, + H: {{ height }} {{ callUnitRemover(unit) }}, + W: {{ width }} {{ callUnitRemover(unit) }} {{ day }}{{ month }}{{ year }} diff --git a/src/components/passport/sections/Characteristics.vue b/src/components/passport/sections/Characteristics.vue index 3178b0328..7e5783577 100644 --- a/src/components/passport/sections/Characteristics.vue +++ b/src/components/passport/sections/Characteristics.vue @@ -27,20 +27,64 @@ @@ -49,7 +54,7 @@ @@ -82,6 +87,15 @@ export default { callIconFinder(unit) { return passportUtil.iconFinder(unit); }, + processDateTime(dateTimeString) { + // Check if the string contains 'T' + if (dateTimeString.includes("T")) { + // Replace 'T' with ', time: ' and return the new string + return dateTimeString.replace("T", ", time: "); + } + // Return the original string if 'T' is not found + return dateTimeString; + }, }, }; diff --git a/src/components/passport/sections/StateOfHealth.vue b/src/components/passport/sections/StateOfHealth.vue index ce509eb45..be31d55f3 100644 --- a/src/components/passport/sections/StateOfHealth.vue +++ b/src/components/passport/sections/StateOfHealth.vue @@ -56,9 +56,7 @@ diff --git a/src/components/passport/sections/Sustainability.vue b/src/components/passport/sections/Sustainability.vue index f3555b217..5280eb654 100644 --- a/src/components/passport/sections/Sustainability.vue +++ b/src/components/passport/sections/Sustainability.vue @@ -50,22 +50,24 @@ - @@ -107,8 +110,8 @@ - + diff --git a/src/config/templates/batteryGraph.json b/src/config/templates/batteryGraph.json new file mode 100644 index 000000000..d7fab1896 --- /dev/null +++ b/src/config/templates/batteryGraph.json @@ -0,0 +1,50 @@ +{ + "title": "NCA", + "composition": [ + { + "title": "Composition of Andode", + "composition": [ + { + "label": "SiO2-C", + "value": 50, + "unit": "%" + }, + { + "label": "Styren butadien", + "value": 50, + "unit": "%" + } + ] + }, + { + "title": "Composition of Cathode", + "composition": [ + { + "label": "Lithium", + "value": 20, + "unit": "%" + }, + { + "label": "Nickel", + "value": 20, + "unit": "%" + }, + { + "label": "Cobalt", + "value": 20, + "unit": "%" + }, + { + "label": "Aluminium", + "value": 30, + "unit": "%" + }, + { + "label": "Carbon black", + "value": 10, + "unit": "%" + } + ] + } + ] +} diff --git a/src/media/BatteryCompBG.svg b/src/media/BatteryCompBG.svg new file mode 100644 index 000000000..ec59c1d6b --- /dev/null +++ b/src/media/BatteryCompBG.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/src/media/BatteryComposition.svg b/src/media/BatteryComposition.svg deleted file mode 100644 index ecd43cbe8..000000000 --- a/src/media/BatteryComposition.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From e56a65ba223c208bf48942cc727805e54f27065c Mon Sep 17 00:00:00 2001 From: david zynda Date: Wed, 28 Feb 2024 11:10:13 +0100 Subject: [PATCH 6/9] Update en.json --- src/translations/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translations/en.json b/src/translations/en.json index f9422d7e8..2b6089c25 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -54,7 +54,7 @@ "exchange": "Exchange" }, "dppComponentsNames": { - "typology": "Typeology", + "typology": "Typology", "metadata": "Metadata", "characteristics": "Characteristics", "components": "Components", From 31fa197f1183ad58f40c8861c4327ad90fa1b895 Mon Sep 17 00:00:00 2001 From: Muhammad Saud Khan Date: Wed, 13 Mar 2024 13:11:02 +0100 Subject: [PATCH 7/9] chore: fix the catenaXIds to reference child components --- .../testing/testdata/testdata-payload.json | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/deployment/local/testing/testdata/testdata-payload.json b/deployment/local/testing/testdata/testdata-payload.json index fde486815..b7c2c5284 100644 --- a/deployment/local/testing/testdata/testdata-payload.json +++ b/deployment/local/testing/testdata/testdata-payload.json @@ -42,12 +42,12 @@ { "name": "partInstanceId", "value": "IMR18650V1", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Battery", @@ -354,12 +354,12 @@ { "name": "partInstanceId", "value": "NCR186850B", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Battery", @@ -666,12 +666,12 @@ { "name": "partInstanceId", "value": "X123456789012X12345678901234566", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Battery", @@ -978,12 +978,12 @@ { "name": "partInstanceId", "value": "Y792927456954B81677903848654570", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Battery", @@ -1394,12 +1394,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "BAT-XYZ789", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Battery", @@ -1586,12 +1586,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "EVMODULE-TRJ712", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "BatteryModule", @@ -1787,12 +1787,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "CTA-13123", - "allowedBpns": ["BPNL00000007RVTB", "BPNL00000003CRHL"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "BatteryCell", @@ -1977,12 +1977,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "KLZ-90-8564-96", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "SecondaryMaterialContent", @@ -2212,12 +2212,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "SNJ-4654-76", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Transmission", @@ -2372,12 +2372,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "ABC123", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "physicalDimensions", @@ -2411,12 +2411,12 @@ { "name": "manufacturerPartId", "value": "XYZ78901", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] }, { "name": "partInstanceId", "value": "SN12345678", - "allowedBpns": ["BPNL00000003CRHL", "BPNL00000007RVTB"] + "allowedBpns": ["BPNL00000007RVTB"] } ], "type": "Transmission", @@ -2774,7 +2774,7 @@ "validFrom": "2026-10-06T14:50:23.230+01:00", "validTo": "2026-08-06T14:50:23.230+01:00" }, - "catenaXId": "urn:uuid:4a47a4e3-f39e-4c0d-85bf-c5f32094e601" + "catenaXId": "urn:uuid:e5ab3398-bde1-4ef2-bb70-fd6dd1138e58" }, "description": "Transmission pass SerialPart Submodel", "semanticId": "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart" @@ -3353,7 +3353,7 @@ { "name": "singleLevelBomAsBuilt", "data": { - "catenaXId": "urn:uuid:a8a638ae-1c9c-49ba-90ce-eb127383d206", + "catenaXId": "urn:uuid:2f4da2d6-c49e-46b1-a60f-da8a2afbb448", "childItems": [] }, "description": "single level Bom As Built Submodel", From b8f015ff984f4d69fc89acc63691601f85b18e80 Mon Sep 17 00:00:00 2001 From: david zynda Date: Thu, 14 Mar 2024 23:27:11 +0100 Subject: [PATCH 8/9] separate collection icon --- src/components/passport/BatteryCards.vue | 34 ++++++++++++++++++- .../passport/sections/GeneralInformation.vue | 6 +++- src/media/Battery00.svg | 13 +++++++ src/media/BatteryCd.svg | 15 ++++++++ src/media/BatteryHg.svg | 14 ++++++++ src/media/BatteryPb.svg | 28 +++++++++++++++ src/media/noCollection.svg | 3 ++ 7 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 src/media/Battery00.svg create mode 100644 src/media/BatteryCd.svg create mode 100644 src/media/BatteryHg.svg create mode 100644 src/media/BatteryPb.svg create mode 100644 src/media/noCollection.svg diff --git a/src/components/passport/BatteryCards.vue b/src/components/passport/BatteryCards.vue index 453c67801..3eca82688 100644 --- a/src/components/passport/BatteryCards.vue +++ b/src/components/passport/BatteryCards.vue @@ -62,6 +62,13 @@
{{ $t(card.secondLabel) }}
+
+ Separate collection +
@@ -114,6 +121,11 @@ import ElementChart from "./ElementChart.vue"; import BarChart from "./BarChart.vue"; import passportUtil from "@/utils/passportUtil.js"; import DialogComponent from "../general/Dialog.vue"; +import noCollection from "../../media/noCollection.svg"; +import Battery00 from "../../media/Battery00.svg"; +import BatteryCd from "../../media/BatteryCd.svg"; +import BatteryHg from "../../media/BatteryHg.svg"; +import BatteryPb from "../../media/BatteryPb.svg"; export default { name: "BatteryCards", @@ -125,11 +137,22 @@ export default { props: { data: { type: Object, - default: Object, + default: () => ({}), }, }, + + setup() { + return { + noCollection, + Battery00, + BatteryCd, + BatteryHg, + BatteryPb, + }; + }, data() { return { + separateCollectionImage: "BATTERY_CD", currentValue: this.$props.data.aspect.batteryCycleLife.cycleLifeTestDepthOfDischarge, maxValue: this.$props.data.aspect.batteryCycleLife.expectedLifetime, @@ -227,6 +250,15 @@ export default { }, methods: { + getImageByKey(key) { + const imageMap = { + BATTERY_00: this.Battery00, + BATTERY_CD: this.BatteryCd, + BATTERY_HG: this.BatteryHg, + BATTERY_PB: this.BatteryPb, + }; + return imageMap.hasOwnProperty(key) ? imageMap[key] : this.noCollection; + }, callIconFinder(icon) { return passportUtil.iconFinder(icon); }, diff --git a/src/components/passport/sections/GeneralInformation.vue b/src/components/passport/sections/GeneralInformation.vue index 943aa482f..d608f4711 100644 --- a/src/components/passport/sections/GeneralInformation.vue +++ b/src/components/passport/sections/GeneralInformation.vue @@ -243,7 +243,11 @@ diff --git a/src/media/Battery00.svg b/src/media/Battery00.svg new file mode 100644 index 000000000..62ae7b106 --- /dev/null +++ b/src/media/Battery00.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/media/BatteryCd.svg b/src/media/BatteryCd.svg new file mode 100644 index 000000000..50c522fbc --- /dev/null +++ b/src/media/BatteryCd.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/media/BatteryHg.svg b/src/media/BatteryHg.svg new file mode 100644 index 000000000..700dd4c46 --- /dev/null +++ b/src/media/BatteryHg.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/media/BatteryPb.svg b/src/media/BatteryPb.svg new file mode 100644 index 000000000..853de35f3 --- /dev/null +++ b/src/media/BatteryPb.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/media/noCollection.svg b/src/media/noCollection.svg new file mode 100644 index 000000000..8791a36bc --- /dev/null +++ b/src/media/noCollection.svg @@ -0,0 +1,3 @@ + + + From f84606abbbdcab7c7c717d9e99e8dfe002e48ea3 Mon Sep 17 00:00:00 2001 From: Muhammad Saud Khan Date: Mon, 25 Mar 2024 12:20:30 +0100 Subject: [PATCH 9/9] chore: updated changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e93918ab2..4ca31d1f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e ## Added - Added timeout in negotiation and transfer requests for avoiding infinite loops. When status from transfer does not changes from STARTED. +- Added DPP v2 payloads and Drill Down test data ## [released] ## [v2.1.3] - 19-02-2024