From 75ef1ec8686b714b4b31ecde2df62705c70d4d74 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Thu, 14 Dec 2023 13:47:37 +0100 Subject: [PATCH 1/3] fix(marketplace): Show materials details the same way on auction as in auction list --- .../src/components/AuctionResultsCard.vue | 6 +- .../src/components/CreditTabContent.vue | 12 ++-- .../src/components/ProjectDetailMaterial.vue | 50 +++++++++++++ .../marketplace/src/pages/AuctionDetails.vue | 72 ++++++++++++------- .../marketplace/src/types/GraphqlSchema.ts | 6 ++ frontend/marketplace/src/utils/utils.ts | 21 +++--- 6 files changed, 116 insertions(+), 51 deletions(-) create mode 100644 frontend/marketplace/src/components/ProjectDetailMaterial.vue diff --git a/frontend/marketplace/src/components/AuctionResultsCard.vue b/frontend/marketplace/src/components/AuctionResultsCard.vue index ade2b7445..94e11ab0d 100644 --- a/frontend/marketplace/src/components/AuctionResultsCard.vue +++ b/frontend/marketplace/src/components/AuctionResultsCard.vue @@ -2,6 +2,7 @@ import type { MarketplaceListing } from "@/types/GraphqlSchema"; import router from "@/router"; import auctionCard from "@/assets/auctionCard.png"; +import type { MaterialProperty } from "@/types/GraphqlSchema"; import { getDetailsList, prettifyCardProperty, @@ -21,10 +22,7 @@ export interface AuctionResultsCardProps { interface CardDetailsList { applicant: string[]; location: string[]; - material: { - key: string; - value: string; - }[][]; + material: MaterialProperty[][]; volume: number; thumbnailUrl: string; image: string[]; diff --git a/frontend/marketplace/src/components/CreditTabContent.vue b/frontend/marketplace/src/components/CreditTabContent.vue index f56df77d8..417fdcf81 100644 --- a/frontend/marketplace/src/components/CreditTabContent.vue +++ b/frontend/marketplace/src/components/CreditTabContent.vue @@ -35,8 +35,8 @@ const getCreditsData = async () => { query { creditBalances( first:${itemsPerPage.value},offset:${ - (pageNumber.value - 1) * itemsPerPage.value - } + (pageNumber.value - 1) * itemsPerPage.value + } filter:{ wallet:{ address:{equalTo:"${walletAddress}"} @@ -93,11 +93,9 @@ const getCreditsData = async () => { const loadQueryData = (query: string) => { showSpinner.value = true; - const { result, loading, error, refetch } = useQuery( - gql` - ${query} - ` - ); + const { result, loading, error, refetch } = useQuery(gql` + ${query} + `); data.value = { result, loading, error }; showSpinner.value = false; setInterval(() => { diff --git a/frontend/marketplace/src/components/ProjectDetailMaterial.vue b/frontend/marketplace/src/components/ProjectDetailMaterial.vue new file mode 100644 index 000000000..7c4a62ec4 --- /dev/null +++ b/frontend/marketplace/src/components/ProjectDetailMaterial.vue @@ -0,0 +1,50 @@ + + + + diff --git a/frontend/marketplace/src/pages/AuctionDetails.vue b/frontend/marketplace/src/pages/AuctionDetails.vue index c53bb695b..82c2f120b 100644 --- a/frontend/marketplace/src/pages/AuctionDetails.vue +++ b/frontend/marketplace/src/pages/AuctionDetails.vue @@ -1,17 +1,40 @@