Skip to content

Commit

Permalink
Merge pull request #66 from Comcast/testnet
Browse files Browse the repository at this point in the history
fix: correct product ID range format and display in datatable
  • Loading branch information
ankur325 authored Jan 24, 2025
2 parents b6f7576 + 168d496 commit 4eddce4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 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.14.2",
"version": "1.14.3",
"description": "A Vuejs based application for managing CSA Distributed Compliance Ledger",
"author": "Comcast Inc.",
"private": true,
Expand Down
14 changes: 14 additions & 0 deletions src/views/Accounts/Accounts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ export default {
</template>
</Column> -->
<Column field="vendorIDHex" header="Vendor ID" :sortable="true"></Column>
<Column field="productIDs" header="Product IDs">
<template #body="{ data }">
<span style="white-space: pre-line">
{{ data.productIDs?.map(range => `${range.min}-${range.max}`).join('\n') }}
</span>
</template>
</Column>
<Column field="approvals" header="Approvals">
<template #body="row">
<ol>
Expand Down Expand Up @@ -237,6 +244,13 @@ export default {
</Column>
<Column field="account.base_account.address" header="Address"></Column>
<Column field="account.vendorIDHex" header="Vendor ID"></Column>
<Column field="productIDs" header="Product IDs">
<template #body="{ data }">
<span style="white-space: pre-line">
{{ data.productIDs?.map(range => `${range.min}-${range.max}`).join('\n') }}
</span>
</template>
</Column>
<Column field="account.approvals" header="Approvals">
<template #body="row">
<ol>
Expand Down
5 changes: 4 additions & 1 deletion src/views/Accounts/ProposeNewAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ export default {
value: {
signer: creatorAddress,
vendorID: this.vendorID,
productIDS: this.productIDs,
productIDs: this.productIDs ? this.productIDs.split(',').map(range => {
const [min, max] = range.trim().split('-').map(Number);
return { min, max };
}) : [],
address: this.address,
pubKey: encodedBasePubkey,
roles: this.selectedRoles,
Expand Down

0 comments on commit 4eddce4

Please sign in to comment.