Skip to content

Commit

Permalink
Merge pull request #27 from ankur325/Issue-26-CDCertificateID-Display
Browse files Browse the repository at this point in the history
Fix DCL-UI Issue 26
  • Loading branch information
ankur325 authored Mar 2, 2023
2 parents ba4a3fb + 17b869f commit 1e82c1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dcl-ui",
"version": "1.0.9",
"version": "1.0.10",
"description": "A Vuejs based application for managing CSA Distributed Compliance Ledger",
"author": "Comcast Inc.",
"private": true,
Expand Down
24 changes: 14 additions & 10 deletions src/views/Compliance/Compliance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,20 @@ export default {
return value
},
populateModelData(complianceArray, allComplianceInfo) {
complianceArray?.forEach((certifiedModel) => {
const complianceInfo = allComplianceInfo?.find((complianceInfo) => {
return complianceInfo.vid === certifiedModel.vid && complianceInfo.pid === certifiedModel.pid;
});
if (complianceInfo) {
certifiedModel.softwareVersionString = complianceInfo.softwareVersionString;
certifiedModel.cDCertificateId = complianceInfo.cDCertificateId;
}
});
},
if (!allComplianceInfo || allComplianceInfo.length === 0) {
return;
}
for (const certifiedModel of complianceArray || []) {
const { vid, pid, softwareVersion } = certifiedModel;
const complianceInfo = allComplianceInfo.find((complianceInfo) => {
return complianceInfo.vid === vid && complianceInfo.pid === pid && complianceInfo.softwareVersion === softwareVersion;
});
if (complianceInfo) {
certifiedModel.softwareVersionString = complianceInfo.softwareVersionString;
certifiedModel.cDCertificateId = complianceInfo.cDCertificateId;
}
}
},
}
}
</script>
Expand Down

0 comments on commit 1e82c1b

Please sign in to comment.