From bb641f9d0afa53fe014938ada3c0998c68a5ba56 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Wed, 13 Dec 2023 22:15:33 +0100 Subject: [PATCH 1/6] fix(marketplace): Scroll to top after navigation please --- frontend/marketplace/src/router/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/marketplace/src/router/index.ts b/frontend/marketplace/src/router/index.ts index 056120f6..a9b5c206 100644 --- a/frontend/marketplace/src/router/index.ts +++ b/frontend/marketplace/src/router/index.ts @@ -11,6 +11,10 @@ import AuctionPaymentSuccessful from "@/pages/AuctionPaymentSuccessful.vue"; import AuctionPaymentCancelled from "@/pages/AuctionPaymentCancelled.vue"; const router = createRouter({ + scrollBehavior: () => { + // always scroll to top after navigation + return { top: 0 }; + }, history: createWebHistory(import.meta.env.BASE_URL), routes: [ { From 1cb2103e4970409fe836e32b46942de97a6f48b1 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Wed, 13 Dec 2023 22:17:42 +0100 Subject: [PATCH 2/6] fix(marketplace): s/COLLECTOR ORGANISATION/COLLECTION ORGANISATION --- .../marketplace/src/components/SearchBar.vue | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/frontend/marketplace/src/components/SearchBar.vue b/frontend/marketplace/src/components/SearchBar.vue index 19d3a5a0..084a9f14 100644 --- a/frontend/marketplace/src/components/SearchBar.vue +++ b/frontend/marketplace/src/components/SearchBar.vue @@ -87,7 +87,15 @@ const applicantData: any = useQuery(gql`

Location

@@ -110,9 +118,17 @@ const applicantData: any = useQuery(gql` />
-

COLLECTOR ORGANISATION

+

COLLECTION ORGANISATION

@@ -170,7 +186,15 @@ const applicantData: any = useQuery(gql`

LOCATION

@@ -194,9 +218,17 @@ const applicantData: any = useQuery(gql` />
-

COLLECTOR ORGANISATION

+

COLLECTION ORGANISATION

From 2c84dac57a982ee91baa7aa6ee2e446788717833 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Wed, 13 Dec 2023 22:18:54 +0100 Subject: [PATCH 3/6] fix(marketplace): Lets be consistent with organiSation spelling --- frontend/marketplace/src/pages/AuctionDetails.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/marketplace/src/pages/AuctionDetails.vue b/frontend/marketplace/src/pages/AuctionDetails.vue index b961c070..c53bb695 100644 --- a/frontend/marketplace/src/pages/AuctionDetails.vue +++ b/frontend/marketplace/src/pages/AuctionDetails.vue @@ -293,7 +293,7 @@ onMounted(() => { list /> Date: Wed, 13 Dec 2023 22:21:27 +0100 Subject: [PATCH 4/6] fix(marketplace): Set plasticType as material heading and indent the properties --- .../src/components/AuctionResultsCard.vue | 83 ++++++++++--------- frontend/marketplace/src/utils/utils.ts | 70 ++++++++++++---- 2 files changed, 101 insertions(+), 52 deletions(-) diff --git a/frontend/marketplace/src/components/AuctionResultsCard.vue b/frontend/marketplace/src/components/AuctionResultsCard.vue index 47265103..a81ebe5f 100644 --- a/frontend/marketplace/src/components/AuctionResultsCard.vue +++ b/frontend/marketplace/src/components/AuctionResultsCard.vue @@ -2,7 +2,12 @@ import type { MarketplaceListing } from "@/types/GraphqlSchema"; import router from "@/router"; import auctionCard from "@/assets/auctionCard.png"; -import { getDetailsList } from "@/utils/utils"; +import { + getDetailsList, + prettifyCardProperty, + stripPlasticTypeFromMaterial, + findPlasticTypeInMaterial, +} from "@/utils/utils"; import { formatDenom } from "@/utils/wallet-utils"; import { onMounted, ref } from "vue"; @@ -12,11 +17,31 @@ export interface AuctionResultsCardProps { }; } +interface CardDetailsList { + applicant: string[]; + location: string[]; + material: { + key: string; + value: string; + }[][]; + volume: number; + thumbnailUrl: string; + image: string[]; + locationPointers: { + lat: number; + lng: number; + }[]; +} + const props = defineProps(); const denom = ref(""); +const cardDetailsList = ref(); onMounted(async () => { denom.value = await formatDenom(props.cardData?.pricePerCreditDenom); + cardDetailsList.value = getDetailsList( + props.cardData.creditCollection.creditData.nodes, + ); });