coupon page

This commit is contained in:
CHIEFSOFT\ameye
2023-10-21 15:27:50 -04:00
parent 2f27f8f55e
commit 5eb5c65128
6 changed files with 70 additions and 24 deletions
+24 -12
View File
@@ -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);
}
}