Console.log commented out in various modules

This commit is contained in:
Rene V. Vergara A. 2022-07-25 19:21:15 -05:00
parent 9d59a4eb2e
commit 0b9419c41f
9 changed files with 38 additions and 24 deletions

View file

@ -42,7 +42,7 @@ export class CheckoutComponent implements OnInit{
logoHeight: 60, logoHeight: 60,
correctLevel: QRCode.CorrectLevel.H correctLevel: QRCode.CorrectLevel.H
}); });
console.log(">>> " + qrcode); // console.log(">>> " + qrcode);
} }

View file

@ -83,7 +83,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
const dialogRef = this.dialog.open(CancelComponent, dialogConfig); const dialogRef = this.dialog.open(CancelComponent, dialogConfig);
dialogRef.afterClosed().subscribe(val => { dialogRef.afterClosed().subscribe(val => {
if(val){ if(val){
console.log('Logout!'); // console.log('Logout!');
this.userService.deleteUser().subscribe(UserResponse => { this.userService.deleteUser().subscribe(UserResponse => {
console.log('Rerouting'); console.log('Rerouting');
this.userService.findUser(); this.userService.findUser();

View file

@ -49,7 +49,7 @@ export class ItemCreateComponent implements OnInit {
} }
save() { save() {
console.log(this.form.value); // console.log(this.form.value);
this.dialogRef.close(this.form.value); this.dialogRef.close(this.form.value);
} }

View file

@ -106,9 +106,9 @@ export class ItemListComponent implements OnInit{
} }
edit(id: string) { edit(id: string) {
console.log('Edit:', id); // console.log('Edit:', id);
const item = this.items.find(element => element._id == id); const item = this.items.find(element => element._id == id);
console.log(item); // console.log(item);
const dialogConfig = new MatDialogConfig(); const dialogConfig = new MatDialogConfig();
dialogConfig.disableClose = true; dialogConfig.disableClose = true;
@ -147,7 +147,7 @@ export class ItemListComponent implements OnInit{
const dialogRef = this.dialog.open(ItemDeleteComponent, dialogConfig); const dialogRef = this.dialog.open(ItemDeleteComponent, dialogConfig);
dialogRef.afterClosed().subscribe((val) => { dialogRef.afterClosed().subscribe((val) => {
if (val != null) { if (val != null) {
console.log('Deleting', val); // console.log('Deleting', val);
this.itemService.deleteItem(val); this.itemService.deleteItem(val);
this.items = []; this.items = [];
} }

View file

@ -39,7 +39,7 @@ export class ItemService{
} else { } else {
this.dataStore.items = []; this.dataStore.items = [];
this._itemsUpdated.next(Object.assign({},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 }); let obs = this.http.post<{message: string}>(this.beUrl+'api/item', { payload: item }, { headers: this.reqHeaders });
obs.subscribe((ItemResponse) => { obs.subscribe((ItemResponse) => {
console.log('Item added'); // console.log('Item added');
this.getItems(this.address); 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 }); let obs = this.http.delete<{message: string}>(this.beUrl+'api/item/'+id, { headers: this.reqHeaders });
obs.subscribe((ItemResponse) => { obs.subscribe((ItemResponse) => {
console.log('Item deleted'); // console.log('Item deleted');
this.getItems(this.address); this.getItems(this.address);
}); });

View file

@ -95,9 +95,9 @@ export class ListOrdersComponent implements OnInit, OnDestroy{
// this.order.totalZec = parseFloat(zec.toFixed(8)); // this.order.totalZec = parseFloat(zec.toFixed(8));
const dialogConfig = new MatDialogConfig(); const dialogConfig = new MatDialogConfig();
console.log("Order data:"); // console.log("Order data:");
console.log(order); // console.log(order);
console.log("order.total = " + order.total); // console.log("order.total = " + order.total);
dialogConfig.disableClose = true; dialogConfig.disableClose = true;
dialogConfig.autoFocus = true; dialogConfig.autoFocus = true;
@ -116,9 +116,9 @@ export class ListOrdersComponent implements OnInit, OnDestroy{
// this.order.totalZec = parseFloat(zec.toFixed(8)); // this.order.totalZec = parseFloat(zec.toFixed(8));
const dialogConfig = new MatDialogConfig(); const dialogConfig = new MatDialogConfig();
console.log("Order data:"); // console.log("Order data:");
console.log(order); // console.log(order);
console.log("order.total = " + order.total); // console.log("order.total = " + order.total);
dialogConfig.disableClose = true; dialogConfig.disableClose = true;
dialogConfig.autoFocus = true; dialogConfig.autoFocus = true;

View file

@ -194,7 +194,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
const dialogRef = this.dialog.open(ScanComponent, dialogConfig); const dialogRef = this.dialog.open(ScanComponent, dialogConfig);
dialogRef.afterClosed().subscribe((val) => { dialogRef.afterClosed().subscribe((val) => {
console.log('Awaiting confirmation'); // console.log('Awaiting confirmation');
if(val){ if(val){
stepper.next(); stepper.next();
} }

View file

@ -2,6 +2,8 @@ import { Inject, Component, OnInit, ViewEncapsulation} from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { NotifierService } from '../notifier.service';
var QRCode = require('easyqrcodejs'); var QRCode = require('easyqrcodejs');
var URLSafeBase64 = require('urlsafe-base64'); var URLSafeBase64 = require('urlsafe-base64');
var Buffer = require('buffer/').Buffer; var Buffer = require('buffer/').Buffer;
@ -23,8 +25,9 @@ export class ScanComponent implements OnInit{
constructor( constructor(
private dialogRef: MatDialogRef<ScanComponent>, private dialogRef: MatDialogRef<ScanComponent>,
private sanitizer: DomSanitizer, 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.address = data.addr;
this.total = data.totalZec; this.total = data.totalZec;
this.session = data.session; this.session = data.session;
@ -57,6 +60,8 @@ export class ScanComponent implements OnInit{
copyAddress() { copyAddress() {
if (!navigator.clipboard) { if (!navigator.clipboard) {
alert("Copy functionality not supported"); alert("Copy functionality not supported");
this.notifierService
.showNotification("Copy functionality not supported","Close","error");
} }
try { try {
navigator.clipboard.writeText(this.address); navigator.clipboard.writeText(this.address);
@ -67,18 +72,24 @@ export class ScanComponent implements OnInit{
copyAmount() { copyAmount() {
if (!navigator.clipboard) { if (!navigator.clipboard) {
alert("Copy functionality not supported"); // alert("Copy functionality not supported");
this.notifierService
.showNotification("Copy functionality not supported","Close","error");
} }
try { try {
navigator.clipboard.writeText(this.total.toString()); navigator.clipboard.writeText(this.total.toString());
} catch (err) { } catch (err) {
console.error("Error", err); this.notifierService
.showNotification("Error while copying ammount","Close","error");
// console.error("Error", err);
} }
} }
copyMemo() { copyMemo() {
if (!navigator.clipboard) { if (!navigator.clipboard) {
alert("Copy functionality not supported"); // alert("Copy functionality not supported");
this.notifierService
.showNotification("Copy functionality not supported","Close","error");
} }
try { try {
if (this.pay) { if (this.pay) {
@ -87,7 +98,10 @@ export class ScanComponent implements OnInit{
navigator.clipboard.writeText("ZGO::" + this.session + " Reply-To:<your z-addr>"); navigator.clipboard.writeText("ZGO::" + this.session + " Reply-To:<your z-addr>");
} }
} catch (err) { } catch (err) {
console.error("Error", err);
this.notifierService
.showNotification("Error while verifying payment","Close","error");
// console.error("Error", err);
} }
} }
} }

View file

@ -78,8 +78,8 @@ export class SettingsComponent implements OnInit {
} }
onChangeVKeyOn(ob: MatSlideToggleChange) { onChangeVKeyOn(ob: MatSlideToggleChange) {
console.log("Viewing key switch is " + // console.log("Viewing key switch is " +
( ob.checked ? "[ON]." : "[OFF]." ) ); // ( ob.checked ? "[ON]." : "[OFF]." ) );
this.useVKey = ob.checked; this.useVKey = ob.checked;