diff --git a/src/app/accounts/addbank/addbank.page.ts b/src/app/accounts/addbank/addbank.page.ts index 45c42fc..473e4e3 100644 --- a/src/app/accounts/addbank/addbank.page.ts +++ b/src/app/accounts/addbank/addbank.page.ts @@ -1,5 +1,5 @@ import {Component, OnInit, ViewChild} from '@angular/core'; -import {AlertController, NavController} from "@ionic/angular"; +import {AlertController, NavController, ToastController} from "@ionic/angular"; import {Router} from "@angular/router"; import {SessionDataProviderService} from "../../store/session-data-provider.service"; import {WrenchService} from "../../services/wrench.service"; @@ -23,7 +23,9 @@ export class AddbankPage implements OnInit { private router: Router, public sessionDataProviderService: SessionDataProviderService, private wrenchService: WrenchService, - private alertController: AlertController) + private alertController: AlertController, + private toastController: ToastController + ) { } @@ -137,14 +139,23 @@ export class AddbankPage implements OnInit { this.accountAddResult = accountAddResult; console.log("accountAddResult RETURN->", this.accountAddResult); if ( this.accountAddResult.internal_return != undefined && this.accountAddResult.internal_return > 0 ){ - + this.presentToast("Recipient Accound Added",'middle'); setTimeout(() => { this.onBack(); - }, 4000); + }, 3000); } } ); } + async presentToast(message, position: 'top' | 'middle' | 'bottom') { + const toast = await this.toastController.create({ + message: message, + duration: 1500, + position: position, + }); + + await toast.present(); + } } diff --git a/src/app/pages/forgot/forgot.page.ts b/src/app/pages/forgot/forgot.page.ts index 62be3a5..870d072 100644 --- a/src/app/pages/forgot/forgot.page.ts +++ b/src/app/pages/forgot/forgot.page.ts @@ -3,6 +3,7 @@ import {Component, OnInit, ViewChild} from '@angular/core'; import { WrenchService } from 'src/app/services/wrench.service'; import { SessionDataProviderService } from 'src/app/store/session-data-provider.service'; import { BlogDataService } from 'src/app/store/blog-data.service'; +import {AlertController} from "@ionic/angular"; @Component({ selector: 'app-forgot', @@ -22,7 +23,8 @@ export class ForgotPage implements OnInit { private router: Router, private wrenchService: WrenchService, public sessionDataProviderService:SessionDataProviderService, - public blogDataService:BlogDataService + public blogDataService:BlogDataService, + public alertController: AlertController ) { } @@ -39,7 +41,7 @@ export class ForgotPage implements OnInit { this.reset_uid = ''; this.m_uid = ''; if (this.username == null || this.username == '' || this.validateEmail(this.username) == false) { - this.showAlert('Invalid Login', 'Enter username(email) to continue'); + this.showAlert('Error', 'Enter username(email) to continue'); return; } @@ -105,7 +107,7 @@ export class ForgotPage implements OnInit { onCompleteReset(){ if (this.username == null || this.username == '' || this.validateEmail(this.username) == false) { - this.showAlert('Invalid Login', 'Enter username(email) to continue'); + this.showAlert('Error', 'Enter username(email) to continue'); return; } @@ -161,13 +163,23 @@ export class ForgotPage implements OnInit { return re.test(email); } - showAlert(mtitle: string, amessage: string) { - /* let alert = this.alertCtrl.create({ - title: mtitle, - subTitle: amessage, - buttons: ['OK'] - }); - alert.present();*/ - alert(amessage); - } + async showAlert(mtitle: string, amessage: string) { + + const alert = await this.alertController.create({ + header: 'WrenchBoard', + subHeader: mtitle, + message: amessage, + buttons: ['OK'], + }); + + await alert.present(); + // + // let alert = this.alertCtrl.create({ + // title: mtitle, + // subTitle: amessage, + // buttons: ['OK'] + // }); + // alert.present(); + // // alert(amessage); + } } diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index 44b8e8c..0150d5f 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -43,12 +43,12 @@ Login to continue - + - +
@@ -56,7 +56,10 @@ Remember me
- + Login diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 15072cb..3c85bcc 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -35,6 +35,7 @@ export class LoginPage implements OnInit { state: any; ios: boolean; android: boolean; + isDisabled:boolean=true; constructor( private router: Router, @@ -86,6 +87,17 @@ getBlogData(){ ); } + refreshBut(){ + this.isDisabled = true; + if ( + this.username != undefined + && this.password !=undefined + && String(this.username).length > 5 + && String(this.password).length > 5 + ){ + this.isDisabled = false; + } + } loginData: { username: string, password: string, sessionid: string }; diff --git a/src/app/pages/mycoupons/mycoupons.page.html b/src/app/pages/mycoupons/mycoupons.page.html index 5beabc8..ac50141 100644 --- a/src/app/pages/mycoupons/mycoupons.page.html +++ b/src/app/pages/mycoupons/mycoupons.page.html @@ -69,15 +69,16 @@
-
+
{{item.amount*0.01| number : '1.2-2'}} {{item.currency}} - {{item.code}} - {{item.added}} + ID: {{item.code}} + Added:{{item.added}}
- Redeem + Redeem
@@ -97,11 +98,13 @@
-
+
{{item.amount*0.01| number : '1.2-2'}} {{item.currency}} - {{item.code}} - {{item.added}} + ID: {{item.code}} + Added:{{item.added |date}} + Redeemed:{{item.active | date}}
diff --git a/src/app/pages/mycoupons/mycoupons.page.scss b/src/app/pages/mycoupons/mycoupons.page.scss index b505c32..76d65e7 100644 --- a/src/app/pages/mycoupons/mycoupons.page.scss +++ b/src/app/pages/mycoupons/mycoupons.page.scss @@ -174,6 +174,11 @@ ion-card{ .grey_text { font-size: 14px; color: grey; + .lbc{ + font-weight: bolder; + color: #4e4e89; + margin-right: 5px; + } } } }