fix
This commit is contained in:
Generated
+3
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+30
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+9
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -3,11 +3,11 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "io.ionic.starter"
|
||||
applicationId "com.mermsemr.providers"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
versionCode 1013
|
||||
versionName "1.0.13"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.ionic.starter">
|
||||
package="com.mermsemr.providers">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||
android:name="io.ionic.starter.MainActivity"
|
||||
android:name="com.mermsemr.providers.MainActivity"
|
||||
android:label="@string/title_activity_main"
|
||||
android:theme="@style/AppTheme.NoActionBarLaunch"
|
||||
android:launchMode="singleTask">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"appId": "io.ionic.starter",
|
||||
"appName": "MermsProviders",
|
||||
"appId": "com.mermsemr.providers",
|
||||
"appName": "MERMS Providers",
|
||||
"bundledWebRuntime": false,
|
||||
"npmClient": "npm",
|
||||
"webDir": "www",
|
||||
|
||||
@@ -2,5 +2,18 @@
|
||||
<widget version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<access origin="*" />
|
||||
|
||||
<feature name="CordovaHttpPlugin">
|
||||
<param name="android-package" value="com.silkimen.cordovahttp.CordovaHttpPlugin"/>
|
||||
</feature>
|
||||
|
||||
<feature name="Device">
|
||||
<param name="android-package" value="org.apache.cordova.device.Device"/>
|
||||
</feature>
|
||||
|
||||
<feature name="File">
|
||||
<param name="android-package" value="org.apache.cordova.file.FileUtils"/>
|
||||
<param name="onload" value="true"/>
|
||||
</feature>
|
||||
|
||||
|
||||
</widget>
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.1'
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
#Sat Nov 14 00:09:57 EST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
|
||||
Generated
+1632
-883
File diff suppressed because it is too large
Load Diff
+12
-6
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "mermsproviders",
|
||||
"version": "10.0.1",
|
||||
"version": "10.0.11",
|
||||
"author": "Fluxtra LLC",
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"homepage": "https://www.mermsemr.com/",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
@@ -19,24 +19,30 @@
|
||||
"@angular/platform-browser": "~10.0.0",
|
||||
"@angular/platform-browser-dynamic": "~10.0.0",
|
||||
"@angular/router": "~10.0.0",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@capacitor/android": "^2.4.2",
|
||||
"@capacitor/core": "2.4.2",
|
||||
"@ionic-native/core": "^5.0.0",
|
||||
"@ionic-native/device": "^5.29.0",
|
||||
"@ionic-native/http": "^5.29.0",
|
||||
"@ionic-native/splash-screen": "^5.0.0",
|
||||
"@ionic-native/status-bar": "^5.0.0",
|
||||
"@ionic/angular": "^5.0.0",
|
||||
"rxjs": "~6.5.5",
|
||||
"@ionic/angular": "^5.4.4",
|
||||
"cordova-plugin-advanced-http": "^3.1.0",
|
||||
"cordova-plugin-device": "^2.0.3",
|
||||
"cordova-plugin-file": "^6.0.2",
|
||||
"rxjs": "^6.5.5",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.1000.0",
|
||||
"@angular-devkit/build-angular": "^0.1100.1",
|
||||
"@angular/cli": "~10.0.5",
|
||||
"@angular/compiler": "~10.0.0",
|
||||
"@angular/compiler-cli": "~10.0.0",
|
||||
"@angular/language-service": "~10.0.0",
|
||||
"@capacitor/cli": "2.4.2",
|
||||
"@ionic/angular-toolkit": "^2.3.0",
|
||||
"@ionic/angular-toolkit": "^2.3.3",
|
||||
"@types/jasmine": "~3.5.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.11.1",
|
||||
|
||||
@@ -19,6 +19,14 @@ const routes: Routes = [
|
||||
path: 'merms-signup',
|
||||
loadChildren: () => import('./merms-signup/merms-signup.module').then( m => m.MermsSignupPageModule)
|
||||
},
|
||||
{
|
||||
path: 'merms-dash',
|
||||
loadChildren: () => import('./merms-dash/merms-dash.module').then( m => m.MermsDashPageModule)
|
||||
},
|
||||
{
|
||||
path: 'merms-settings',
|
||||
loadChildren: () => import('./merms-settings/merms-settings.module').then( m => m.MermsSettingsPageModule)
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -6,13 +6,19 @@ import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
||||
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
||||
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
||||
|
||||
//import { HttpModule } from '@angular/http'
|
||||
import { HTTP } from '@ionic-native/http/ngx';
|
||||
import { HttpClientModule } from '@angular/common/http'
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
entryComponents: [],
|
||||
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
|
||||
imports: [BrowserModule, IonicModule.forRoot(),
|
||||
HttpClientModule,
|
||||
AppRoutingModule],
|
||||
providers: [
|
||||
StatusBar,
|
||||
SplashScreen,
|
||||
|
||||
@@ -17,6 +17,7 @@ export class HomePage {
|
||||
}
|
||||
|
||||
goToLogin() {
|
||||
// alert(0);
|
||||
this.router.navigateByUrl('/merms-login')
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { MermsDashPage } from './merms-dash.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MermsDashPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class MermsDashPageRoutingModule {}
|
||||
@@ -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 { MermsDashPageRoutingModule } from './merms-dash-routing.module';
|
||||
|
||||
import { MermsDashPage } from './merms-dash.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
MermsDashPageRoutingModule
|
||||
],
|
||||
declarations: [MermsDashPage]
|
||||
})
|
||||
export class MermsDashPageModule {}
|
||||
@@ -0,0 +1,167 @@
|
||||
<ion-content fullscreen>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div>
|
||||
<h2>{{ welcomeName }}</h2>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div style="text-align: right;"> <h4>{{ currentDateFormated }}</h4></div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row style="height: 80px;">
|
||||
<ion-col style="background-color:ivory">
|
||||
<div>.</div>
|
||||
</ion-col>
|
||||
<ion-col style="background-color:honeydew">
|
||||
<div>.</div>
|
||||
</ion-col>
|
||||
<ion-col style="background-color: aquamarine;">
|
||||
<div>.</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
Pending Encounter
|
||||
</ion-list-header>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Adekunle Gold</h2>
|
||||
<h3>Need hew head</h3>
|
||||
<p>10/10/2050, 9:30 AM Male , 54 yrs</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Janet Jackson</h2>
|
||||
<h3>Want to escape from the planet</h3>
|
||||
<p>10/10/2050, 10:30 AM Female , 34 yrs</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Rey</h2>
|
||||
<h3>I can handle myself</h3>
|
||||
<p>You will remove these restraints and leave...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Luke</h2>
|
||||
<h3>Your thoughts betray you</h3>
|
||||
<p>I feel the good in you, the conflict...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
Recent Encounter
|
||||
</ion-list-header>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Poe</h2>
|
||||
<h3>New Ride</h3>
|
||||
<p>I just upgraded my X-Wing. Next time...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Ben</h2>
|
||||
<h3>Move Along</h3>
|
||||
<p>These aren't the droids you're looking for...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Leia</h2>
|
||||
<h3>You're My Only Hope</h3>
|
||||
<p>I've placed information vital to the survival...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-avatar slot="start">
|
||||
<img src="./../../assets/imgs/avatar.svg">
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<h2>Yoda</h2>
|
||||
<h3>Size matters not</h3>
|
||||
<p>Do or do not. There is no try...</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
<!-- Footer without a border -->
|
||||
<ion-footer class="ion-no-border">
|
||||
<ion-toolbar>
|
||||
<ion-grid style="font-size: 25px; text-align: center;">
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div>
|
||||
<ion-icon name="home"></ion-icon>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div>
|
||||
<ion-icon name="grid"></ion-icon>
|
||||
</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div>[----]</div>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div>
|
||||
<ion-icon name="settings" (click)="goSettings()"></ion-icon>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { MermsDashPage } from './merms-dash.page';
|
||||
|
||||
describe('MermsDashPage', () => {
|
||||
let component: MermsDashPage;
|
||||
let fixture: ComponentFixture<MermsDashPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MermsDashPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MermsDashPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, NavigationExtras } from '@angular/router'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-merms-dash',
|
||||
templateUrl: './merms-dash.page.html',
|
||||
styleUrls: ['./merms-dash.page.scss'],
|
||||
})
|
||||
export class MermsDashPage implements OnInit {
|
||||
|
||||
currentDateFormated: string = '10/10/2020';
|
||||
welcomeName: string = '';
|
||||
|
||||
constructor(private router: Router) {
|
||||
|
||||
|
||||
this.welcomeName = "Dr. Something"
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
goSettings() {
|
||||
this.router.navigateByUrl('/merms-settings')
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,63 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>merms-login</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="merms-login-page">
|
||||
<div class="container">
|
||||
<ion-grid class="top-container">
|
||||
<ion-row>
|
||||
<ion-col size="2" class="navigation">
|
||||
<ion-back-button text=""></ion-back-button>
|
||||
</ion-col>
|
||||
<ion-col size="8" class="page-title">MERMS Providers</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<h1>Log In</h1>
|
||||
<div class="bottom-container">
|
||||
<button class="google-sign-up" (click)="googleSignup()">
|
||||
<img src="assets/imgs/sign-up/google-icon.svg" />
|
||||
<span>Log in with Google</span>
|
||||
</button>
|
||||
<button
|
||||
class="apple-sign-up"
|
||||
*ngIf="platform_is_ios"
|
||||
(click)="appleSignup()"
|
||||
>
|
||||
<img src="assets/imgs/sign-up/apple-icon.svg" />
|
||||
<span>Sign in with Apple</span>
|
||||
</button>
|
||||
<span style="width: 100%;">
|
||||
Or Log in with Email
|
||||
</span>
|
||||
<form (ngSubmit)="loginAccount()">
|
||||
<div class="form">
|
||||
<div class="item-inner">
|
||||
<ion-input
|
||||
type="email"
|
||||
[(ngModel)]="username"
|
||||
[ngModelOptions]="{standalone: true}"
|
||||
maxlenght="20"
|
||||
placeHolder="Username/Email"
|
||||
></ion-input>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<ion-input
|
||||
type="password"
|
||||
[(ngModel)]="password"
|
||||
[ngModelOptions]="{standalone: true}"
|
||||
maxlenght="15"
|
||||
placeholder="Password"
|
||||
></ion-input>
|
||||
</div>
|
||||
<span class="forgot-password" (click)="lostPassword()">
|
||||
Forgot your password ?
|
||||
</span>
|
||||
|
||||
<button
|
||||
[ngClass]="{'signin-btn': true, 'active-button': username && password}"
|
||||
type="submit"
|
||||
>
|
||||
<strong>Log</strong> in
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
.merms-login-page{
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
--padding-top: 0px;
|
||||
--padding-bottom: 40px;
|
||||
--padding-start: 24px;
|
||||
--padding-end: 24px;
|
||||
.container {
|
||||
padding-top: 7vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
ion-grid.top-container {
|
||||
flex: 0 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
.navigation {
|
||||
text-align: left;
|
||||
padding-left: 2px;
|
||||
ion-back-button {
|
||||
--color: #000;
|
||||
display: inline-block;
|
||||
--icon-font-size: 30px;
|
||||
}
|
||||
}
|
||||
.page-title {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
line-height: 106.4%;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 30px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
line-height: 135%;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-container {
|
||||
margin-top: 6vh;
|
||||
display: block;
|
||||
//flex: 1;
|
||||
//flex-direction: column;
|
||||
.google-sign-up,
|
||||
.apple-sign-up {
|
||||
display: block;
|
||||
border: 2px solid #000000;
|
||||
box-sizing: border-box;
|
||||
border-radius: 26.98px;
|
||||
padding: 13px 0;
|
||||
text-align: center;
|
||||
background: none;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
line-height: 14px;
|
||||
color: #000000;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
height: 55px !important;
|
||||
width: 100%;
|
||||
|
||||
span {
|
||||
opacity: 1;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
margin: 0;
|
||||
height: 25px;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 24px;
|
||||
margin-right: 13px;
|
||||
}
|
||||
}
|
||||
span {
|
||||
font-size: 12px;
|
||||
line-height: 145%;
|
||||
letter-spacing: -0.2px;
|
||||
color: #000000;
|
||||
opacity: 0.25;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
margin-bottom: 20px;
|
||||
&.forgot-password {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
ion-input {
|
||||
border: 2px solid #000000;
|
||||
box-sizing: border-box;
|
||||
border-radius: 26.98px;
|
||||
margin-bottom: 16px;
|
||||
--padding-start: 20px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
line-height: 145%;
|
||||
letter-spacing: -0.2px;
|
||||
color: #000000;
|
||||
}
|
||||
button {
|
||||
background: #0b7493;
|
||||
border-radius: 30px;
|
||||
vertical-align: bottom;
|
||||
display: flex;
|
||||
margin: auto auto 0 auto;
|
||||
width: 168px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
color: #fff;
|
||||
justify-content: center;
|
||||
padding: 14px 0;
|
||||
opacity: 0.5;
|
||||
height: 50px;
|
||||
min-height: 50px;
|
||||
&.active-button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MermsServiceProviderService } from './../providers/merms-service-provider.service';
|
||||
import { Component, ViewChild, OnInit } from '@angular/core';
|
||||
import { MermsSessionService } from './../merms-session.service';
|
||||
//import { Device } from '@ionic-native/device/ngx'
|
||||
import { Router, NavigationExtras } from '@angular/router'
|
||||
|
||||
|
||||
import {
|
||||
NavController,
|
||||
AlertController,
|
||||
LoadingController,
|
||||
} from '@ionic/angular'
|
||||
|
||||
@Component({
|
||||
selector: 'app-merms-login',
|
||||
@@ -7,9 +18,135 @@ import { Component, OnInit } from '@angular/core';
|
||||
})
|
||||
export class MermsLoginPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
@ViewChild('username', { static: false }) username
|
||||
@ViewChild('password', { static: false }) password
|
||||
|
||||
loginData: {
|
||||
username: string
|
||||
password: string
|
||||
sessionid: string
|
||||
}
|
||||
|
||||
StoredloginData: {
|
||||
username: string
|
||||
password: string
|
||||
}
|
||||
|
||||
loaded = false
|
||||
loginResult: any
|
||||
public platform_is_ios: boolean = false
|
||||
|
||||
constructor(
|
||||
public navCtrl: NavController,
|
||||
private alertCtrl: AlertController,
|
||||
private loadingCtrl: LoadingController,
|
||||
/* private mermsServiceProviderService :MermsServiceProviderService,*/
|
||||
private mermsSessionService :MermsSessionService ,
|
||||
private router: Router
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
async loginAccount() {
|
||||
|
||||
console.log('MERMSLoginPage::loginAccount()')
|
||||
this.mermsSessionService.account_token = ''
|
||||
const loader = await this.loadingCtrl.create({
|
||||
message: 'Please wait...',
|
||||
duration: 3000,
|
||||
})
|
||||
|
||||
|
||||
/*
|
||||
220 spinner: null,
|
||||
221 duration: 5000,
|
||||
222 message: 'Click the backdrop to dismiss early...',
|
||||
223 translucent: true,
|
||||
224 cssClass: 'custom-class custom-loading',
|
||||
225 backdropDismiss: true
|
||||
*/
|
||||
|
||||
if (
|
||||
this.username == null ||
|
||||
this.username === '' ||
|
||||
this.mermsSessionService.validateEmail(this.username) === false ||
|
||||
this.password == null ||
|
||||
this.password === ''
|
||||
) {
|
||||
this.showAlert(
|
||||
'Invalid Login',
|
||||
'Enter username(email) and password to login'
|
||||
)
|
||||
} else {
|
||||
loader.present()
|
||||
this.loginData = {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
sessionid: 'DUMMYSESSION',
|
||||
}
|
||||
this.StoredloginData = {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
this.completeLogin();
|
||||
}
|
||||
|
||||
completeLogin() {
|
||||
console.log('MERMSLoginPage::completeLogin()')
|
||||
// alert(100);
|
||||
this.router.navigateByUrl('/merms-dash')
|
||||
}
|
||||
|
||||
async showAlert(mtitle: string, amessage: string) {
|
||||
console.log('MERMSLoginPage::showAlert()')
|
||||
const alert = await this.alertCtrl.create({
|
||||
header: mtitle,
|
||||
message: amessage,
|
||||
buttons: ['OK'],
|
||||
})
|
||||
alert.present()
|
||||
}
|
||||
|
||||
lostPassword() {
|
||||
console.log('MERMSLoginPage::lostPassword()')
|
||||
// this.navCtrl.push(LostpasswordPage);
|
||||
this.router.navigateByUrl('/MERMS-lostpassword')
|
||||
}
|
||||
|
||||
showSignUp() {
|
||||
console.log('MERMSLoginPage::showSignUp()')
|
||||
// this.navCtrl.push(UserSignupPage);
|
||||
// this.navCtrl.push(HomePage,{jump_to_slide:5});
|
||||
const navigationExtras: NavigationExtras = {
|
||||
state: {
|
||||
jump_to_slide: 5,
|
||||
},
|
||||
}
|
||||
this.router.navigate(['/MERMS-start'], navigationExtras)
|
||||
}
|
||||
|
||||
goBack() {
|
||||
console.log('MERMSLoginPage::goBack()')
|
||||
this.navCtrl.pop()
|
||||
}
|
||||
|
||||
appleSignup() {
|
||||
console.log('MERMSStartPage:appleSignup()')
|
||||
|
||||
|
||||
}
|
||||
googleSignup() {
|
||||
console.log('MERMSLoginPage::googleSignup()')
|
||||
console.log('----- Google Signup -----')
|
||||
// this.signup_method = 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MermsSessionService } from './merms-session.service';
|
||||
|
||||
describe('MermsSessionService', () => {
|
||||
let service: MermsSessionService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(MermsSessionService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,207 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http'
|
||||
import { Router } from '@angular/router'
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MermsSessionService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient,
|
||||
private router: Router
|
||||
|
||||
) { }
|
||||
|
||||
list_bank_count: number = 0
|
||||
|
||||
currentFooterPage = 'HOME'
|
||||
top_card = '' // "https://www.float.sg/float/static_top.png";
|
||||
firstname = ''
|
||||
lastname = ''
|
||||
session = ''
|
||||
balance = 0
|
||||
username = ''
|
||||
last_login = ''
|
||||
member_id = 0
|
||||
added = ''
|
||||
account_added = ''
|
||||
public country = ''
|
||||
email = ''
|
||||
city = ''
|
||||
fb_id = ''
|
||||
loc = ''
|
||||
news = ''
|
||||
id = 0
|
||||
phone = ''
|
||||
post_jobs = ''
|
||||
profile_pic = ''
|
||||
refer = ''
|
||||
state = ''
|
||||
status = 0
|
||||
street1 = ''
|
||||
zipcode = ''
|
||||
account_token = ''
|
||||
points = 0
|
||||
min_budget = 0
|
||||
max_budget = 0
|
||||
test = 1 // 0;
|
||||
count_acct = 0
|
||||
count_email = 0
|
||||
testAccount = 1 // Emmergency fix, remove once bookig flow is fixed
|
||||
alert_email = true
|
||||
alert_notification = true
|
||||
// settings
|
||||
FEED_BOOKING_SHOW = 100
|
||||
max_deals_cards = 5
|
||||
start_city = '' // "Powder Springs"
|
||||
start_country = '' // "US"
|
||||
start_state = '' // "GA"
|
||||
|
||||
public player_id = ''
|
||||
public access_token = ''
|
||||
public refresh_token = ''
|
||||
|
||||
public gps_city_location = '....'
|
||||
public gps_fulladdress_location = ''
|
||||
public gps_latitude
|
||||
public gps_longitude
|
||||
public dash_data_refresh_seconds = 15000
|
||||
public gps_country_code = ''
|
||||
public data_collection_mode = 1
|
||||
|
||||
public prompt_background_gps = true
|
||||
session_contructed = false
|
||||
|
||||
public personality_name = ''
|
||||
|
||||
public lastSessionCheck = null
|
||||
public readonly applicationStarted = new Date().getTime()
|
||||
|
||||
ConstructGlobalSessionData(loginResult: any) {
|
||||
console.log('FloatSessionProvider::ConstructGlobalSessionData()')
|
||||
this.session_contructed = false
|
||||
|
||||
try {
|
||||
console.log('Login result session:', loginResult)
|
||||
// alert(loginResult.firstname);
|
||||
this.firstname = loginResult.firstname
|
||||
this.lastname = loginResult.lastname
|
||||
|
||||
if (
|
||||
loginResult.hasOwnProperty('sessionid') &&
|
||||
loginResult.sessionid !== ''
|
||||
) {
|
||||
this.session = loginResult.sessionid
|
||||
loginResult.session = loginResult.sessionid
|
||||
delete loginResult.sessionid
|
||||
} else {
|
||||
this.session = loginResult.session
|
||||
if (loginResult.hasOwnProperty('sessionid')) {
|
||||
delete loginResult.sessionid
|
||||
}
|
||||
}
|
||||
|
||||
this.username = loginResult.username
|
||||
this.last_login = loginResult.last_login
|
||||
this.member_id = loginResult.member_id
|
||||
this.balance = loginResult.balance
|
||||
this.added = loginResult.added
|
||||
this.account_added = loginResult.account_added
|
||||
this.city = loginResult.city
|
||||
this.country = loginResult.country
|
||||
if (this.country === '') {
|
||||
// this.country = 'SG';
|
||||
}
|
||||
this.email = loginResult.email
|
||||
this.fb_id = loginResult.fb_id
|
||||
this.id = loginResult.id
|
||||
this.loc = loginResult.loc
|
||||
this.news = loginResult.news
|
||||
this.phone = loginResult.phone
|
||||
this.post_jobs = loginResult.post_jobs
|
||||
this.profile_pic = loginResult.profile_pic
|
||||
this.refer = loginResult.refer
|
||||
this.state = loginResult.state
|
||||
this.status = loginResult.status
|
||||
this.street1 = loginResult.street1
|
||||
this.zipcode = loginResult.zipcode
|
||||
this.test = 1 // loginResult.test;
|
||||
this.points = loginResult.points
|
||||
this.min_budget = loginResult.min_budget
|
||||
this.max_budget = loginResult.max_budget
|
||||
this.top_card = loginResult.top_card
|
||||
this.count_acct = loginResult.count_acct
|
||||
this.count_email = loginResult.count_email
|
||||
this.account_token = loginResult.account_token
|
||||
|
||||
this.alert_email = loginResult.alert_email === 1 ? true : false
|
||||
this.alert_notification =
|
||||
loginResult.alert_notification === 1 ? true : false
|
||||
/*
|
||||
START city , state or Country is the first detected location of the account - not a profile location
|
||||
*/
|
||||
|
||||
if (loginResult && loginResult.hasOwnProperty('max_deals_cards')) {
|
||||
this.max_deals_cards = loginResult.max_deals_cards
|
||||
}
|
||||
|
||||
if (loginResult && loginResult.hasOwnProperty('start_city')) {
|
||||
this.start_city = loginResult.start_city
|
||||
}
|
||||
if (loginResult && loginResult.hasOwnProperty('start_country')) {
|
||||
this.start_country = loginResult.start_country
|
||||
}
|
||||
if (loginResult && loginResult.hasOwnProperty('start_city')) {
|
||||
this.start_state = loginResult.start_state
|
||||
}
|
||||
|
||||
// app settings parameters
|
||||
this.FEED_BOOKING_SHOW = loginResult.FEED_BOOKING_SHOW
|
||||
if (loginResult && loginResult.hasOwnProperty('personality_name')) {
|
||||
this.personality_name = loginResult.personality_name
|
||||
}
|
||||
|
||||
if (loginResult && loginResult.hasOwnProperty('access_token')) {
|
||||
this.access_token = loginResult.access_token
|
||||
this.refresh_token = loginResult.refresh_token
|
||||
}
|
||||
if (loginResult && loginResult.hasOwnProperty('player_id')) {
|
||||
this.player_id = loginResult.player_id
|
||||
}
|
||||
|
||||
if (loginResult && loginResult.hasOwnProperty('prompt_background_gps')) {
|
||||
this.prompt_background_gps = loginResult.prompt_background_gps
|
||||
} else {
|
||||
this.prompt_background_gps = true // Let's ask
|
||||
}
|
||||
|
||||
// alert("Got Here");
|
||||
// this.pushNotificationProvider.tagUser(this.session);
|
||||
this.session_contructed = true
|
||||
|
||||
// console.log(loginResult);
|
||||
console.log(loginResult)
|
||||
console.log('LOGIN STORAGE COMPLETED')
|
||||
} catch (error) {
|
||||
console.log('LOGIN STORAGE ERROR -> ' + error)
|
||||
this.session_contructed = false
|
||||
}
|
||||
|
||||
return this.session_contructed
|
||||
}
|
||||
|
||||
updateSession(cleanUp) {
|
||||
console.log('FloatSessionProvider::updateSession(' + cleanUp + ')')
|
||||
let updateResult: any
|
||||
}
|
||||
|
||||
|
||||
|
||||
validateEmail(email) {
|
||||
const re = /\S+@\S+\.\S+/;
|
||||
return re.test(email);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { MermsSettingsPage } from './merms-settings.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: MermsSettingsPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class MermsSettingsPageRoutingModule {}
|
||||
@@ -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 { MermsSettingsPageRoutingModule } from './merms-settings-routing.module';
|
||||
|
||||
import { MermsSettingsPage } from './merms-settings.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
MermsSettingsPageRoutingModule
|
||||
],
|
||||
declarations: [MermsSettingsPage]
|
||||
})
|
||||
export class MermsSettingsPageModule {}
|
||||
@@ -0,0 +1,44 @@
|
||||
<ion-content class="merms-settings-page">
|
||||
<div class="container">
|
||||
<ion-grid class="top-container">
|
||||
<ion-row>
|
||||
<ion-col size="2" class="navigation">
|
||||
<ion-back-button text="" (click)="goBack()"></ion-back-button>
|
||||
</ion-col>
|
||||
<ion-col size="8" class="page-title">Settings</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
|
||||
<!-- Item Dividers in a List -->
|
||||
<ion-list>
|
||||
<ion-item-divider>
|
||||
<ion-label>
|
||||
Profile
|
||||
</ion-label>
|
||||
</ion-item-divider>
|
||||
|
||||
<ion-item><ion-label> Dr. Something Something</ion-label></ion-item>
|
||||
<ion-item><ion-label>Edit Profile</ion-label></ion-item>
|
||||
<ion-item><ion-label>A4</ion-label></ion-item>
|
||||
<ion-item><ion-label>Practice Time</ion-label></ion-item>
|
||||
|
||||
<ion-item-divider>
|
||||
<ion-label>
|
||||
Manage Practice
|
||||
</ion-label>
|
||||
</ion-item-divider>
|
||||
|
||||
<ion-item><ion-label>Add Practice</ion-label></ion-item>
|
||||
<ion-item><ion-label>B3</ion-label></ion-item>
|
||||
<ion-item><ion-label>B4</ion-label></ion-item>
|
||||
<ion-item><ion-label>B5</ion-label></ion-item>
|
||||
</ion-list>
|
||||
|
||||
<ion-button expand="full" color="danger" (click)="goLogout()">Log Out</ion-button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
@@ -0,0 +1,143 @@
|
||||
.merms-settings-page{
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
--padding-top: 0px;
|
||||
--padding-bottom: 40px;
|
||||
--padding-start: 24px;
|
||||
--padding-end: 24px;
|
||||
.container {
|
||||
padding-top: 7vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
ion-grid.top-container {
|
||||
flex: 0 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
.navigation {
|
||||
text-align: left;
|
||||
padding-left: 2px;
|
||||
ion-back-button {
|
||||
--color: #000;
|
||||
display: inline-block;
|
||||
--icon-font-size: 30px;
|
||||
}
|
||||
}
|
||||
.page-title {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
line-height: 106.4%;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
h1 {
|
||||
margin-top: 30px;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
line-height: 135%;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-container {
|
||||
margin-top: 6vh;
|
||||
display: block;
|
||||
//flex: 1;
|
||||
//flex-direction: column;
|
||||
.google-sign-up,
|
||||
.apple-sign-up {
|
||||
display: block;
|
||||
border: 2px solid #000000;
|
||||
box-sizing: border-box;
|
||||
border-radius: 26.98px;
|
||||
padding: 13px 0;
|
||||
text-align: center;
|
||||
background: none;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
line-height: 14px;
|
||||
color: #000000;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
height: 55px !important;
|
||||
width: 100%;
|
||||
|
||||
span {
|
||||
opacity: 1;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
margin: 0;
|
||||
height: 25px;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 24px;
|
||||
margin-right: 13px;
|
||||
}
|
||||
}
|
||||
span {
|
||||
font-size: 12px;
|
||||
line-height: 145%;
|
||||
letter-spacing: -0.2px;
|
||||
color: #000000;
|
||||
opacity: 0.25;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
margin-bottom: 20px;
|
||||
&.forgot-password {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
ion-input {
|
||||
border: 2px solid #000000;
|
||||
box-sizing: border-box;
|
||||
border-radius: 26.98px;
|
||||
margin-bottom: 16px;
|
||||
--padding-start: 20px;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
line-height: 145%;
|
||||
letter-spacing: -0.2px;
|
||||
color: #000000;
|
||||
}
|
||||
button {
|
||||
background: #0b7493;
|
||||
border-radius: 30px;
|
||||
vertical-align: bottom;
|
||||
display: flex;
|
||||
margin: auto auto 0 auto;
|
||||
width: 168px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
color: #fff;
|
||||
justify-content: center;
|
||||
padding: 14px 0;
|
||||
opacity: 0.5;
|
||||
height: 50px;
|
||||
min-height: 50px;
|
||||
&.active-button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { MermsSettingsPage } from './merms-settings.page';
|
||||
|
||||
describe('MermsSettingsPage', () => {
|
||||
let component: MermsSettingsPage;
|
||||
let fixture: ComponentFixture<MermsSettingsPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ MermsSettingsPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(MermsSettingsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, NavigationExtras } from '@angular/router'
|
||||
import {
|
||||
NavController,
|
||||
AlertController,
|
||||
LoadingController,
|
||||
} from '@ionic/angular'
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-merms-settings',
|
||||
templateUrl: './merms-settings.page.html',
|
||||
styleUrls: ['./merms-settings.page.scss'],
|
||||
})
|
||||
export class MermsSettingsPage implements OnInit {
|
||||
|
||||
constructor( public navCtrl: NavController,private router: Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
console.log('MERMSLoginPage::goBack()')
|
||||
this.navCtrl.pop()
|
||||
}
|
||||
|
||||
goLogout(){
|
||||
// /home
|
||||
this.router.navigateByUrl('/home')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
//import { Storage } from '@ionic/storage';
|
||||
import * as CryptoBrowserify from 'crypto-browserify';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
// import { FloatSessionProvider } from '../providers/float-session/float-session';
|
||||
|
||||
export let CONFIG = {
|
||||
appVersion: 'myFloatApp 1.0.0',
|
||||
firebaseConfig: {
|
||||
apiKey: 'AIzaSyCQ1AZ-BWDWY9bLCEh-D6hLUOfDK7FnbTQ',
|
||||
authDomain: 'float-app-224118.firebaseapp.com',
|
||||
databaseURL: 'https://float-app-224118.firebaseio.com',
|
||||
projectId: 'float-app-224118',
|
||||
storageBucket: 'float-app-224118.appspot.com',
|
||||
messagingSenderId: '343605975098',
|
||||
},
|
||||
googleMapsKey: 'AIzaSyCPFo6GfBNOYEsUeFiw9Zq2XD54O5hXuO4',
|
||||
clientId: "FloatApp",
|
||||
googleWebClientId:
|
||||
'343605975098-ao362h3sq637l91q7o5haiv7gu44spo6.apps.googleusercontent.com',
|
||||
googleScopes:
|
||||
'email profile openid https://www.googleapis.com/auth/gmail.readonly',
|
||||
googleClientSecret: 'qj115Y45Ovs1WCJSa4xbCw46',
|
||||
oneSignal: {
|
||||
appId: 'e9a7bb38-0a27-4250-9fb7-9bd7871d7b63',
|
||||
apiKey: 'NjE2OTg4ZDAtMWQ5MC00ZGMwLThhM2MtY2JhZTkzMjAyNzBi',
|
||||
googleProjectNumber: '858926099772',
|
||||
},
|
||||
app: {
|
||||
environment: 'production',
|
||||
password: '342b90d2fc96017673858f5aecab4e1d',
|
||||
iv: '0dbe837a2196f4c5',
|
||||
},
|
||||
locationTracker: {
|
||||
cacheSize: 50,
|
||||
},
|
||||
decrypt: function (iv: string, text: string, password: string) {
|
||||
const decipher = CryptoBrowserify.createDecipheriv(
|
||||
'aes-256-ctr',
|
||||
password,
|
||||
iv
|
||||
);
|
||||
let dec = decipher.update(text, 'hex', 'utf8');
|
||||
dec += decipher.final('utf8');
|
||||
return JSON.parse(dec);
|
||||
},
|
||||
development: function () {
|
||||
return CONFIG.decrypt(
|
||||
CONFIG.app.iv,
|
||||
'078eb203fce4db5b9c7ab388dc6d98e103e284c6641f084f50ece99c6cfaebfdb1863f70e53d03f7bd24472112a4310e2b7b4c8d83f171e1028906f70212d41b9669d35d68533d5911ebdd030504885f8fe87dea68fe6f5bddb1336c6ba352c129d4aa3baaf953284c22f40ca3aa069a21a2a1e2f098071dccfc95307f8e42401f7c61a41eccb46e2dc244bef0aca5e11551ff8ee39781d359539f59c0a69d91a1e9094483c64f55feacffcda19acc3f7c738eebb0ca151a8c98b7490fc8fd5c0662ee8edd9a2cb2',
|
||||
CONFIG.app.password
|
||||
);
|
||||
},
|
||||
production: function () {
|
||||
return CONFIG.decrypt(
|
||||
CONFIG.app.iv,
|
||||
'078eb203fce4db5b9c7ab388dc6d98e103e284c6641f084f50ece99c6cfaebfdb1863f70e53d03e2a624543e4ff9304068101883d0b673ed288904b6525bbf5ecf69880d237e3b4657e4c4120b5f885cd3be79e96ebe743598a0762969af78c12b91e478f8a0037e4023f935bfa350c96eeed3e5bddc0b058da99e327cde1543172332f0199db1387cc645bda0afabb41f59edc38bd4c5961f519373c0a4d8dfe2bb5014d5ca4e58c583ad83e8d7c4404b358df8a5c3444bdd99b04c07c4ef3719',
|
||||
CONFIG.app.password
|
||||
);
|
||||
},
|
||||
development_tolik: function () {
|
||||
return CONFIG.decrypt(
|
||||
CONFIG.app.iv,
|
||||
'078eb203fce4db5b9c7ab388dc6d98e103e284c6641f084f50ece99c6cfaece4af9c3528e0325ff7ab3d43334ff9200d36714b8d96fa3cac7c8755b0001efe1b966b920d2138780252a1946a5944ce03caf971b56ffa3d0c8de6356b7eeb3dd06c91a83780f9532a096cb75efaf8179d2dbe93f7fdd35253a5a8de21719b5646157665f04a98e8327b9214eea0fcf5e71f5bfbdab7c3dd8f0f10d13084e3db93adc3094481830116acf5addca696d00f5a25dda4fcb2710b828da34f05c2f9085236b2d28bd944acb1a900c50578',
|
||||
CONFIG.app.password
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AppSettingsProvider {
|
||||
private theme: BehaviorSubject<String>;
|
||||
|
||||
constructor(/*private storage: Storage*/) {
|
||||
/*
|
||||
console.log('AppSettingsProvider::constructor');
|
||||
this.theme = new BehaviorSubject('light-theme');
|
||||
this.storage.get('selectedTheme').then(val => {
|
||||
console.log('AppSettingsProvider::constructor => ' + val);
|
||||
if (val == null || val !== 'dark-theme') {
|
||||
val = 'light-theme';
|
||||
}
|
||||
this.setActiveTheme(val);
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
setActiveTheme(val) {
|
||||
console.log('AppSettingsProvider::setActiveTheme(' + val + ')');
|
||||
// this.storage.set('selectedTheme', val);
|
||||
this.theme.next(val);
|
||||
}
|
||||
|
||||
getActiveTheme() {
|
||||
return this.theme.asObservable();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export let VERSION = {
|
||||
branch: "master",
|
||||
latestTag: "003f122ba6f8cc78364a42d512aa7b2f47f0ffc1",
|
||||
revCount: "843",
|
||||
shortHash: "003f122"
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { MermsServiceProviderService } from './merms-service-provider.service';
|
||||
|
||||
describe('MermsServiceProviderService', () => {
|
||||
let service: MermsServiceProviderService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(MermsServiceProviderService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,177 @@
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'
|
||||
import { Injectable, Injector } from '@angular/core'
|
||||
//import 'rxjs/add/operator/map'
|
||||
//import { Observable, from } from 'rxjs'
|
||||
import { MermsSessionService } from './../merms-session.service';
|
||||
//import * as CryptoBrowserify from 'crypto-browserify'
|
||||
//import { CONFIG } from './app-config'
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MermsServiceProviderService {
|
||||
|
||||
|
||||
//config = CONFIG[CONFIG.app.environment]()
|
||||
//apiKey = this.config.apiKey
|
||||
url = ''
|
||||
// oauth_url: string = this.config.baseURL + '/SAVVY/oauth2/api'
|
||||
// account_endpoint: string = this.config.baseURL + '/SAVVY/banklogin/api'
|
||||
// booking_endpoint: string = this.config.baseURL + '/SAVVY/booking/api'
|
||||
// advice_endpoint: string = this.config.baseURL + '/SAVVY/advice/api'
|
||||
// trip_endpoint: string = this.config.baseURL + '/SAVVY/trips/api'
|
||||
// messaging_endpoint: string = this.config.baseURL + '/SAVVY/messaging/api'
|
||||
// blog_endpoint: string = this.config.baseURL + '/SAVVY/blog/api'
|
||||
// clientId: string = CONFIG.clientId
|
||||
|
||||
// encryptionKey: string = this.config.encryptionKey
|
||||
// encryptionIV: string = this.config.encryptionIV
|
||||
|
||||
|
||||
|
||||
constructor(public http: HttpClient,
|
||||
private mermsSessionService:MermsSessionService) { }
|
||||
|
||||
loginUser(loginData) {
|
||||
// this.http.post(this.url + '/userlogin', loginData);
|
||||
return this.sendPostRequest('1', '/userlogin', loginData)
|
||||
}
|
||||
|
||||
sendPostRequest(grp: string, endPoint: string, sendData: any) {
|
||||
// grp - will be used to change URL
|
||||
let endpointString = ''
|
||||
console.log('GRP->' + grp)
|
||||
switch (grp) {
|
||||
case '1':
|
||||
endpointString = this.url
|
||||
break
|
||||
|
||||
|
||||
}
|
||||
(async () => {
|
||||
// const id = Math.floor(100 * Math.random());
|
||||
const id = (Math.random() * (10000 - 1000) + 1000).toFixed(0)
|
||||
const d1 = new Date()
|
||||
console.log('[' + id + '] before semaphore: ' + d1.getTime())
|
||||
await this.semaphore(id)
|
||||
const d2 = new Date()
|
||||
console.log('[' + id + '] after semaphore: ' + d2.getTime())
|
||||
})()
|
||||
|
||||
}
|
||||
|
||||
getResponseError(error) {
|
||||
// console.log("Error:" + JSON.stringify(error));
|
||||
console.log(error)
|
||||
let data = error['error']
|
||||
let result = data
|
||||
if (data != null && data.hasOwnProperty('payload')) {
|
||||
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
authUser(authData) {
|
||||
return this.sendPostRequest('4', '/auth', authData)
|
||||
}
|
||||
/*
|
||||
encrypt(iv: string, text: string, password: string) {
|
||||
const cipher = CryptoBrowserify.createCipheriv('aes-256-ctr', password, iv)
|
||||
let crypted = cipher.update(text, 'utf8', 'hex')
|
||||
crypted += cipher.final('hex')
|
||||
return crypted
|
||||
}
|
||||
|
||||
decrypt(iv: string, text: string, password: string) {
|
||||
const decipher = CryptoBrowserify.createDecipheriv(
|
||||
'aes-256-ctr',
|
||||
password,
|
||||
iv
|
||||
)
|
||||
let dec = decipher.update(text, 'hex', 'utf8')
|
||||
dec += decipher.final('utf8')
|
||||
return dec
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* Checks if the response from the server returns invalid session error
|
||||
*
|
||||
* @param response_data response from the server
|
||||
*/
|
||||
checkSessionValid(response_data: any){
|
||||
|
||||
if("session_valid" in response_data){
|
||||
if(response_data['session_valid'] === "INVALID_SESSION") {
|
||||
return this.doLogout();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
doLogout(){
|
||||
// this.floatEventsService.publish('DoLogout', {});
|
||||
}
|
||||
|
||||
|
||||
queued = 0
|
||||
lastQueued = 0
|
||||
|
||||
async semaphore(marker: string) {
|
||||
console.log('[' + marker + '] inside semaphore: start')
|
||||
const cd = new Date()
|
||||
const sec = cd.getTime()
|
||||
if (this.queued < 0 || sec - this.lastQueued > 10) {
|
||||
this.queued = 0
|
||||
}
|
||||
if (this.lastQueued === 0 || sec - this.lastQueued > 1000) {
|
||||
this.lastQueued = sec
|
||||
console.log(
|
||||
'[' +
|
||||
marker +
|
||||
'] inside semaphore: wait (queued: ' +
|
||||
this.queued +
|
||||
', lastQueued: ' +
|
||||
this.lastQueued +
|
||||
')'
|
||||
)
|
||||
await this.delay(1000)
|
||||
console.log(
|
||||
'[' +
|
||||
marker +
|
||||
'] inside semaphore: done (queued: ' +
|
||||
this.queued +
|
||||
', lastQueued: ' +
|
||||
this.lastQueued +
|
||||
')'
|
||||
)
|
||||
return
|
||||
}
|
||||
this.lastQueued = sec
|
||||
this.queued++
|
||||
console.log(
|
||||
'[' +
|
||||
marker +
|
||||
'] inside semaphore: wait (queued: ' +
|
||||
this.queued +
|
||||
', lastQueued: ' +
|
||||
this.lastQueued +
|
||||
')'
|
||||
)
|
||||
await this.delay(1000 + 1000 * this.queued)
|
||||
console.log(
|
||||
'[' +
|
||||
marker +
|
||||
'] inside semaphore: done (queued: ' +
|
||||
this.queued +
|
||||
', lastQueued: ' +
|
||||
this.lastQueued +
|
||||
')'
|
||||
)
|
||||
}
|
||||
|
||||
delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#c5dbff" d="M0 0h512v512H0z"/><path d="M256 304c61.6 0 112-50.4 112-112S317.6 80 256 80s-112 50.4-112 112 50.4 112 112 112zm0 40c-74.2 0-224 37.8-224 112v56h448v-56c0-74.2-149.8-112-224-112z" fill="#82aeff"/></svg>
|
||||
|
After Width: | Height: | Size: 288 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="20" height="25" viewBox="0 0 20 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.2969 5.76923C11.4062 5.76923 12.7969 5.00636 13.625 3.98919C14.375 3.06739 14.9219 1.78004 14.9219 0.492688C14.9219 0.317863 14.9062 0.143039 14.875 0C13.6406 0.0476796 12.1562 0.842339 11.2656 1.90718C10.5625 2.71774 9.92188 3.98919 9.92188 5.29244C9.92188 5.48315 9.95312 5.67387 9.96875 5.73745C10.0469 5.75334 10.1719 5.76923 10.2969 5.76923ZM6.39062 25C7.90625 25 8.57812 23.9669 10.4688 23.9669C12.3906 23.9669 12.8125 24.9682 14.5 24.9682C16.1562 24.9682 17.2656 23.4107 18.3125 21.8849C19.4844 20.1367 19.9688 18.4202 20 18.3407C19.8906 18.309 16.7188 16.9898 16.7188 13.2867C16.7188 10.0763 19.2188 8.63001 19.3594 8.51875C17.7031 6.10299 15.1875 6.03942 14.5 6.03942C12.6406 6.03942 11.125 7.18372 10.1719 7.18372C9.14062 7.18372 7.78125 6.10299 6.17188 6.10299C3.10938 6.10299 0 8.67768 0 13.541C0 16.5607 1.15625 19.7552 2.57812 21.8214C3.79688 23.5696 4.85938 25 6.39062 25Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1020 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.99996 3.48C10.69 3.48 11.83 4.21 12.48 4.82L15.02 2.34C13.46 0.89 11.43 0 8.99996 0C5.47996 0 2.43996 2.02 0.959961 4.96L3.86996 7.22C4.59996 5.05 6.61996 3.48 8.99996 3.48Z" fill="#EA4335"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.64 9.20035C17.64 8.46035 17.58 7.92035 17.45 7.36035H9V10.7004H13.96C13.86 11.5304 13.32 12.7804 12.12 13.6204L14.96 15.8204C16.66 14.2504 17.64 11.9404 17.64 9.20035Z" fill="#4285F4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.88 10.78C3.69 10.22 3.58 9.61996 3.58 8.99996C3.58 8.37996 3.69 7.77996 3.87 7.21996L0.96 4.95996C0.35 6.17996 0 7.54996 0 8.99996C0 10.45 0.35 11.82 0.96 13.04L3.88 10.78Z" fill="#FBBC05"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.00021 18.0003C11.4302 18.0003 13.4702 17.2003 14.9602 15.8203L12.1202 13.6203C11.3602 14.1503 10.3402 14.5203 9.00021 14.5203C6.62021 14.5203 4.60021 12.9503 3.88021 10.7803L0.970215 13.0403C2.45021 15.9803 5.48021 18.0003 9.00021 18.0003Z" fill="#34A853"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Ionic App</title>
|
||||
<title>Merms Providres</title>
|
||||
|
||||
<base href="/" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user