From f0c5a5622ecc7a76e6f02dc1112457c8cd91e140 Mon Sep 17 00:00:00 2001 From: Ryan Slobojan Date: Wed, 29 Sep 2021 20:51:44 -0400 Subject: [PATCH 1/3] Updated Covishield to detect as AZ * Also made photo filename dynamic rather than fixed to avoid save conflicts --- components/Form.tsx | 7 ++++++- src/payload.ts | 2 +- src/photo.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/Form.tsx b/components/Form.tsx index 544c1e6..2e622cf 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -308,9 +308,14 @@ function Form(): JSX.Element { } try { + const passName = payloadBody.receipts[selectedDose].name.replace(' ', '-'); + const vaxName = payloadBody.receipts[selectedDose].vaccineName.replace(' ', '-'); + const passDose = payloadBody.receipts[selectedDose].numDoses; + const covidPassFilename = `grassroots-receipt-${passName}-${vaxName}-${passDose}.png`; + await incrementCount(); let photoBlob = await Photo.generatePass(payloadBody, selectedDose); - saveAs(photoBlob, 'pass.png'); + saveAs(photoBlob, covidPassFilename); // need to clean up const qrcodeElement = document.getElementById('qrcode'); diff --git a/src/payload.ts b/src/payload.ts index 201fef2..8e92b85 100644 --- a/src/payload.ts +++ b/src/payload.ts @@ -61,7 +61,7 @@ export class Payload { vaccineNameProper = 'Moderna (SpikeVax)' // vaccineNameProper = 'Pfizer (Comirnaty)' - if (vaccineName.includes('ASTRAZENECA')) + if (vaccineName.includes('ASTRAZENECA') || vaccineName.includes('COVISHIELD')) vaccineNameProper = 'AstraZeneca (Vaxzevria)' let doseVaccine = "#" + String(body.receipts[numDose].numDoses) + ": " + vaccineNameProper; diff --git a/src/photo.ts b/src/photo.ts index ed3ac4f..4ea9bd2 100644 --- a/src/photo.ts +++ b/src/photo.ts @@ -104,7 +104,7 @@ export class Photo { if (vaccineName.includes('MODERNA')) vaccineNameProper = 'Moderna (SpikeVax)' - if (vaccineName.includes('ASTRAZENECA')) + if (vaccineName.includes('ASTRAZENECA') || vaccineName.includes('COVISHIELD')) vaccineNameProper = 'AstraZeneca (Vaxzevria)' let doseVaccine = "#" + String(payload.receipt.numDoses) + ": " + vaccineNameProper; From 2c4af9e5e1d962d1510dcae333c98c136a245b06 Mon Sep 17 00:00:00 2001 From: Ryan Slobojan Date: Wed, 29 Sep 2021 20:56:17 -0400 Subject: [PATCH 2/3] Bump build number --- src/sentry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry.ts b/src/sentry.ts index b71fa25..d3d2785 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -3,7 +3,7 @@ import { Integrations } from '@sentry/tracing'; export const initSentry = () => { SentryModule.init({ - release: 'grassroots_covidpass@1.9.11', // App version. Needs to be manually updated as we go unless we make the build smarter + release: 'grassroots_covidpass@1.9.12', // App version. Needs to be manually updated as we go unless we make the build smarter dsn: 'https://7120dcf8548c4c5cb148cdde2ed6a778@o1015766.ingest.sentry.io/5981424', integrations: [ new Integrations.BrowserTracing(), From 4576b3bd3b33c12aa343a5d4406780ad700a88b7 Mon Sep 17 00:00:00 2001 From: Ryan Slobojan Date: Wed, 29 Sep 2021 21:00:02 -0400 Subject: [PATCH 3/3] Increment public build number --- components/Page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Page.tsx b/components/Page.tsx index 71e03ab..36d2d0b 100644 --- a/components/Page.tsx +++ b/components/Page.tsx @@ -36,7 +36,7 @@ function Page(props: PageProps): JSX.Element { {t('common:gitHub')} {t('common:returnToMainSite')} -
Last updated: 2021-09-27 (v1.9.9)
+
Last updated: 2021-09-29 (v1.9.12)