Commit acb0636b by kevin

Initial commit

parents
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore
*~
*.sw[mnpcod]
*.log
*.tmp
*.tmp.*
log.txt
*.sublime-project
*.sublime-workspace
.vscode/
npm-debug.log*
.idea/
.ionic/
.sourcemaps/
.sass-cache/
.tmp/
.versions/
coverage/
www/
node_modules/
tmp/
temp/
platforms/
plugins/
plugins/android.json
plugins/ios.json
$RECYCLE.BIN/
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
File added
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"defaultProject": "app",
"newProjectRoot": "projects",
"projects": {
"app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
}
],
"styles": [
{
"input": "src/theme/variables.scss"
},
{
"input": "src/global.scss"
},
{
"input": "src/app/app.scss"
},
{
"input": "node_modules/angular-calendar/css/angular-calendar.css"
}
],
"scripts": [],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
},
"ci": {
"progress": false
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
},
"ci": {
"progress": false
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [],
"scripts": [],
"assets": [
{
"glob": "favicon.ico",
"input": "src/",
"output": "/"
},
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
}
]
},
"configurations": {
"ci": {
"progress": false,
"watch": false
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
}
}
},
"ionic-cordova-serve": {
"builder": "@ionic/angular-toolkit:cordova-serve",
"options": {
"cordovaBuildTarget": "app:ionic-cordova-build",
"devServerTarget": "app:serve"
},
"configurations": {
"production": {
"cordovaBuildTarget": "app:ionic-cordova-build:production",
"devServerTarget": "app:serve:production"
}
}
}
}
},
"app-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "app:serve"
},
"configurations": {
"production": {
"devServerTarget": "app:serve:production"
},
"ci": {
"devServerTarget": "app:serve:ci"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit"
},
"schematics": {
"@ionic/angular-toolkit:component": {
"styleext": "scss"
},
"@ionic/angular-toolkit:page": {
"styleext": "scss"
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyApp</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="[email protected]" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
<string>We use your location for full functionality of certain app features.</string>
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/[email protected]" width="114" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
<icon height="20" src="resources/ios/icon/icon-20.png" width="20" />
<icon height="40" src="resources/ios/icon/[email protected]" width="40" />
<icon height="60" src="resources/ios/icon/[email protected]" width="60" />
<icon height="48" src="resources/ios/icon/[email protected]" width="48" />
<icon height="55" src="resources/ios/icon/[email protected]" width="55" />
<icon height="29" src="resources/ios/icon/icon-29.png" width="29" />
<icon height="58" src="resources/ios/icon/[email protected]" width="58" />
<icon height="87" src="resources/ios/icon/[email protected]" width="87" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/[email protected]" width="80" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="88" src="resources/ios/icon/[email protected]" width="88" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/[email protected]" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/[email protected]" width="120" />
<icon height="180" src="resources/ios/icon/[email protected]" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/[email protected]" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/[email protected]" width="152" />
<icon height="167" src="resources/ios/icon/[email protected]" width="167" />
<icon height="172" src="resources/ios/icon/[email protected]" width="172" />
<icon height="196" src="resources/ios/icon/[email protected]" width="196" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<engine name="android" spec="7.1.4" />
</widget>
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
import { AppPage } from './app.po';
describe('new App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
describe('default screen', () => {
beforeEach(() => {
page.navigateTo('/home');
});
it('should have a title saying Home', () => {
page.getPageOneTitleText().then(title => {
expect(title).toEqual('Home');
});
});
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(destination) {
return browser.get(destination);
}
getTitle() {
return browser.getTitle();
}
getPageOneTitleText() {
return element(by.tagName('app-home')).element(by.deepCss('ion-title')).getText();
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
{
"name": "allorepar",
"integrations": {
"cordova": {}
},
"type": "angular"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "allorepar",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.3",
"@angular/common": "^7.2.2",
"@angular/core": "^7.2.2",
"@angular/forms": "^7.2.2",
"@angular/http": "^7.2.2",
"@angular/platform-browser": "^7.2.2",
"@angular/platform-browser-dynamic": "^7.2.2",
"@angular/router": "^7.2.2",
"@ionic-native/core": "^5.0.0",
"@ionic-native/geolocation": "^5.15.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/toast": "^5.15.0",
"@ionic/angular": "^4.1.0",
"@types/jquery": "^3.3.31",
"angular-calendar": "^0.27.14",
"cordova-android": "7.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-toast": "^2.7.2",
"core-js": "^2.5.4",
"date-fns": "^1.30.1",
"ionic2-calendar": "^0.5.2",
"jquery": "^3.4.1",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"webrtc-adapter": "^7.2.9",
"zone.js": "~0.8.29"
},
"devDependencies": {
"@angular-devkit/architect": "~0.13.8",
"@angular-devkit/build-angular": "~0.13.8",
"@angular-devkit/core": "~7.3.8",
"@angular-devkit/schematics": "~7.3.8",
"@angular/cli": "~7.3.8",
"@angular/compiler": "~7.2.2",
"@angular/compiler-cli": "~7.2.2",
"@angular/language-service": "~7.2.2",
"@ionic/angular-toolkit": "~1.5.1",
"@types/node": "~12.0.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~8.3.0",
"tslint": "~5.17.0",
"typescript": "~3.1.6"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-x-toast": {}
},
"platforms": [
"android"
]
}
}
These are Cordova resources. You can replace icon.png and splash.png and run
`ionic cordova resources` to generate custom icons and splash screens for your
app. See `ionic cordova resources --help` for details.
Cordova reference documentation:
- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
export interface User {
user_name: any;
user_email: any;
user_phonecode: any;
user_phonenumber: any;
user_country: any;
user_area: any;
user_address: any;
user_lat: any;
user_lng: any;
user_type: any;
}
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { devURL} from '../../environments/server.config';
import { map, catchError } from 'rxjs/operators';
@Injectable({
providedIn: 'root',
})
export class AuthenticationService {
constructor(
private http: HttpClient
) { }
post_data(url: string, data) {
return this.http.post(`${devURL + url}`, data).pipe(map((response: any) => response));
}
get_data(url) {
return this.http.get(`${devURL + url}`).pipe(map((response: any) => response));
}
public uploadFormData(url, formData) {
return this.http.post<any>(`${devURL + url}`, formData).pipe(map((response: any) => response));
}
}
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class StorageService {
constructor() { }
setLocalStorageItem(id: string, data: string) {
localStorage.setItem(id, data);
}
getLocalStorageItem(data: string): string {
return localStorage.getItem(data);
}
removeLocalStorageItem(data) {
localStorage.removeItem(data);
}
ObjArray(data: any) {
if (data instanceof Array !== true) {
if (data !== undefined) {
return new Array(data);
} else {
return undefined;
}
} else {
return data;
}
}
getToken() {
return localStorage.getItem('userData');
}
isLoggednIn() {
return this.getToken() !== null;
}
}
import { Injectable } from '@angular/core';
import { Toast } from '@ionic-native/toast/ngx';
import { LoadingController , ToastController } from '@ionic/angular';
@Injectable({
providedIn: 'root',
})
export class ValidationService {
loading: any;
currentLoading: any;
constructor(
private toast: Toast,
public loadingController: LoadingController,
) { }
presentToast(message) {
this.toast.show(message, '4000', 'center').subscribe(
toast => {
console.log(toast);
}
);
}
async presentLoader() {
if (this.currentLoading != null) {
this.currentLoading.dismiss();
}
this.currentLoading = await this.loadingController.create({
message: 'Loading...'
});
return await this.currentLoading.present();
}
async dismissLoader() {
await this.loadingController.dismiss();
this.currentLoading = null;
console.log('Dismis loader');
// return;
}
}
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 { AcceptedPage } from './accepted.page';
const routes: Routes = [
{
path: '',
component: AcceptedPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AcceptedPage]
})
export class AcceptedPageModule {}
<ion-content>
<div class="waiting_wrapper">
<div class="logo_one">
<img src="../../assets/img/aaset_verified.png">
</div>
<h4>Mechanic Accepted</h4>
<p>OThe Allo Repar is ready to help you.<br>
Please wait for the Mechanic.</p>
<div class="logo">
<img src="../../assets/img/asset_shop1.png">
</div>
<h4>Presto Towing Services</h4>
<div class="distance">
4 km
</div><br><br>
<button class="back_btn1">Call allo repar</button><br>
<button class="home">Details</button>
</div>
</ion-content>
.waiting_wrapper{
width:100%;
height:100vh;
background: url("../../assets/img/asset_waiting_background.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
text-align: center;
padding-top:20%;
.logo_one{
width:60px;
height:60px;
border-radius: 50%;
margin:0 auto;
img{
width:100%;
height:100%;
border-radius: 50%;
}
}
.logo{
width:60px;
height:60px;
border-radius: 50%;
background-color: #fff;
margin:0 auto;
img{
width:100%;
height:100%;
border-radius: 50%;
border:1px solid #fbd339;
}
}
h4{
color: #fff;
padding-bottom: 5px;
padding-top: 5px;
}
h3{
color: #fff;
padding-top: 10px;
font-size: 18px;
}
p{
color: #fff;
font-weight: 300;
padding-bottom:40px;
}
.back_btn1{
height:35px;
border-radius: 20px;
font-size: 16px;
margin: 2px;
display: inline-block;
background-color: #28be57;
color: #fff;
background-image: url("../../assets/img/asset_call.png");
background-position: left 5px top 0px;
background-repeat: no-repeat;
background-size: 35px;
padding-left: 40px;
padding-right: 40px;
}
.distance{
border:1px solid #fff;
color: #fff;
display: inline-block;
padding: 5px;
font-size: 18px;
padding-left: 35px;
padding-right: 25px;
border-radius: 20px;
background: url("../../assets/img/aaset_loc1.png");
background-position: left 15px top 6px;
background-repeat: no-repeat;
background-size: 18px;
}
.home{
background-color: #8769f4;
color: #fff;
padding:5px;
display: inline-block;
padding: 10px;
font-size: 18px;
padding-left: 25px;
padding-right: 25px;
border-radius: 20px;
}
.back_btn1{
margin-top: 20%;
color: #8769f4;
background: url("../../assets/img/asset_rplay.png");
background-position: left;
background-repeat: no-repeat;
font-size: 18px;
background-size: 11px;
padding-left: 20px;
padding-right:20px;
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AcceptedPage } from './accepted.page';
describe('AcceptedPage', () => {
let component: AcceptedPage;
let fixture: ComponentFixture<AcceptedPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AcceptedPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AcceptedPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-accepted',
templateUrl: './accepted.page.html',
styleUrls: ['./accepted.page.scss'],
})
export class AcceptedPage implements OnInit {
constructor() { }
ngOnInit() {
}
}
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 { AddaddressPage } from './addaddress.page';
const routes: Routes = [
{
path: '',
component: AddaddressPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AddaddressPage]
})
export class AddaddressPageModule {}
<ion-header>
<div class="app_header">
<button class="nav_btn back_btn floatLeft" (click)="goBack()">
</button>
<div class="nav_title floatLeft"><h4>ADD ADDRESS</h4></div>
<button class="nav_btn nav_btn_text floatRight">
</button>
<div class="clear"></div>
</div>
</ion-header>
<ion-content>
<div class="signup_wrapper">
<div class="signup_form">
<div class="row">
<p>Name</p>
<ion-input value="John Doe" type="text"></ion-input>
</div>
<div class="row">
<p>Phone Number</p>
<ion-row class="p0">
<ion-col size="4">
<ion-select placeholder="">
<ion-select-option value="">+91</ion-select-option>
</ion-select>
</ion-col>
<ion-col size="8">
<ion-input value="" type="number"></ion-input>
</ion-col>
</ion-row>
</div>
<div class="row">
<p>Country</p>
<ion-select placeholder="">
<ion-select-option value="">Country Name</ion-select-option>
</ion-select>
</div>
<div class="row">
<p>District</p>
<ion-select placeholder="">
<ion-select-option value="">District Name</ion-select-option>
</ion-select>
</div>
<div class="row">
<p>City</p>
<ion-select placeholder="">
<ion-select-option value="">City Name</ion-select-option>
</ion-select>
</div>
<div class="row">
<p>Area</p>
<ion-select placeholder="">
<ion-select-option value="">Area name</ion-select-option>
</ion-select>
</div>
<div class="row">
<p>House name/Building</p>
<ion-select placeholder="">
<ion-select-option value="">Choose address</ion-select-option>
</ion-select>
</div>
<div class="row">
<button class="signup_btn">Save</button>
</div>
</div>
</div>
</ion-content>
.signup_form{
padding: 15px;
.row{
margin-bottom: 15px;
p{
color: #4e4961;
padding: 10px;
margin: 0px;
padding-left: 20px;
font-weight: 500;
a{
color: #39267f;
}
}
h6{
color: #4e4961;
padding-left: 20px;
font-weight: 400;
font-size: 14px;
}
ion-input{
background: #dcdae9;
border-radius: 20px;
color:#39267f;
height: 40px;
font-weight: 600;
padding-left: 15px !important;
}
ion-select {
background: #dcdae9;
border-radius: 20px;
color:#39267f;
height: 40px;
font-weight: 600;
padding-left: 15px !important;
padding-right: 20px;
}
.signup_btn{
height: 40px;
width: 100%;
color: #fff;
background-color: #39267f;
border-radius: 20px;
font-weight: 500;
font-size: 16px;
}
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddaddressPage } from './addaddress.page';
describe('AddaddressPage', () => {
let component: AddaddressPage;
let fixture: ComponentFixture<AddaddressPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddaddressPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddaddressPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { trigger, transition, animate, style } from '@angular/animations';
import { Router,ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-addaddress',
templateUrl: './addaddress.page.html',
styleUrls: ['./addaddress.page.scss'],
})
export class AddaddressPage implements OnInit {
constructor(
private router: Router,
private route: ActivatedRoute,
private location: Location
) { }
ngOnInit() {
}
goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
goBack() {
this.location.back();
}
}
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 { AddcarPage } from './addcar.page';
const routes: Routes = [
{
path: '',
component: AddcarPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AddcarPage]
})
export class AddcarPageModule {}
<ion-content>
<div class="forgot_wrapper">
<div class="app_header">
<button class="nav_btn back_btn floatLeft" (click)="goBack()">
</button>
<div class="nav_title floatLeft"><h4>ADD YOUR CAR</h4></div>
<button class="nav_btn nav_btn_text floatRight" (click)="goToPage('login')">
Skip
</button>
<div class="clear"></div>
</div>
<div class="forgot_form">
<div class="showcar">
<img src="../../assets/img/asset_show_car.png">
</div>
<div class="row">
<ion-select placeholder="">
<ion-select-option value="" selected>Company Name</ion-select-option>
</ion-select>
</div>
<div class="row">
<ion-select placeholder="">
<ion-select-option value="" selected>Modal Name</ion-select-option>
</ion-select>
</div>
<div class="row">
<ion-select placeholder="">
<ion-select-option value="" selected>Modal Year</ion-select-option>
</ion-select>
</div>
<div class="row">
<p>Mileage</p>
<ion-select placeholder="">
<ion-select-option value="" selected>0 - 10km</ion-select-option>
</ion-select>
</div>
<div class="row textCenter">
<button class="signup_btn" (click)="goToPage('login')">Add My car</button>
</div>
</div>
</div>
</ion-content>
.forgot_wrapper{
background-image: url("../../assets/img/asset_forgot_bg.png");
background-position: center top -30px;
background-size: 100%;
.forgot_form{
padding: 15px;
padding-top: 40px;
.showcar{
text-align: center;
img{
width: 75%;
}
}
.row{
margin-bottom:15px;
p{
color: #4e4961;
padding: 10px;
margin: 0px;
padding-left: 20px;
font-weight: 500;
a{
color: #39267f;
}
}
h5{
color: #4e4961;
text-align: center;
font-size: 16px;
}
h2{
text-align: center;
color: #282438;
font-size: 32px;
padding-bottom: 15%;
}
h6{
color: #4e4961;
padding-left: 20px;
font-weight: 400;
font-size: 14px;
}
ion-input{
background: #dcdae9;
border-radius:35px;
color:#39267f;
height: 45px;
font-weight: 600;
text-align: center;
}
ion-select {
background: #dcdae9;
border-radius: 20px;
color:#39267f;
height: 40px;
font-weight: 600;
padding-left: 15px !important;
padding-right: 20px;
}
.signup_btn{
height: 40px;
width: 100%;
color: #fff;
background-color: #39267f;
border-radius: 20px;
font-weight: 500;
font-size: 16px;
}
}
.otp_input_box{
width: 80%;
margin: 0 auto;
}
}
}
h3{
color: #39267f;
text-align:center;
font-size: 15px;
font-weight: 500;
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddcarPage } from './addcar.page';
describe('AddcarPage', () => {
let component: AddcarPage;
let fixture: ComponentFixture<AddcarPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddcarPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddcarPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';
import { Location } from '@angular/common';
@Component({
selector: 'app-addcar',
templateUrl: './addcar.page.html',
styleUrls: ['./addcar.page.scss'],
})
export class AddcarPage implements OnInit {
constructor(
private router: Router,
private route: ActivatedRoute,
private location: Location
) {
}
ngOnInit() {
}
goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
goBack() {
this.location.back();
}
}
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
redirectTo: 'start',
pathMatch: 'full'
},
{
path: 'home',
loadChildren: './home/home.module#HomePageModule'
},
{
path: 'list',
loadChildren: './list/list.module#ListPageModule'
},
{
path: 'start',
loadChildren: './start/start.module#StartPageModule'
},
{
path: 'login',
loadChildren: './login/login.module#LoginPageModule'
},
{
path: 'forgot',
loadChildren: './forgot/forgot.module#ForgotPageModule'
},
{
path: 'otp/:id',
loadChildren: './otp/otp.module#OtpPageModule'
},
{
path: 'password/:id',
loadChildren: './password/password.module#PasswordPageModule'
},
{
path: 'addcar',
loadChildren: './addcar/addcar.module#AddcarPageModule'
},
{
path: 'roadassistance',
loadChildren: './roadassistance/roadassistance.module#RoadassistancePageModule'
},
{
path: 'booking/:id',
loadChildren: './booking/booking.module#BookingPageModule'
},
{
path: 'servicecompleted',
loadChildren: './servicecompleted/servicecompleted.module#ServicecompletedPageModule'
},
{
path: 'accepted',
loadChildren: './accepted/accepted.module#AcceptedPageModule'
},
{
path: 'review',
loadChildren: './review/review.module#ReviewPageModule'
},
{ path: 'waiting', loadChildren: './waiting/waiting.module#WaitingPageModule' },
{ path: 'complete', loadChildren: './complete/complete.module#CompletePageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'myservices', loadChildren: './myservices/myservices.module#MyservicesPageModule' },
{ path: 'profilephoto', loadChildren: './profilephoto/profilephoto.module#ProfilephotoPageModule' },
{ path: 'carlist', loadChildren: './carlist/carlist.module#CarlistPageModule' },
{ path: 'servicedetails', loadChildren: './servicedetails/servicedetails.module#ServicedetailsPageModule' },
{ path: 'myorders', loadChildren: './myorders/myorders.module#MyordersPageModule' },
{ path: 'general', loadChildren: './general/general.module#GeneralPageModule' },
{ path: 'settings', loadChildren: './settings/settings.module#SettingsPageModule' },
{ path: 'selectservices/:id', loadChildren: './selectservices/selectservices.module#SelectservicesPageModule' },
{ path: 'date/:id', loadChildren: './date/date.module#DatePageModule' },
{ path: 'summary', loadChildren: './summary/summary.module#SummaryPageModule' },
{ path: 'waiting1', loadChildren: './waiting1/waiting1.module#Waiting1PageModule' },
{ path: 'available', loadChildren: './available/available.module#AvailablePageModule' },
{ path: 'bookservice', loadChildren: './bookservice/bookservice.module#BookservicePageModule' },
{ path: 'cancel', loadChildren: './cancel/cancel.module#CancelPageModule' },
{ path: 'purchaseparts', loadChildren: './purchaseparts/purchaseparts.module#PurchasepartsPageModule' },
{ path: 'productbooking', loadChildren: './productbooking/productbooking.module#ProductbookingPageModule' },
{ path: 'addaddress', loadChildren: './addaddress/addaddress.module#AddaddressPageModule' },
{ path: 'deliveryaddress', loadChildren: './deliveryaddress/deliveryaddress.module#DeliveryaddressPageModule' },
{ path: 'partproduct', loadChildren: './partproduct/partproduct.module#PartproductPageModule' },
{ path: 'orderdetails', loadChildren: './orderdetails/orderdetails.module#OrderdetailsPageModule' },
{ path: 'listingservice', loadChildren: './listingservice/listingservice.module#ListingservicePageModule' }
];
@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule {}
<ion-app>
<ion-split-pane>
<ion-menu type="overlay">
<ion-header>
<ion-toolbar>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<ion-menu-toggle auto-hide="false" *ngFor="let p of appPages">
<ion-item [routerDirection]="'root'" [routerLink]="[p.url]">
<ion-icon slot="start" [name]="p.icon"></ion-icon>
<ion-label>
{{p.title}}
</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-list>
</ion-content>
</ion-menu>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>
</ion-app>
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TestBed, async } from '@angular/core/testing';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
let statusBarSpy, splashScreenSpy, platformReadySpy, platformSpy;
beforeEach(async(() => {
statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
platformReadySpy = Promise.resolve();
platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });
TestBed.configureTestingModule({
declarations: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
{ provide: StatusBar, useValue: statusBarSpy },
{ provide: SplashScreen, useValue: splashScreenSpy },
{ provide: Platform, useValue: platformSpy },
],
imports: [ RouterTestingModule.withRoutes([])],
}).compileComponents();
}));
it('should create the app', async () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it('should initialize the app', async () => {
TestBed.createComponent(AppComponent);
expect(platformSpy.ready).toHaveBeenCalled();
await platformReadySpy;
expect(statusBarSpy.styleDefault).toHaveBeenCalled();
expect(splashScreenSpy.hide).toHaveBeenCalled();
});
it('should have menu labels', async () => {
const fixture = await TestBed.createComponent(AppComponent);
await fixture.detectChanges();
const app = fixture.nativeElement;
const menuItems = app.querySelectorAll('ion-label');
expect(menuItems.length).toEqual(2);
expect(menuItems[0].textContent).toContain('Home');
expect(menuItems[1].textContent).toContain('List');
});
it('should have urls', async () => {
const fixture = await TestBed.createComponent(AppComponent);
await fixture.detectChanges();
const app = fixture.nativeElement;
const menuItems = app.querySelectorAll('ion-item');
expect(menuItems.length).toEqual(2);
expect(menuItems[0].getAttribute('ng-reflect-router-link')).toEqual('/home');
expect(menuItems[1].getAttribute('ng-reflect-router-link')).toEqual('/list');
});
});
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment