Skip to content

fix: correct product ID range format and display in datatable #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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