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 @@