Pages added

This commit is contained in:
CHIEFSOFT\ameye
2024-09-05 12:20:09 -04:00
parent ee00aac1ee
commit 5a1cdb2bec
9 changed files with 139 additions and 5 deletions
+5
View File
@@ -298,6 +298,11 @@ const routes: Routes = [
path: 'familyconnectaction',
loadChildren: () => import('./pages/familyconnectaction/familyconnectaction.module').then(m => m.FamilyconnectactionPageModule)
},
{
path: 'startlogin',
loadChildren: () => import('./pages/startlogin/startlogin.module').then(m => m.StartloginPageModule)
},
+6 -4
View File
@@ -187,7 +187,7 @@ export class RegisterPage implements OnInit {
this.signup_state =2;
}
else {
this.presentToast('Unable to continue with this parameters', 'middle');
this.presentToast('Unable to continue with this username. Please try to login or another username', 'middle', 4500);
}
}
);
@@ -238,7 +238,9 @@ export class RegisterPage implements OnInit {
}
else{
this.signup_state =2; // maintain this
this.showAlert("Sign up error","Unable to complete the sign up, please try again");
// this.showAlert("Sign up error","Unable to complete the sign up, please try again");
this.presentToast('Unable to complete the sign up, please try again', 'middle', 4500);
}
}
);
@@ -265,10 +267,10 @@ export class RegisterPage implements OnInit {
var re = /\S+@\S+\.\S+/;
return re.test(email);
}
async presentToast(amessage, position: 'top' | 'middle' | 'bottom') {
async presentToast(amessage, position: 'top' | 'middle' | 'bottom', duration: number= 2500) {
const toast = await this.toastController.create({
message: amessage,
duration: 1500,
duration: duration,
position: position,
});
+1 -1
View File
@@ -18,7 +18,7 @@ export class SliderPage implements OnInit {
}
onRegister() {
this.router.navigate(['login']);
this.router.navigate(['startlogin']);
}
signupCountry:any;
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { StartloginPage } from './startlogin.page';
const routes: Routes = [
{
path: '',
component: StartloginPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class StartloginPageRoutingModule {}
@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { StartloginPageRoutingModule } from './startlogin-routing.module';
import { StartloginPage } from './startlogin.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
StartloginPageRoutingModule
],
declarations: [StartloginPage]
})
export class StartloginPageModule {}
@@ -0,0 +1,41 @@
<ion-content class="no-scroll" style="padding: 0;">
<div class="start-pages" >
<div class="page_logo">
<img alt="WrenchBoard" src="/assets/images/wrenchboard-line.png" />
</div>
<div class="login_box">
<div style="display: flex; width: 100%">
<div style="width: 50%; text-align: center;">
<div style="max-width: 135px; background-color: #e4f2ff; text-align: center; margin: auto; border-radius: 10px; padding: 10px;" (click)="startLogin()">
<ion-avatar style="margin: auto;">
<img alt="Silhouette of a person's head" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
</ion-avatar>
<div style="padding: 10px;">Parent</div>
</div>
</div>
<div style="width: 50%; text-align: center;">
<div style="max-width: 135px; background-color: #e4f2ff; text-align: center; margin: auto; border-radius: 10px; padding: 10px;" (click)="familyLogin()">
<ion-avatar style="margin: auto;">
<img alt="Silhouette of a person's head" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
</ion-avatar>
<div style="padding: 10px;">Kids Login</div>
</div>
</div>
</div>
</div>
<ion-grid>
<ion-row>
<ion-col>
.
</ion-col>
<ion-col>
.
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-content>
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { StartloginPage } from './startlogin.page';
describe('StartloginPage', () => {
let component: StartloginPage;
let fixture: ComponentFixture<StartloginPage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ StartloginPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(StartloginPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,25 @@
import { Component, OnInit } from '@angular/core';
import {WrenchService} from "../../services/wrench.service";
import {Router} from "@angular/router";
@Component({
selector: 'app-startlogin',
templateUrl: './startlogin.page.html',
styleUrls: ['./startlogin.page.scss'],
})
export class StartloginPage implements OnInit {
constructor( private wrenchService: WrenchService,
private router: Router) { }
ngOnInit() {
}
familyLogin(){
this.router.navigate(['familylogin']);
}
startLogin()
{
this.router.navigate(['login']);
}
}