diff --git a/src/app/pages/notification/notification.page.html b/src/app/pages/notification/notification.page.html
index e0f99e6..9c2ee80 100644
--- a/src/app/pages/notification/notification.page.html
+++ b/src/app/pages/notification/notification.page.html
@@ -1,11 +1,3 @@
-
@@ -18,7 +10,7 @@
- Notification
+ Notifications
diff --git a/src/app/pages/profile/profile.page.html b/src/app/pages/profile/profile.page.html
index a677dea..4f8dd24 100644
--- a/src/app/pages/profile/profile.page.html
+++ b/src/app/pages/profile/profile.page.html
@@ -31,7 +31,7 @@
- Notification
+ Notifications
diff --git a/src/app/pages/register/register.page.html b/src/app/pages/register/register.page.html
index 27d3d5a..92d6f33 100644
--- a/src/app/pages/register/register.page.html
+++ b/src/app/pages/register/register.page.html
@@ -11,24 +11,24 @@
-
+
-
+
-
+
-
+
diff --git a/src/app/pages/register/register.page.ts b/src/app/pages/register/register.page.ts
index d166d1d..b081ee5 100644
--- a/src/app/pages/register/register.page.ts
+++ b/src/app/pages/register/register.page.ts
@@ -1,13 +1,6 @@
-/*
- Authors : initappz (Rahul Jograna)
- Website : https://initappz.com/
- App Name : E-Learning App Template
- This App Template Source code is licensed as per the
- terms found in the Website https://initappz.com/license
- Copyright and Good Faith Purchasers © 2021-present initappz.
-*/
import { Router } from '@angular/router';
-import { Component, OnInit } from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
+import {ToastController} from "@ionic/angular";
@Component({
selector: 'app-register',
@@ -15,10 +8,29 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./register.page.scss'],
})
export class RegisterPage implements OnInit {
-
+ @ViewChild('username') username;
+ @ViewChild('password') password;
+ @ViewChild('firstname') firstname;
+ @ViewChild('lastname') lastname;
+ @ViewChild('country') country;
+ /*
+ 'firstname': 'OluNG' ,
+ 'lastname': 'AmeyNG' ,
+ 'email': 'ameye+aug6160@chiefsoft.com' ,
+ 'username': 'ameye+aug6160@chiefsoft.com' ,
+ 'password': 'may12002' ,
+ 'terms' => 1,
+ 'news' => int 1
+ 'loc': '38.101.241.200' ,
+ 'country': 'NG' ,
+ 'action' => 11010
+ */
constructor(
- private router: Router
- ) { }
+ private router: Router,
+ private toastController: ToastController
+ ) {
+
+ }
ngOnInit() {
}
@@ -28,7 +40,39 @@ export class RegisterPage implements OnInit {
}
onFillProfile() {
- this.router.navigate(['fill-profile']);
- }
+ //debugger;
+
+ if (this.username == null || this.username == '' || this.validateEmail(this.username) == false
+ || this.password == null || this.password == ''
+ || this.firstname == null || this.firstname == ''
+ || this.lastname == null || this.lastname == '') {
+ this.presentToast('Missing Required Inputs', 'middle');
+ return;
+ }
+ //this.router.navigate(['fill-profile']);
+ alert("WE CALL API NOW");
+ }
+ showAlert(mtitle: string, amessage: string) {
+ /* let alert = this.alertCtrl.create({
+ title: mtitle,
+ subTitle: amessage,
+ buttons: ['OK']
+ });
+ alert.present();*/
+ alert(amessage);
+ }
+ validateEmail(email) {
+ var re = /\S+@\S+\.\S+/;
+ return re.test(email);
+ }
+ async presentToast(amessage, position: 'top' | 'middle' | 'bottom') {
+ const toast = await this.toastController.create({
+ message: amessage,
+ duration: 1500,
+ position: position,
+ });
+
+ await toast.present();
+ }
}