forked from jsnbuchanan/crowd-funder-for-time-pwa
feature: move amount and wire it up
This commit is contained in:
@@ -110,7 +110,7 @@
|
|||||||
class="absolute inset-x-28 sm:inset-x-40 mx-2 top-1/2 -translate-y-1/2"
|
class="absolute inset-x-28 sm:inset-x-40 mx-2 top-1/2 -translate-y-1/2"
|
||||||
>
|
>
|
||||||
<div class="text-sm text-center leading-none font-semibold">
|
<div class="text-sm text-center leading-none font-semibold">
|
||||||
88 hours
|
{{ fetchAmount }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@@ -228,19 +228,14 @@ export default class ActivityListItem extends Vue {
|
|||||||
@Prop() activeDid!: string;
|
@Prop() activeDid!: string;
|
||||||
@Prop() confirmerIdList?: 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
|
const amount = claim.object?.amountOfThisGood
|
||||||
? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood)
|
? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood)
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
if (!claim.description && !amount) {
|
return amount;
|
||||||
return "something not described";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!amount) return claim.description;
|
|
||||||
if (!claim.description) return amount;
|
|
||||||
|
|
||||||
return `${claim.description} (and ${amount})`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private formatParticipantInfo(): string {
|
private formatParticipantInfo(): string {
|
||||||
@@ -293,9 +288,12 @@ export default class ActivityListItem extends Vue {
|
|||||||
get description(): string {
|
get description(): string {
|
||||||
const claim =
|
const claim =
|
||||||
(this.record.fullClaim as unknown).claim || this.record.fullClaim;
|
(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 {
|
get subDescription(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user