diff --git a/frontend/marketplace/src/components/CertificateCard.vue b/frontend/marketplace/src/components/CertificateCard.vue index be0d8633..07089ca2 100644 --- a/frontend/marketplace/src/components/CertificateCard.vue +++ b/frontend/marketplace/src/components/CertificateCard.vue @@ -92,12 +92,36 @@ 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 = []; +}; + const queryCertificateData = () => { const { result, error, onResult } = useQuery(GET_CREDIT_OFFSET_CERTIFICATE, { id: ID, 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 }