diff --git a/src/app/pages/register/register.page.html b/src/app/pages/register/register.page.html
index 272b5dd..cff9d00 100644
--- a/src/app/pages/register/register.page.html
+++ b/src/app/pages/register/register.page.html
@@ -16,11 +16,7 @@
{{item.country}}
-
-
-
-
@@ -46,11 +42,6 @@
-
-
-
-
-
Register
@@ -100,18 +91,27 @@
{{signup_username}}
- Enter Confirmation Received In Email
+ Enter Confirmation Received In Email
+
-
+
-
+
-
- Complete signup
+
+
+ Complete Signup
diff --git a/src/app/pages/register/register.page.ts b/src/app/pages/register/register.page.ts
index 06f83e1..4afd6ac 100644
--- a/src/app/pages/register/register.page.ts
+++ b/src/app/pages/register/register.page.ts
@@ -1,10 +1,11 @@
import { Router } from '@angular/router';
import {Component, OnInit, ViewChild} from '@angular/core';
-import {ToastController} from "@ionic/angular";
+import {LoadingController, ToastController} from "@ionic/angular";
import {NavController} from "@ionic/angular";
import { WrenchService } from 'src/app/services/wrench.service';
import {SessionDataProviderService} from "../../store/session-data-provider.service";
import { environment} from "../../../environments/environment";
+import {FamilyDataService} from "../../store/family-data.service";
@Component({
selector: 'app-register',
@@ -21,6 +22,7 @@ export class RegisterPage implements OnInit {
@ViewChild('random_text') random_text;
isDisabled:boolean=true;
+ isDisabled2:boolean=true;
pending_uid:string = '';
signup_state:number = 1;
@@ -55,6 +57,7 @@ export class RegisterPage implements OnInit {
private router: Router,
private toastController: ToastController,
private navctr: NavController,
+ private loadingCtrl: LoadingController,
public sessionDataProviderService: SessionDataProviderService,
private wrenchService: WrenchService
) {
@@ -104,7 +107,19 @@ export class RegisterPage implements OnInit {
}
}
- onFillProfile() {
+
+ verReg2(){
+ this.isDisabled2= true;
+ if (this.password != null && this.password != '' && this.password.length> 6
+ && this.random_text != null && this.random_text != '' && this.random_text.length>4
+ ) {
+ this.isDisabled2= false;
+ }else{
+ this.isDisabled2=true;
+ }
+ }
+
+ async onFillProfile() {
if (this.username == null || this.username == '' || this.validateEmail(this.username) == false
|| this.password == null || this.password == ''
|| this.firstname == null || this.firstname == ''
@@ -114,6 +129,10 @@ export class RegisterPage implements OnInit {
this.presentToast('Missing Required Inputs', 'middle');
return;
}
+ const loading = await this.loadingCtrl.create({
+ message: 'Registering...',
+ duration: 7500,
+ });
this.signupData= {
action:11010,
@@ -128,9 +147,10 @@ export class RegisterPage implements OnInit {
sessionid: "SSSSS-SSSSSS-SSSSSS"
};
this.pending_uid = "";
-
+ loading.present();
this.wrenchService.createUser(this.signupData).subscribe(
signUpResult => {
+ loading.dismiss();
this.signUpResult = signUpResult;
console.log("signUpResult RETURN->", this.signUpResult);
@@ -140,39 +160,9 @@ export class RegisterPage implements OnInit {
this.signup_username = this.signUpResult.username;
this.random_text = '';
this.signup_state =2;
-
- /*
- {
- "action": "11010",
- "added": "2023-08-22 19:28:05.991937",
- "country": "NG",
- "email": "ses66181+x1234@gmail.com",
- "expire": "2023-09-21 19:28:05.991937",
- "firstname": "Olu",
- "id": "610",
- "lastname": "Ameye",
- "loc": "10.10.33.15",
- "mobile": "MOBILE",
- "news": "1",
- "password": "d0fbea2563b377ea7074bced45c88dcb",
- "pending_id": "610",
- "phone": "",
- "pid": "100",
- "sessionid": "SSSSS-SSSSSS-SSSSSS",
- "signup_random": "13635",
- "status": "1",
- "street1": "",
- "terms": "1",
- "uid": "07529070-79a6-4e34-835d-a3a50283e93d",
- "username": "ses66181+x1234@gmail.com",
- "verify_link": "WRENCHB-1176229640-1742094704-417159648",
- "zipcode": "",
- "internal_return": 610
-}
- */
}
else {
- this.presentToast('Unable to continue with this params', 'middle');
+ this.presentToast('Unable to continue with this parameters', 'middle');
}
}
);