mirror of
https://github.com/covidpass-org/covidpass.git
synced 2025-02-23 23:17:37 +01:00
cleaned up console logging to be ready for main branch merge
This commit is contained in:
parent
6f45d6c690
commit
f6cdcada1c
@ -269,16 +269,16 @@ function Form(): JSX.Element {
|
|||||||
const passDose = selectedReceipt.numDoses;
|
const passDose = selectedReceipt.numDoses;
|
||||||
const covidPassFilename = `grassroots-receipt-${passName}-${vaxName}-${passDose}.pkpass`;
|
const covidPassFilename = `grassroots-receipt-${passName}-${vaxName}-${passDose}.pkpass`;
|
||||||
|
|
||||||
//console.log('> increment count');
|
console.log('> increment count');
|
||||||
await incrementCount();
|
await incrementCount();
|
||||||
|
|
||||||
// console.log('> generatePass');
|
console.log('> generatePass');
|
||||||
const pass = await PassData.generatePass(payloadBody, selectedDose);
|
const pass = await PassData.generatePass(payloadBody, selectedDose);
|
||||||
|
|
||||||
//console.log('> create blob');
|
console.log('> create blob');
|
||||||
const passBlob = new Blob([pass], {type: "application/vnd.apple.pkpass"});
|
const passBlob = new Blob([pass], {type: "application/vnd.apple.pkpass"});
|
||||||
|
|
||||||
//console.log(`> save blob as ${covidPassFilename}`);
|
console.log(`> save blob as ${covidPassFilename}`);
|
||||||
saveAs(passBlob, covidPassFilename);
|
saveAs(passBlob, covidPassFilename);
|
||||||
setSaveLoading(false);
|
setSaveLoading(false);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ function Page(props: PageProps): JSX.Element {
|
|||||||
<a href="https://github.com/billylo1/covidpass" className="underline">{t('common:gitHub')}</a>
|
<a href="https://github.com/billylo1/covidpass" className="underline">{t('common:gitHub')}</a>
|
||||||
<a href="https://vaccine-ontario.ca" className="underline">{t('common:returnToMainSite')}</a>
|
<a href="https://vaccine-ontario.ca" className="underline">{t('common:returnToMainSite')}</a>
|
||||||
</nav>
|
</nav>
|
||||||
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-09-29 (v1.9.12)</div>
|
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-10-01 (v1.9.13)</div>
|
||||||
</footer>
|
</footer>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,10 +74,11 @@ function Index(): JSX.Element {
|
|||||||
<Card content={
|
<Card content={
|
||||||
<div><p>{t('common:subtitle')}</p><br /><p>{t('common:subtitle2')}</p><br />
|
<div><p>{t('common:subtitle')}</p><br /><p>{t('common:subtitle2')}</p><br />
|
||||||
<b>{displayPassCount}</b><br/><br/>
|
<b>{displayPassCount}</b><br/><br/>
|
||||||
Sept 29 afternoon update:
|
Oct 1 morning update:
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<ul className="list-decimal list-outside" style={{ marginLeft: '20px' }}>
|
<ul className="list-decimal list-outside" style={{ marginLeft: '20px' }}>
|
||||||
|
<li>Foundation improvements</li>
|
||||||
<li>You can now select which page to import for multi-page receipts</li>
|
<li>You can now select which page to import for multi-page receipts</li>
|
||||||
<li>System reminders (e.g. unsupported browsers) are now on the top to improve ease of use</li>
|
<li>System reminders (e.g. unsupported browsers) are now on the top to improve ease of use</li>
|
||||||
</ul><br />
|
</ul><br />
|
||||||
|
@ -33,7 +33,7 @@ export function decodedStringToReceipt(decoded: object) : HashTable<Receipt> {
|
|||||||
'207': 'MODERNA'
|
'207': 'MODERNA'
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(decoded);
|
// console.log(decoded);
|
||||||
const shcResources = decoded['vc'].credentialSubject.fhirBundle.entry;
|
const shcResources = decoded['vc'].credentialSubject.fhirBundle.entry;
|
||||||
let issuer;
|
let issuer;
|
||||||
if (decoded['iss'].includes('quebec.ca')) {
|
if (decoded['iss'].includes('quebec.ca')) {
|
||||||
@ -98,7 +98,7 @@ export function decodedStringToReceipt(decoded: object) : HashTable<Receipt> {
|
|||||||
vaccinationDate = resource.occurrenceDateTime;
|
vaccinationDate = resource.occurrenceDateTime;
|
||||||
|
|
||||||
const receipt = new Receipt(name, vaccinationDate, vaccineName, dateOfBirth, receiptNumber, organizationName);
|
const receipt = new Receipt(name, vaccinationDate, vaccineName, dateOfBirth, receiptNumber, organizationName);
|
||||||
console.log(receipt);
|
// console.log(receipt);
|
||||||
receipts[receiptNumber] = receipt;
|
receipts[receiptNumber] = receipt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,10 @@ export interface PackageResult {
|
|||||||
export class PassPhotoCommon {
|
export class PassPhotoCommon {
|
||||||
|
|
||||||
static async preparePayload(payloadBody: PayloadBody, numDose: number) : Promise<PackageResult> {
|
static async preparePayload(payloadBody: PayloadBody, numDose: number) : Promise<PackageResult> {
|
||||||
console.log(JSON.stringify(payloadBody, null, 2), numDose);
|
|
||||||
|
console.log('preparePayload');
|
||||||
|
|
||||||
|
// console.log(JSON.stringify(payloadBody, null, 2), numDose);
|
||||||
|
|
||||||
const payload: Payload = new Payload(payloadBody, numDose);
|
const payload: Payload = new Payload(payloadBody, numDose);
|
||||||
|
|
||||||
@ -60,7 +63,7 @@ export class PassPhotoCommon {
|
|||||||
body: JSON.stringify(clonedReceipt) // body data type must match "Content-Type" header
|
body: JSON.stringify(clonedReceipt) // body data type must match "Content-Type" header
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('registering ' + JSON.stringify(clonedReceipt, null, 2));
|
// console.log('registering ' + JSON.stringify(clonedReceipt, null, 2));
|
||||||
const configResponse = await fetch('/api/config');
|
const configResponse = await fetch('/api/config');
|
||||||
|
|
||||||
const configResponseJson = await configResponse.json();
|
const configResponseJson = await configResponse.json();
|
||||||
@ -78,7 +81,7 @@ export class PassPhotoCommon {
|
|||||||
const response = await fetch(registerUrl, requestOptions);
|
const response = await fetch(registerUrl, requestOptions);
|
||||||
const responseJson = await response.json();
|
const responseJson = await response.json();
|
||||||
|
|
||||||
console.log(JSON.stringify(responseJson,null,2));
|
// console.log(JSON.stringify(responseJson,null,2));
|
||||||
|
|
||||||
if (responseJson["result"] != 'OK') {
|
if (responseJson["result"] != 'OK') {
|
||||||
console.error(responseJson);
|
console.error(responseJson);
|
||||||
|
@ -25,7 +25,7 @@ export async function getPayloadBodyFromFile(file: File): Promise<PayloadBody> {
|
|||||||
switch (file.type) {
|
switch (file.type) {
|
||||||
case 'application/pdf':
|
case 'application/pdf':
|
||||||
const receiptType = await detectReceiptType(fileBuffer);
|
const receiptType = await detectReceiptType(fileBuffer);
|
||||||
console.log(receiptType);
|
console.log(`receiptType = ${receiptType}`);
|
||||||
if (receiptType == 'ON') {
|
if (receiptType == 'ON') {
|
||||||
receipts = await loadPDF(fileBuffer) // receipt type is needed to decide if digital signature checking is needed
|
receipts = await loadPDF(fileBuffer) // receipt type is needed to decide if digital signature checking is needed
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user