diff --git a/src/app/checkout/checkout.component.ts b/src/app/checkout/checkout.component.ts index 0dae1ff..6a24355 100644 --- a/src/app/checkout/checkout.component.ts +++ b/src/app/checkout/checkout.component.ts @@ -42,7 +42,7 @@ export class CheckoutComponent implements OnInit{ logoHeight: 60, correctLevel: QRCode.CorrectLevel.H }); - console.log(">>> " + qrcode); +// console.log(">>> " + qrcode); } diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index ed47260..8ae688c 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -83,7 +83,7 @@ export class HeaderComponent implements OnInit, OnDestroy { const dialogRef = this.dialog.open(CancelComponent, dialogConfig); dialogRef.afterClosed().subscribe(val => { if(val){ - console.log('Logout!'); +// console.log('Logout!'); this.userService.deleteUser().subscribe(UserResponse => { console.log('Rerouting'); this.userService.findUser(); diff --git a/src/app/items/item-create/item-create.component.ts b/src/app/items/item-create/item-create.component.ts index d2d5519..7f2c9bf 100644 --- a/src/app/items/item-create/item-create.component.ts +++ b/src/app/items/item-create/item-create.component.ts @@ -49,7 +49,7 @@ export class ItemCreateComponent implements OnInit { } save() { - console.log(this.form.value); +// console.log(this.form.value); this.dialogRef.close(this.form.value); } diff --git a/src/app/items/item-list/item-list.component.ts b/src/app/items/item-list/item-list.component.ts index f8904ec..8a42705 100644 --- a/src/app/items/item-list/item-list.component.ts +++ b/src/app/items/item-list/item-list.component.ts @@ -106,9 +106,9 @@ export class ItemListComponent implements OnInit{ } edit(id: string) { - console.log('Edit:', id); +// console.log('Edit:', id); const item = this.items.find(element => element._id == id); - console.log(item); +// console.log(item); const dialogConfig = new MatDialogConfig(); dialogConfig.disableClose = true; @@ -147,7 +147,7 @@ export class ItemListComponent implements OnInit{ const dialogRef = this.dialog.open(ItemDeleteComponent, dialogConfig); dialogRef.afterClosed().subscribe((val) => { if (val != null) { - console.log('Deleting', val); +// console.log('Deleting', val); this.itemService.deleteItem(val); this.items = []; } diff --git a/src/app/items/items.service.ts b/src/app/items/items.service.ts index 96f45c6..c97e21f 100644 --- a/src/app/items/items.service.ts +++ b/src/app/items/items.service.ts @@ -39,7 +39,7 @@ export class ItemService{ } else { this.dataStore.items = []; this._itemsUpdated.next(Object.assign({},this.dataStore).items); - console.log('No items found'); +// console.log('No items found'); } }); @@ -51,7 +51,7 @@ export class ItemService{ let obs = this.http.post<{message: string}>(this.beUrl+'api/item', { payload: item }, { headers: this.reqHeaders }); obs.subscribe((ItemResponse) => { - console.log('Item added'); +// console.log('Item added'); this.getItems(this.address); }); @@ -62,7 +62,7 @@ export class ItemService{ let obs = this.http.delete<{message: string}>(this.beUrl+'api/item/'+id, { headers: this.reqHeaders }); obs.subscribe((ItemResponse) => { - console.log('Item deleted'); +// console.log('Item deleted'); this.getItems(this.address); }); diff --git a/src/app/listorders/listorders.component.ts b/src/app/listorders/listorders.component.ts index 4996cdc..eb7b4af 100644 --- a/src/app/listorders/listorders.component.ts +++ b/src/app/listorders/listorders.component.ts @@ -95,9 +95,9 @@ export class ListOrdersComponent implements OnInit, OnDestroy{ // this.order.totalZec = parseFloat(zec.toFixed(8)); const dialogConfig = new MatDialogConfig(); - console.log("Order data:"); - console.log(order); - console.log("order.total = " + order.total); +// console.log("Order data:"); +// console.log(order); +// console.log("order.total = " + order.total); dialogConfig.disableClose = true; dialogConfig.autoFocus = true; @@ -116,9 +116,9 @@ export class ListOrdersComponent implements OnInit, OnDestroy{ // this.order.totalZec = parseFloat(zec.toFixed(8)); const dialogConfig = new MatDialogConfig(); - console.log("Order data:"); - console.log(order); - console.log("order.total = " + order.total); +// console.log("Order data:"); +// console.log(order); +// console.log("order.total = " + order.total); dialogConfig.disableClose = true; dialogConfig.autoFocus = true; diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts index 4016a68..245ee2b 100644 --- a/src/app/login/login.component.ts +++ b/src/app/login/login.component.ts @@ -194,7 +194,7 @@ export class LoginComponent implements OnInit, AfterViewInit { const dialogRef = this.dialog.open(ScanComponent, dialogConfig); dialogRef.afterClosed().subscribe((val) => { - console.log('Awaiting confirmation'); +// console.log('Awaiting confirmation'); if(val){ stepper.next(); } diff --git a/src/app/scan/scan.component.ts b/src/app/scan/scan.component.ts index 5d241e0..6e78061 100644 --- a/src/app/scan/scan.component.ts +++ b/src/app/scan/scan.component.ts @@ -2,6 +2,8 @@ import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; +import { NotifierService } from '../notifier.service'; + var QRCode = require('easyqrcodejs'); var URLSafeBase64 = require('urlsafe-base64'); var Buffer = require('buffer/').Buffer; @@ -23,8 +25,9 @@ export class ScanComponent implements OnInit{ constructor( private dialogRef: MatDialogRef, private sanitizer: DomSanitizer, - @Inject(MAT_DIALOG_DATA) public data: { totalZec: number, addr: string, session: string, pay: boolean} - ) { + @Inject(MAT_DIALOG_DATA) public data: { totalZec: number, addr: string, session: string, pay: boolean}, + private notifierService : NotifierService ) { + this.address = data.addr; this.total = data.totalZec; this.session = data.session; @@ -57,6 +60,8 @@ export class ScanComponent implements OnInit{ copyAddress() { if (!navigator.clipboard) { alert("Copy functionality not supported"); + this.notifierService + .showNotification("Copy functionality not supported","Close","error"); } try { navigator.clipboard.writeText(this.address); @@ -67,18 +72,24 @@ export class ScanComponent implements OnInit{ copyAmount() { if (!navigator.clipboard) { - alert("Copy functionality not supported"); +// alert("Copy functionality not supported"); + this.notifierService + .showNotification("Copy functionality not supported","Close","error"); } try { navigator.clipboard.writeText(this.total.toString()); } catch (err) { - console.error("Error", err); + this.notifierService + .showNotification("Error while copying ammount","Close","error"); +// console.error("Error", err); } } copyMemo() { if (!navigator.clipboard) { - alert("Copy functionality not supported"); +// alert("Copy functionality not supported"); + this.notifierService + .showNotification("Copy functionality not supported","Close","error"); } try { if (this.pay) { @@ -87,7 +98,10 @@ export class ScanComponent implements OnInit{ navigator.clipboard.writeText("ZGO::" + this.session + " Reply-To:"); } } catch (err) { - console.error("Error", err); + + this.notifierService + .showNotification("Error while verifying payment","Close","error"); +// console.error("Error", err); } } } diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 9e68c2f..d69d162 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -78,8 +78,8 @@ export class SettingsComponent implements OnInit { } onChangeVKeyOn(ob: MatSlideToggleChange) { - console.log("Viewing key switch is " + - ( ob.checked ? "[ON]." : "[OFF]." ) ); +// console.log("Viewing key switch is " + +// ( ob.checked ? "[ON]." : "[OFF]." ) ); this.useVKey = ob.checked;