name fix for photo receipts
This commit is contained in:
parent
3c8653b5d3
commit
1f57403cd7
15
src/photo.ts
15
src/photo.ts
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue