From 7f6c93802911a030a89fe3706e18b5c17151e5bb Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Wed, 1 Nov 2023 09:09:20 -0600 Subject: [PATCH] fix display of given items; bump version to 0.1.2 --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/views/HomeView.vue | 17 +++++++++++++---- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c08a6c0..84a0b859 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.1.1] - 2023.10.31 +## [0.1.2] - 2023.11.01 ### Added - Basics: create ID, record a give, declare a project, search, and get notifications. diff --git a/package-lock.json b/package-lock.json index c03a367a..11127e68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kickstart-for-time-pwa", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "kickstart-for-time-pwa", - "version": "0.1.1", + "version": "0.1.2", "dependencies": { "@ethersproject/hdnode": "^5.7.0", "@fortawesome/fontawesome-svg-core": "^6.4.0", diff --git a/package.json b/package.json index 5fb2b6c2..5ef417d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kickstart-for-time-pwa", - "version": "0.1.1", + "version": "0.1.2", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index e00bf618..53e31752 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -428,9 +428,18 @@ export default class HomeView extends Vue { this.allMyDids, this.allContacts, ); - const gaveAmount = claim.object?.amountOfThisGood + let gaveAmount = claim.object?.amountOfThisGood ? this.displayAmount(claim.object.unitCode, claim.object.amountOfThisGood) - : claim.description || "something without description"; + : ""; + if (claim.description) { + if (gaveAmount) { + gaveAmount = gaveAmount + ", and also: "; + } + gaveAmount = gaveAmount + claim.description; + } + if (!gaveAmount) { + gaveAmount = "something not described"; + } // recipient.did is for legacy data, before March 2023 const gaveRecipientId = // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -581,7 +590,7 @@ export default class HomeView extends Vue { } /** - * @param result direct response from the server (potentially with embedded "data") + * @param result direct response eg. ErrorResult or SuccessResult (potentially with embedded "data") * @returns best guess at an error message */ // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -589,7 +598,7 @@ export default class HomeView extends Vue { return ( result.error?.userMessage || result.error?.error || - result.data?.error?.message + result.response?.data?.error?.message ); } }