forked from eclipse-tractusx/digital-product-pass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from catenax-ng/release/v2.1.0-dpp-2.0.0
[ 3° ] - Release/v2.1.0 dpp 2.0.0: Added new version of DPP 2.0.0
- Loading branch information
Showing
17 changed files
with
1,644 additions
and
976 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Catena-X - Product Passport Consumer Frontend | ||
* | ||
* Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the | ||
* License for the specific language govern in permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
.additional-data { | ||
.column { | ||
border: 2px solid #f4fbfd; | ||
border-radius: 10px; | ||
padding: 7px 7px 10px 7px !important; | ||
margin: 6px !important; | ||
} | ||
.container-label { | ||
padding: 10px 0; | ||
max-height: 60%; | ||
cursor: pointer; | ||
font-weight: 800; | ||
color: $catena-x-blue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<!-- | ||
Catena-X - Product Passport Consumer Frontend | ||
|
||
Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA | ||
|
||
See the NOTICE file(s) distributed with this work for additional | ||
information regarding copyright ownership. | ||
|
||
This program and the accompanying materials are made available under the | ||
terms of the Apache License, Version 2.0 which is available at | ||
https://www.apache.org/licenses/LICENSE-2.0. | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
either express or implied. See the | ||
License for the specific language govern in permissions and limitations | ||
under the License. | ||
|
||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
|
||
<template> | ||
<div class="additional-data"> | ||
<!-- eslint-disable-next-line vue/no-v-for-template-key --> | ||
<template v-for="attribute in jsonData.children" :key="attribute"> | ||
<template v-if="attribute.type.dataType !== 'object'"> | ||
<DialogComponent class="field-dialog"> | ||
<Field | ||
info | ||
:icon="callIconFinder(attribute.label)" | ||
:label="attribute.label" | ||
:value="processValue(attribute)" | ||
:unit="attribute.type.typeUnit ? attribute.type.typeUnit : ''" | ||
/> | ||
<template v-slot:text> | ||
{{ attribute.description }} | ||
</template> | ||
</DialogComponent> | ||
</template> | ||
<template v-else> | ||
<DialogComponent class="field-dialog"> | ||
<div class="column"> | ||
<div class="container-label">{{ attribute.label }}</div> | ||
</div> | ||
<template v-slot:text> | ||
{{ attribute.description }} | ||
</template> | ||
</DialogComponent> | ||
<template v-if="attribute.children"> | ||
<recursive-additional-data :jsonData="attribute" /> | ||
</template> | ||
</template> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import passportUtil from "@/utils/passportUtil.js"; | ||
import Field from "../passport/Field.vue"; | ||
import DialogComponent from "../general/Dialog.vue"; | ||
export default { | ||
name: "RecursiveAdditionalData", | ||
components: { | ||
Field, | ||
DialogComponent, | ||
}, | ||
props: { | ||
jsonData: { | ||
type: [Object, Array], | ||
}, | ||
}, | ||
|
||
methods: { | ||
callIconFinder(unit) { | ||
return passportUtil.iconFinder(unit); | ||
}, | ||
processValue(attribute) { | ||
if (attribute.type.dataType == "array" && Array.isArray(attribute.data)) { | ||
return attribute.data.join(", "); | ||
} else { | ||
return attribute.data; | ||
} | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.