From 04e254b07a0c54f6076486b3b99f56b5f74b2eeb Mon Sep 17 00:00:00 2001 From: alexander-astrand Date: Wed, 7 Feb 2024 12:19:32 +0100 Subject: [PATCH 1/3] Reset values to fix issues with duplicate tables when doing multiple downloads --- .../src/components/CertificateCard.vue | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/frontend/marketplace/src/components/CertificateCard.vue b/frontend/marketplace/src/components/CertificateCard.vue index be0d8633..84141db2 100644 --- a/frontend/marketplace/src/components/CertificateCard.vue +++ b/frontend/marketplace/src/components/CertificateCard.vue @@ -92,12 +92,37 @@ const onGeneratePDF = () => { qrCodeUrl.value, ); notifyer.success("Certificate downloaded successfully"); + showSpinner.value = false; + resetValues(); } catch (e) { console.error(e); notifyer.error("Something went wrong"); } }; +const resetValues = () => { + certificateData.value = null; + creditData.value = null; + materialData.value = []; + eventData.value = null; + plasticValuesString.value = ""; + locations.value = []; + mediaFileUrls.value = []; + binaryFilesUrls.value = []; + collectionAmount.value = 0; + issuanceDate.value = ""; + applicantData.value = ""; + applicantDataDescription.value = ""; + materialDetails.value = []; + currentHeaders.value = []; + primaryHeaders.value = []; + secondaryHeaders.value = []; + retiredDate.value = ""; + allData.value = []; + pagesData.value = []; + qrCodeUrl.value = undefined; +}; + const queryCertificateData = () => { const { result, error, onResult } = useQuery(GET_CREDIT_OFFSET_CERTIFICATE, { id: ID, From 40933e8ac91baa40028ec70bf285288ec0382749 Mon Sep 17 00:00:00 2001 From: alexander-astrand Date: Wed, 7 Feb 2024 12:20:31 +0100 Subject: [PATCH 2/3] retired date added --- .../marketplace/src/graphql/queries/creditOffsetCertificate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/marketplace/src/graphql/queries/creditOffsetCertificate.ts b/frontend/marketplace/src/graphql/queries/creditOffsetCertificate.ts index 901f5dc5..55c9a037 100644 --- a/frontend/marketplace/src/graphql/queries/creditOffsetCertificate.ts +++ b/frontend/marketplace/src/graphql/queries/creditOffsetCertificate.ts @@ -9,6 +9,7 @@ export const GET_CREDIT_OFFSET_CERTIFICATE = gql` denom retiringEntityName retiringEntityAdditionalData + timestamp walletId amount } From 55d6b015c80259563acc87c0d6e248d9f5ec22a5 Mon Sep 17 00:00:00 2001 From: alexander-astrand Date: Fri, 9 Feb 2024 13:25:52 +0100 Subject: [PATCH 3/3] Fixed QR-code issue --- frontend/marketplace/src/components/CertificateCard.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/marketplace/src/components/CertificateCard.vue b/frontend/marketplace/src/components/CertificateCard.vue index 84141db2..07089ca2 100644 --- a/frontend/marketplace/src/components/CertificateCard.vue +++ b/frontend/marketplace/src/components/CertificateCard.vue @@ -120,7 +120,6 @@ const resetValues = () => { retiredDate.value = ""; allData.value = []; pagesData.value = []; - qrCodeUrl.value = undefined; }; const queryCertificateData = () => {