Login API
parent
7a58598b2c
commit
a787f6797d
@ -1,18 +1,19 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
||||
{
|
||||
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule',
|
||||
data: { preload: true, delay: 1000 }
|
||||
},
{ path: 'sms-page', loadChildren: './authentication/sms-page/sms-page.module#SmsPagePageModule' }
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'authentication/login', pathMatch: 'full' },
|
||||
{
|
||||
path: 'authentication', loadChildren: './authentication/authentication.module#AuthenticationPageModule',
|
||||
data: { preload: true, delay: 1000 }
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule { }
|
||||
|
||||
@ -0,0 +1,112 @@
|
||||
/*
|
||||
header
|
||||
*/
|
||||
.menu-header {
|
||||
height: 2.5cm;
|
||||
}
|
||||
|
||||
.content-ios:not([no-bounce]) > .scroll-content::before {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.menu-header .logo {
|
||||
position: absolute;
|
||||
left: 0.6cm;
|
||||
top: 0.9cm;
|
||||
width: 1.6cm;
|
||||
}
|
||||
|
||||
.menu-header .background {
|
||||
height: 1.5cm;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* title */
|
||||
.title-v-spacer {
|
||||
height: 0.7cm;
|
||||
}
|
||||
|
||||
.suliman-title {
|
||||
margin-left: 0.3cm;
|
||||
margin-right: 0.3cm;
|
||||
font-weight: bold;
|
||||
font-size: 0.5cm;
|
||||
}
|
||||
|
||||
.group-title {
|
||||
margin-left: 0.4cm;
|
||||
margin-right: 0.4cm;
|
||||
font-size: 0.4cm;
|
||||
}
|
||||
|
||||
/*
|
||||
items
|
||||
*/
|
||||
.items-buttons-spacer {
|
||||
height: 10%;
|
||||
}
|
||||
/*
|
||||
user information
|
||||
*/
|
||||
.user-v-spacer {
|
||||
height: 0.5cm;
|
||||
}
|
||||
|
||||
.user-name-title {
|
||||
margin-left: 0.3cm;
|
||||
margin-right: 0.3cm;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.file-id-title {
|
||||
margin-left: 0.4cm;
|
||||
margin-right: 0.4cm;
|
||||
}
|
||||
|
||||
.social-media-container {
|
||||
position: absolute !important;
|
||||
width: 100%;
|
||||
bottom: 0.2cm;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.icon-spacer {
|
||||
margin-right: 0.3cm;
|
||||
margin-left: 0.3cm;
|
||||
}
|
||||
|
||||
/*mobile Landscape */
|
||||
@media only screen and (min-device-height: 0px) and (max-device-height: 515px) and (orientation: landscape) {
|
||||
.social-media-container {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.info-container {
|
||||
overflow-y: scroll;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 2.6cm;
|
||||
bottom: 0.2cm;
|
||||
padding-bottom: 4.5cm;
|
||||
}
|
||||
|
||||
@media only screen and (orientation: landscape) {
|
||||
.info-container {
|
||||
padding-bottom: 0.2cm;
|
||||
}
|
||||
}
|
||||
|
||||
.member {
|
||||
border-bottom-color: var(--ion-color-medium) !important;
|
||||
border-bottom-width: 0.02cm;
|
||||
border-bottom-style: solid;
|
||||
/* margin-left: 0.4cm; */
|
||||
}
|
||||
|
||||
.selected-member {
|
||||
border-bottom-color: var(--ion-color-secondary) !important;
|
||||
border-bottom-width: 0.02cm;
|
||||
border-bottom-style: solid;
|
||||
margin-left: 0.2cm;
|
||||
}
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { SmsPagePage } from './sms-page.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'smspage',
|
||||
component: SmsPagePage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes)
|
||||
],
|
||||
declarations: [SmsPagePage]
|
||||
})
|
||||
export class SmsPagePageModule {}
|
||||
@ -0,0 +1,36 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>{{'verificationcode.verificationcode' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content padding>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col class="colPad">
|
||||
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<p class="centerDiv">{{'verificationcode.title' | translate}}<span class="boldTxtNav">{{'verificationcode.verificationcode' | translate}}</span> {{'verificationcode.by' | translate}}<span class="boldTxtNav">{{'verificationcode.sms' | translate}}</span>{{'verificationcode.instruct' | translate}}<span class="boldTxtNav">{{'general.submit' | translate}}</span></p>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<br/><br/>
|
||||
<!-- <p style="color: #c0c0c0; margin-left: 32%">{{'verificationcode.verificationcode' | translate}}</p> -->
|
||||
<div>
|
||||
<h1 text-center>{{displayTime}}</h1>
|
||||
<br/><br/>
|
||||
<ion-item>
|
||||
<ion-label>{{'verificationcode.verificationcode' | translate}}</ion-label>
|
||||
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
|
||||
<ion-input required type="tel" [(ngModel)]="activationCode"></ion-input>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<button ion-button (click)="checkVerificationCode()">{{'general.submit' | translate}}</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
@ -0,0 +1,27 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SmsPagePage } from './sms-page.page';
|
||||
|
||||
describe('SmsPagePage', () => {
|
||||
let component: SmsPagePage;
|
||||
let fixture: ComponentFixture<SmsPagePage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ SmsPagePage ],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SmsPagePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,38 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ElementRef} from '@angular/core';
|
||||
import { NavController } from '@ionic/angular';
|
||||
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
||||
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
||||
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
|
||||
@Component({
|
||||
selector: 'app-sms-page',
|
||||
templateUrl: './sms-page.page.html',
|
||||
styleUrls: ['./sms-page.page.scss'],
|
||||
})
|
||||
export class SmsPagePage implements OnInit {
|
||||
|
||||
Channel: number=0;
|
||||
activationCode: string;
|
||||
P_SESSION_ID: number;
|
||||
timeInSeconds: any;
|
||||
time:any;
|
||||
runTimer:any;
|
||||
hasStarted: any;
|
||||
hasFinished: any;
|
||||
remainingTime:any;
|
||||
displayTime:any;
|
||||
loginTokenID:string;
|
||||
public isForgetPwd:boolean=false;
|
||||
public isExpiredPwd:boolean=false;
|
||||
public count:number=0;
|
||||
|
||||
constructor(public navCtrl: NavController,
|
||||
public translate: TranslatorService,
|
||||
public common:CommonService,
|
||||
private elementRef:ElementRef,
|
||||
public sharedData:SharedDataService) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,10 +1,14 @@
|
||||
import { Request } from '../../models/request';
|
||||
|
||||
export class CheckUserAuthenticationRequest extends Request {
|
||||
PatientIdentificationID: string; // id
|
||||
PatientMobileNumber: string; // phone number
|
||||
ZipCode: string;
|
||||
SearchType: number; // 1 for id , 2 for file no
|
||||
isRegister: boolean; // false
|
||||
LogInTokenID?: string;
|
||||
// PatientIdentificationID: string; // id
|
||||
// PatientMobileNumber: string; // phone number
|
||||
// ZipCode: string;
|
||||
// SearchType: number; // 1 for id , 2 for file no
|
||||
// isRegister: boolean; // false
|
||||
// LogInTokenID?: string;
|
||||
|
||||
P_USER_NAME:string;
|
||||
P_LANGUAGE: string;
|
||||
P_PASSWORD: string;
|
||||
}
|
||||
|
||||
@ -1,51 +1,36 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>{{'sms,title' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar>
|
||||
<ion-title>{{'verificationcode.verificationcode' | translate}}</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content padding>
|
||||
<ion-grid>
|
||||
<!-- identification number / file id -->
|
||||
|
||||
<ion-row class="ion-justify-content-center">
|
||||
<img src="assets/icon/verification-code.png" style="width: 25%;height: 35%;" />
|
||||
</ion-row>
|
||||
|
||||
<ion-row class="ion-justify-content-center" >
|
||||
<ion-text text-center>
|
||||
<h6>{{ 'home,verification-code-text'| translate}}</h6>
|
||||
</ion-text>
|
||||
<ion-text text-center>
|
||||
<h6>{{mobile}}</h6>
|
||||
</ion-text>
|
||||
</ion-row>
|
||||
<ion-row class="sms_code">
|
||||
<ion-col [size]="12">
|
||||
<ion-label class="input-label" >{{ 'h2o,verification_message' | translate}}</ion-label>
|
||||
<ion-input class="input_bottom" [placeholder]="'h2o,sms_code' | translate" [(ngModel)]="smc_code" pattern="number"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<!-- international mobile number-->
|
||||
<ion-row class="timer-body" >
|
||||
<ion-col [size]="9">
|
||||
<ion-label class="input-label" >{{ 'h2o,validation_message' | translate}}</ion-label>
|
||||
</ion-col>
|
||||
<ion-col [size]="3">
|
||||
<ion-label class="input-label-strong" > {{displayTime}} </ion-label>
|
||||
</ion-col>
|
||||
<ion-content padding>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col class="colPad">
|
||||
<ion-img class="centerDiv" src="../assets/imgs/CS.png"></ion-img>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row *ngIf="resend" >
|
||||
<ion-col [size]="8" >
|
||||
<p> {{'h2o,code_failure' | translate}} </p>
|
||||
</ion-col>
|
||||
<ion-col [size]="4" class="resend-coloumn" >
|
||||
<ion-button (click)="ResendOTP()"> {{'h2o,resend' | translate}} </ion-button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row class="ion-justify-content-center bottom-grid" >
|
||||
<ion-col [size]="12" >
|
||||
<ion-button (click)="validate()" expand="full"> {{'general,submit' | translate}} </ion-button>
|
||||
</ion-col>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<p class="centerDiv">{{'verificationcode.title' | translate}}<span class="boldTxtNav">{{'verificationcode.verificationcode' | translate}}</span> {{'verificationcode.by' | translate}}<span class="boldTxtNav">{{'verificationcode.sms' | translate}}</span>{{'verificationcode.instruct' | translate}}<span class="boldTxtNav">{{'general.submit' | translate}}</span></p>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-content>
|
||||
</ion-grid>
|
||||
<br/><br/>
|
||||
<!-- <p style="color: #c0c0c0; margin-left: 32%">{{'verificationcode.verificationcode' | translate}}</p> -->
|
||||
<div>
|
||||
<h1 text-center>{{displayTime}}</h1>
|
||||
<br/><br/>
|
||||
<ion-item>
|
||||
<ion-label>{{'verificationcode.verificationcode' | translate}}</ion-label>
|
||||
<!-- <img class="item-icon" src="assets/imgs/password.png" item-start /> -->
|
||||
<ion-input required type="tel" [(ngModel)]="activationCode"></ion-input>
|
||||
</ion-item>
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer>
|
||||
<div class="centerDiv">
|
||||
<button ion-button (click)="checkVerificationCode()">{{'general.submit' | translate}}</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
Loading…
Reference in New Issue