-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dual qr reading #32
base: main
Are you sure you want to change the base?
Conversation
return docData.data() as AppQr | undefined; | ||
} | ||
|
||
readQr(qr: AppQr, user: AppUser) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing return type
const balance = qr?.balance ?? 0; | ||
|
||
if (qr.users?.includes(user.email!)) { | ||
return from(Promise.reject('Ya has escaneado este código')).pipe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya escaneaste este código
if (!this.isScannActive) return; | ||
|
||
if (qrData.startsWith('{') && qrData.endsWith('}')) { | ||
const data = JSON.parse(qrData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may potentially throw an error, you should handle that
@@ -115,4 +163,6 @@ export class ScannerComponent { | |||
closeScanner(): void { | |||
this.dialogRef.close(); | |||
} | |||
|
|||
ngOnDestroy(): void {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, delete it
No description provided.