Remove logging

This commit is contained in:
Rene Vergara 2023-05-08 13:45:34 -05:00
parent c99908807f
commit d2f963fbfc
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2
8 changed files with 102 additions and 108 deletions

View file

@ -24,21 +24,21 @@ export class AppComponent {
}
ngOnInit(){
console.log('chgUILanguage() called on ngOnInit ');
//console.log('chgUILanguage() called on ngOnInit ');
this.chgUILanguage();
}
chgUILanguage() {
console.log('MAIN.chgUILanguage Called ');
this.languageService.getViewElements('main').subscribe(
response => {
console.log('response >> ', response );
console.log('main_price_data -> ',response.data.main_price_data);
//console.log('MAIN.chgUILanguage Called ');
this.languageService.getViewElements('main').subscribe({
next: response => {
//console.log('response >> ', response );
//console.log('main_price_data -> ',response.data.main_price_data);
this.vE.mainPriceData = response.data.main_price_data;
this.zgoLanguage = response.language;
},
error => { console.log('Error --> ',error); }
);
error: error => { console.log('Error --> ',error); }
});
}
usFlagClicked() {

View file

@ -187,7 +187,7 @@ export class BusinessComponent implements OnInit {
}
onChange(ob: MatSlideToggleChange){
console.log(ob.checked);
//console.log(ob.checked);
this.termsChecked = ob.checked;
}
@ -196,10 +196,10 @@ export class BusinessComponent implements OnInit {
dialogConfig.disableClose = true;
dialogConfig.autoFocus = true;
const dialogRef = this.dialog.open(TermsComponent, dialogConfig);
dialogRef.afterClosed().subscribe(val => {
console.log('Terms read');
});
this.dialog.open(TermsComponent, dialogConfig);
//dialogRef.afterClosed().subscribe(val => {
//console.log('Terms read');
//});
}
save() {
@ -248,7 +248,7 @@ export class BusinessComponent implements OnInit {
const dialogRef = this.dialog.open(ScanComponent, dialogConfig);
dialogRef.afterClosed().subscribe(val => {
console.log('Awaiting payment');
//console.log('Awaiting payment');
if(val){
this.stepper!.next();
}
@ -266,46 +266,46 @@ export class BusinessComponent implements OnInit {
}
chgUILanguage(){
console.log('BUSINESS.chgUILanguage Called ');
this.languageService.getViewElements('business').subscribe(
response => {
console.log('Received >> ', response );
console.log('Language Code : ', response.language);
console.log('Component Name : ',response.component);
console.log('Language data : ',response.data);
//console.log('BUSINESS.chgUILanguage Called ');
this.languageService.getViewElements('business').subscribe(
response => {
//console.log('Received >> ', response );
//console.log('Language Code : ', response.language);
//console.log('Component Name : ',response.component);
//console.log('Language data : ',response.data);
this.vE.businessSignupTitle = response.data.business_signup_title;
this.vE.businessBizInfo = response.data.business_biz_info;
this.vE.businessAddrsNobiz = response.data.business_addrs_nobiz;
this.vE.businessBizNamelbl = response.data.business_biz_namelbl;
this.vE.businessBizNameholder = response.data.business_biz_nameholder;
this.vE.businessContactFnamelbl = response.data.business_contact_fnamelbl;
this.vE.businessContactFnholder = response.data.business_contact_fnholder;
this.vE.businessContactLnamelbl = response.data.business_contact_lnamelbl;
this.vE.businessBizAddresslbl = response.data.business_biz_addresslbl;
this.vE.businessBizAddressholder = response.data.business_biz_addressholder;
this.vE.businessBizCitylbl = response.data.business_biz_citylbl;
this.vE.businessBizCityholder = response.data.business_biz_cityholder;
this.vE.businessBizStatelbl = response.data.business_biz_statelbl;
this.vE.businessBizStateholder = response.data.business_biz_stateholder;
this.vE.businessBizPcodelbl = response.data.business_biz_pcodelbl;
this.vE.businessBizPcodeholder = response.data.business_biz_pcodeholder;
this.vE.businessBizCitylbl = response.data.business_biz_citylbl;
this.vE.businessBizCityholder = response.data.business_biz_cityholder;
this.vE.businessBizCountrylbl = response.data.business_biz_countrylbl;
this.vE.businessBizCountryholder = response.data.business_biz_countryholder;
this.vE.businessBizMaillbl = response.data.business_biz_maillbl;
this.vE.businessBizMailholder = response.data.business_biz_mailholder;
this.vE.businessBizWebsitelbl = response.data.business_biz_websitelbl;
this.vE.businessBizWebsiteholder = response.data.business_biz_websiteholder;
this.vE.businessAcceptTerms = response.data.business_accept_terms;
this.vE.businessTermsOfuse = response.data.business_terms_ofuse;
this.vE.businessSaveBtn = response.data.business_save_btn;
this.vE.businessSessionLengthlbl = response.data.business_session_lengthlbl;
this.vE.businessSelectSession = response.data.business_select_session;
this.vE.businessSessionLabel = response.data.business_session_label;
this.vE.businessSessionPaylbl = response.data.business_session_paylbl;
this.vE.businessZGoConfirmlbl = response.data.business_zgo_confirmlbl;
this.vE.businessSignupTitle = response.data.business_signup_title;
this.vE.businessBizInfo = response.data.business_biz_info;
this.vE.businessAddrsNobiz = response.data.business_addrs_nobiz;
this.vE.businessBizNamelbl = response.data.business_biz_namelbl;
this.vE.businessBizNameholder = response.data.business_biz_nameholder;
this.vE.businessContactFnamelbl = response.data.business_contact_fnamelbl;
this.vE.businessContactFnholder = response.data.business_contact_fnholder;
this.vE.businessContactLnamelbl = response.data.business_contact_lnamelbl;
this.vE.businessBizAddresslbl = response.data.business_biz_addresslbl;
this.vE.businessBizAddressholder = response.data.business_biz_addressholder;
this.vE.businessBizCitylbl = response.data.business_biz_citylbl;
this.vE.businessBizCityholder = response.data.business_biz_cityholder;
this.vE.businessBizStatelbl = response.data.business_biz_statelbl;
this.vE.businessBizStateholder = response.data.business_biz_stateholder;
this.vE.businessBizPcodelbl = response.data.business_biz_pcodelbl;
this.vE.businessBizPcodeholder = response.data.business_biz_pcodeholder;
this.vE.businessBizCitylbl = response.data.business_biz_citylbl;
this.vE.businessBizCityholder = response.data.business_biz_cityholder;
this.vE.businessBizCountrylbl = response.data.business_biz_countrylbl;
this.vE.businessBizCountryholder = response.data.business_biz_countryholder;
this.vE.businessBizMaillbl = response.data.business_biz_maillbl;
this.vE.businessBizMailholder = response.data.business_biz_mailholder;
this.vE.businessBizWebsitelbl = response.data.business_biz_websitelbl;
this.vE.businessBizWebsiteholder = response.data.business_biz_websiteholder;
this.vE.businessAcceptTerms = response.data.business_accept_terms;
this.vE.businessTermsOfuse = response.data.business_terms_ofuse;
this.vE.businessSaveBtn = response.data.business_save_btn;
this.vE.businessSessionLengthlbl = response.data.business_session_lengthlbl;
this.vE.businessSelectSession = response.data.business_select_session;
this.vE.businessSessionLabel = response.data.business_session_label;
this.vE.businessSessionPaylbl = response.data.business_session_paylbl;
this.vE.businessZGoConfirmlbl = response.data.business_zgo_confirmlbl;
},
error => { console.log('Error >> ',error); }

View file

@ -4,12 +4,11 @@ import { FullnodeService } from '../fullnode.service';
import { Router } from '@angular/router';
import { UserService } from '../user.service';
import { CancelComponent } from '../cancel/cancel.component';
import { Subscription, Observable } from 'rxjs';
import { Observable } from 'rxjs';
import {Owner} from '../owner.model';
import { LanguageService } from '../language.service';
import { LanguageData } from '../language.model';
@Component({
selector: 'app-header',
@ -99,14 +98,14 @@ export class HeaderComponent implements OnInit, OnDestroy {
msg1: this.vE.headerLogoutMsg1,
msg2: this.vE.headerLogoutMsg2 };
console.log(dialogConfig.data);
//console.log(dialogConfig.data);
const dialogRef = this.dialog.open(CancelComponent, dialogConfig);
dialogRef.afterClosed().subscribe(val => {
if(val){
// console.log('Logout!');
this.userService.deleteUser().subscribe(UserResponse => {
console.log('Rerouting');
//console.log('Rerouting');
this.userService.findUser();
this.router.navigate(['/login']);
});
@ -115,13 +114,13 @@ export class HeaderComponent implements OnInit, OnDestroy {
}
chgUILanguage(){
console.log('HEADER.chgUILanguage Called ');
this.languageService.getViewElements('header').subscribe(
response => {
console.log('Received >> ', response );
console.log('Language Code : ', response.language);
console.log('Component Name : ',response.component);
console.log('Language data : ',response.data);
//console.log('HEADER.chgUILanguage Called ');
this.languageService.getViewElements('header').subscribe({
next: response => {
//console.log('Received >> ', response );
//console.log('Language Code : ', response.language);
//console.log('Component Name : ',response.component);
//console.log('Language data : ',response.data);
this.vE.headerLastBlock = response.data.header_last_block;
this.vE.headerGetCurrency = response.data.header_get_currency;
@ -130,8 +129,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
this.vE.headerLogoutMsg2 = response.data.header_logout_msg2;
},
error => { console.log('Error >> ',error); }
);
error: error => { console.log('Error >> ',error); }
});
}
}

View file

@ -1,7 +1,7 @@
import { Component, OnInit, OnDestroy, Injectable, ChangeDetectorRef, ViewChild, AfterViewInit } from '@angular/core';
import { CanActivate, Router, RouterStateSnapshot, ActivatedRouteSnapshot, ActivatedRoute } from '@angular/router';
import { Component, OnInit, ChangeDetectorRef, ViewChild, AfterViewInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { MatDialog, MatDialogConfig} from '@angular/material/dialog';
import { UntypedFormBuilder, Validators, UntypedFormGroup, FormControl } from '@angular/forms';
import { UntypedFormBuilder, Validators, UntypedFormGroup } from '@angular/forms';
import { ProgressBarMode } from '@angular/material/progress-bar';
import { MatStepper } from '@angular/material/stepper';
import { UserService } from '../user.service';
@ -11,15 +11,9 @@ import { Tx } from '../tx.model';
import { User } from '../user.model';
import { Owner } from '../owner.model';
import { Subscription, Observable } from 'rxjs';
import { take } from 'rxjs/operators';
import { v4 as uuidv4 } from 'uuid';
import { LanguageService } from '../language.service';
import { LanguageData } from '../language.model';
var QRCode = require('easyqrcodejs');
var URLSafeBase64 = require('urlsafe-base64');
var Buffer = require('buffer/').Buffer;
@Component({
selector: 'app-login',
@ -229,13 +223,13 @@ export class LoginComponent implements OnInit, AfterViewInit {
}
chgUILanguage(){
console.log('LOGIN.chgUILanguage Called ');
//console.log('LOGIN.chgUILanguage Called ');
this.languageService.getViewElements('login').subscribe(
response => {
console.log('Received >> ', response );
console.log('Language Code : ', response.language);
console.log('Component Name : ',response.component);
console.log('Language data : ',response.data);
//console.log('Received >> ', response );
//console.log('Language Code : ', response.language);
//console.log('Component Name : ',response.component);
//console.log('Language data : ',response.data);
this.vE.loginLastBlock = response.data.login_last_block;
this.vE.loginConnectToZGo = response.data.login_connect_to_zgo;

View file

@ -13,7 +13,7 @@ export class NodeResolverService implements Resolve<any> {
constructor(private fullnode: FullnodeService) {}
resolve(route: ActivatedRouteSnapshot): Observable<any> {
console.log('Called getAddr in resolver...', route);
//console.log('Called getAddr in resolver...', route);
return this.fullnode.getAddr().pipe(
catchError(() => {
return of('No data');

View file

@ -150,7 +150,7 @@ export class OrderComponent implements OnInit{
const dialogRef = this.dialog.open(CancelComponent, dialogConfig);
dialogRef.afterClosed().subscribe((val) => {
if (val) {
console.log('Canceling');
//console.log('Canceling');
this.orderService.cancelOrder(this.order._id!).subscribe((response) => {
this.orderService.getOrder();
this.notifierService
@ -159,9 +159,10 @@ export class OrderComponent implements OnInit{
'success',
this.vE.orderNotservSuccess);
});
} else {
console.log('Returning to page');
}
//else {
//console.log('Returning to page');
//}
this.orderService.getOrder();
this.oLines = [];
});
@ -215,7 +216,7 @@ export class OrderComponent implements OnInit{
orderId: this.order._id
};
console.log ('order_id : ' + this.order._id);
//console.log ('order_id : ' + this.order._id);
const dialogRef = this.dialog.open(PromptInvoiceComponent, dialogConfig);
dialogRef.afterClosed().subscribe((val) => {
@ -276,13 +277,13 @@ export class OrderComponent implements OnInit{
}
chgUILanguage(){
console.log('ORDER.chgUILanguage Called ');
this.languageService.getViewElements('order').subscribe(
response => {
console.log('Received >> ', response );
console.log('Language Code : ', response.language);
console.log('Component Name : ',response.component);
console.log('Language data : ',response.data);
//console.log('ORDER.chgUILanguage Called ');
this.languageService.getViewElements('order').subscribe({
next: response => {
//console.log('Received >> ', response );
//console.log('Language Code : ', response.language);
//console.log('Component Name : ',response.component);
//console.log('Language data : ',response.data);
this.vE.orderNoOpenorder = response.data.order_no_openorder;
this.vE.orderCancelOrder = response.data.order_cancel_order;
@ -302,8 +303,8 @@ export class OrderComponent implements OnInit{
this.vE.orderCheckoutBtn = response.data.order_checkout_btn;
},
error => { console.log('Error >> ',error); }
);
error: error => { console.log('Error >> ',error); }
});
}
}

View file

@ -101,10 +101,10 @@ export class UserService{
let obs = this.http.get<{message: string, user: any}>(this.beUrl+'api/user', { headers: this.reqHeaders, params: params, observe: 'response'});
obs.subscribe((UserDataResponse) => {
console.log(UserDataResponse.status);
//console.log(UserDataResponse.status);
if (UserDataResponse.status == 200){
this.dataStore.user = UserDataResponse.body!.user;
console.log(`US: Found user, returning it`);
//console.log(`US: Found user, returning it`);
this._uZaddrUpdated.next(Object.assign({},this.dataStore).user.address);
this._userUpdated.next(Object.assign({}, this.dataStore).user);
this.getOwner(Object.assign({},this.dataStore.user).address);
@ -118,7 +118,7 @@ export class UserService{
};
this._uZaddrUpdated.next(Object.assign({},this.dataStore).user.address);
this._userUpdated.next(Object.assign({}, this.dataStore).user);
console.log('US: Did not find user');
//console.log('US: Did not find user');
}
});
@ -168,7 +168,7 @@ export class UserService{
}
getOwner(address: string) {
console.log('getOwner', address);
//console.log('getOwner', address);
const ownParams = new HttpParams().append('address', address).append('session', this.session!);
let obs = this.http.get<{message:string, owner: any}>(this.beUrl+'api/owner', { headers: this.reqHeaders, params: ownParams, observe: 'response'});

View file

@ -148,7 +148,7 @@ export class ViewerComponent implements OnInit {
this.user = user;
//console.log('Viewer loginCheck', this.user);
if (!this.owner.paid || !this.user.validated) {
console.log('Log in expired!');
//console.log('Log in expired!');
this.router.navigate(['/login']);
}
});
@ -156,18 +156,18 @@ export class ViewerComponent implements OnInit {
}
chgUILanguage(){
console.log('VIEWER.chgUILanguage Called ');
this.languageService.getViewElements('viewer').subscribe(
response => {
console.log('Received >> ', response );
console.log('Language Code : ', response.language);
console.log('Component Name : ',response.component);
console.log('Language data : ',response.data);
//console.log('VIEWER.chgUILanguage Called ');
this.languageService.getViewElements('viewer').subscribe({
next: response => {
//console.log('Received >> ', response );
//console.log('Language Code : ', response.language);
//console.log('Component Name : ',response.component);
//console.log('Language data : ',response.data);
this.vE.viewerViewOrders = response.data.viewer_view_orders;
},
error => { console.log('Error >> ',error); }
);
error: error => { console.log('Error >> ',error); }
});
}
}