From d024db2258f5d42845c9fd40c506ac1e88205469 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 21 Mar 2025 07:03:31 +0000 Subject: [PATCH] feature: move amount and wire it up --- src/components/ActivityListItem.vue | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/components/ActivityListItem.vue b/src/components/ActivityListItem.vue index 254795ec5..ae79e359c 100644 --- a/src/components/ActivityListItem.vue +++ b/src/components/ActivityListItem.vue @@ -110,7 +110,7 @@ class="absolute inset-x-28 sm:inset-x-40 mx-2 top-1/2 -translate-y-1/2" >
- 88 hours + {{ fetchAmount }}
@@ -228,19 +228,14 @@ export default class ActivityListItem extends Vue { @Prop() activeDid!: string; @Prop() confirmerIdList?: string[]; - private formatAmount(claim: unknown): string { + get fetchAmount(): string { + const claim = (this.record.fullClaim as unknown).claim || this.record.fullClaim; + const amount = claim.object?.amountOfThisGood ? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood) : ""; - if (!claim.description && !amount) { - return "something not described"; - } - - if (!amount) return claim.description; - if (!claim.description) return amount; - - return `${claim.description} (and ${amount})`; + return amount; } private formatParticipantInfo(): string { @@ -293,9 +288,12 @@ export default class ActivityListItem extends Vue { get description(): string { const claim = (this.record.fullClaim as unknown).claim || this.record.fullClaim; - const amount = this.formatAmount(claim); + + if (!claim.description) { + return "something not described"; + } - return `${amount}`; + return `${claim.description}`; } get subDescription(): string {