mirror of
https://github.com/covidpass-org/covidpass.git
synced 2025-02-23 15:07:44 +01:00
Updated Covishield to detect as AZ
* Also made photo filename dynamic rather than fixed to avoid save conflicts
This commit is contained in:
parent
8c393e110e
commit
f0c5a5622e
@ -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');
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user