From 90584b39c304b4fb7d987f6e4446705c804e9d1a Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 16 Nov 2023 06:12:10 -0500 Subject: [PATCH] pass reset --- .../pages/new-password/new-password.page.ts | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/app/pages/new-password/new-password.page.ts b/src/app/pages/new-password/new-password.page.ts index dbc8a6e..a076884 100644 --- a/src/app/pages/new-password/new-password.page.ts +++ b/src/app/pages/new-password/new-password.page.ts @@ -1,5 +1,5 @@ import { Router } from '@angular/router'; -import {LoadingController, NavController} from '@ionic/angular'; +import {AlertController, LoadingController, NavController} from '@ionic/angular'; import {Component, OnInit, ViewChild} from '@angular/core'; import {WrenchService} from "../../services/wrench.service"; import {SessionDataProviderService} from "../../store/session-data-provider.service"; @@ -19,7 +19,8 @@ export class NewPasswordPage implements OnInit { private router: Router, private wrenchService: WrenchService, public sessionDataProviderService:SessionDataProviderService, - private loadingCtrl: LoadingController + private loadingCtrl: LoadingController, + private alertController: AlertController ) { this.resetResult = this.router.getCurrentNavigation().extras.state; if ( this.resetResult != null @@ -64,7 +65,7 @@ export class NewPasswordPage implements OnInit { }); if (this.new_password.length < 8 || (this.new_password != this.confirm_new_password) ){ - this.showAlert('Error', 'Enter new password to continue, must be 8 or more alphanumeric'); + this.showAlert('Password Reset Error', 'Enter new password to continue, must be 8 or more alphanumeric'); return; } this.postData = { @@ -88,13 +89,13 @@ export class NewPasswordPage implements OnInit { } ); } - 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(); } }