name fix for photo receipts

This commit is contained in:
Jason Liu 2021-10-04 20:23:43 -04:00
parent 3c8653b5d3
commit 1f57403cd7
1 changed files with 13 additions and 2 deletions

View File

@ -40,8 +40,19 @@ export class Photo {
body.hidden = false; body.hidden = false;
body.style.backgroundColor = payload.backgroundColor body.style.backgroundColor = payload.backgroundColor
const vaccineName = receipt.vaccineName; const vaccineName = receipt.vaccineName.toLocaleUpperCase();
let doseVaccine = "#" + String(receipt.numDoses) + ": " + vaccineName; let vaccineNameProper = vaccineName.charAt(0) + vaccineName.substr(1).toLowerCase();
if (vaccineName.includes('PFIZER'))
vaccineNameProper = 'Pfizer (Comirnaty)'
if (vaccineName.includes('MODERNA'))
vaccineNameProper = 'Moderna (SpikeVax)'
if (vaccineName.includes('ASTRAZENECA') || vaccineName.includes('COVISHIELD'))
vaccineNameProper = 'AstraZeneca (Vaxzevria)'
let doseVaccine = "#" + String(receipt.numDoses) + ": " + vaccineNameProper;
document.getElementById('vaccineName').innerText = doseVaccine; document.getElementById('vaccineName').innerText = doseVaccine;