Commit 24618eef by Adarsh K

latest

parents
{
"repoId": "111a57f0-8194-4b3e-a693-fb080e3fd9b7",
"lastSync": 0
}
\ No newline at end of file
File added
# 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/
package-lock.json
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>949385251610-a6lrfr6uhr73991e38t3t013jj3v56a9.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.949385251610-a6lrfr6uhr73991e38t3t013jj3v56a9</string>
<key>ANDROID_CLIENT_ID</key>
<string>949385251610-kmvonuqfdq5fnltoflke15m0i1pck44n.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyAuEm0tmKdm3whaqO80I2BmQ76Fc-vPUKc</string>
<key>GCM_SENDER_ID</key>
<string>949385251610</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.getmi.customer</string>
<key>PROJECT_ID</key>
<string>getmi-4fd26</string>
<key>STORAGE_BUCKET</key>
<string>getmi-4fd26.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:949385251610:ios:951ba19e173de284483aa3</string>
<key>DATABASE_URL</key>
<string>https://getmi-4fd26.firebaseio.com</string>
</dict>
</plist>
\ No newline at end of file
{
"$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": "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"
}
],
"scripts": []
},
"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": "tsconfig.spec.json",
"karmaConfig": "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": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": ["**/node_modules/**"]
}
},
"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"
}
}
},
"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"
}
}
}
}
}
},
"cli": {
"defaultCollection": "@ionic/angular-toolkit"
},
"schematics": {
"@ionic/angular-toolkit:component": {
"styleext": "scss"
},
"@ionic/angular-toolkit:page": {
"styleext": "scss"
}
}
}
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.getmi.customer" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>GetMi</name>
<description />
<author email="[email protected]" href="http://ionicframework.com/">Techware Software Solutions Pvt Ltd</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="orientation" value="portrait" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="5000" />
<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>
<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-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" />
<plugin name="cordova-plugin-geolocation" spec="4.0.2">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="To locate you" />
</plugin>
<plugin name="cordova-plugin-nativegeocoder" spec="3.2.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<engine name="android" spec="^8.0.0" />
</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.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
import { AppPage } from './app.po';
describe('new App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getPageTitle()).toContain('Tab One');
});
});
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getPageTitle() {
return element(by.css('ion-title')).getText();
}
}
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
{
"project_info": {
"project_number": "949385251610",
"firebase_url": "https://getmi-4fd26.firebaseio.com",
"project_id": "getmi-4fd26",
"storage_bucket": "getmi-4fd26.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:949385251610:android:0afdeb32b3973868483aa3",
"android_client_info": {
"package_name": "com.getmi.customer"
}
},
"oauth_client": [
{
"client_id": "949385251610-kmvonuqfdq5fnltoflke15m0i1pck44n.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.getmi.customer",
"certificate_hash": "1e4dcbaadd3e2b90b93b36ae0b4b09f72e770a26"
}
},
{
"client_id": "949385251610-lr7ga8c9rvu4qhsqassaqsq3l58g8qua.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCfj5l5fCxSGhabuw502k9VMnfy5nKHMPI"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "949385251610-lr7ga8c9rvu4qhsqassaqsq3l58g8qua.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
{
"name": "getme",
"integrations": {
"cordova": {}
},
"type": "angular"
}
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
{
"name": "getme",
"version": "0.0.1",
"author": "Techware Software Solutions Pvt Ltd",
"homepage": "https://techware.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.7",
"@angular/animations": "^8.2.11",
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/fire": "^5.2.1",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@ionic-native/core": "^5.0.0",
"@ionic-native/geolocation": "^5.15.1",
"@ionic-native/google-plus": "^5.0.0-beta.0",
"@ionic-native/native-geocoder": "^5.15.1",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.12.0",
"@ionic/angular": "^4.7.1",
"@ionic/storage": "^2.2.0",
"agm-direction": "^0.7.8",
"cordova-android": "^8.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-geolocation": "4.0.2",
"cordova-plugin-googleplus": "^8.1.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-nativegeocoder": "3.2.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^3.3.0",
"core-js": "^2.5.4",
"firebase": "^6.4.0",
"rxjs": "~6.5.1",
"rxjs-compat": "^6.5.3",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "~0.801.2",
"@angular-devkit/build-angular": "~0.801.2",
"@angular-devkit/core": "~8.1.2",
"@angular-devkit/schematics": "~8.1.2",
"@angular/cli": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@ionic/angular-toolkit": "~2.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"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": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"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": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"cordova-plugin-nativegeocoder": {},
"cordova-sqlite-storage": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.949385251610-a6lrfr6uhr73991e38t3t013jj3v56a9"
}
},
"platforms": [
"android"
]
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
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 { AddaddresssPage } from './addaddresss.page';
const routes: Routes = [
{
path: '',
component: AddaddresssPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AddaddresssPage]
})
export class AddaddresssPageModule {}
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png">
</button>
<div class="nav_title floatLeft">
<h4>ADD ADDRESS</h4>
</div>
<div class="clear"></div>
</div>
<ion-content>
<div class="login_wrapper">
<div class="form_div">
<form #addressForm="ngForm" novalidate>
<ion-grid>
<ion-row>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-checkbox-1" type="radio" value="Work" [(ngModel)]="address.addressType" name="addressType" #addressType="ngModel" required>
<label for="styled-checkbox-1"><span>Work</span></label></h6>
</ion-col>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-checkbox-2" type="radio" value="Office" [(ngModel)]="address.addressType" name="addressType" #addressType="ngModel" required>
<label for="styled-checkbox-2"><span>Office</span></label></h6>
</ion-col>
<ion-col>
<h6>
<input class="styled-checkbox" id="styled-checkbox-3" type="radio" value="Other" [(ngModel)]="address.addressType" name="addressType" #addressType="ngModel" required>
<label for="styled-checkbox-3"><span>Others</span></label></h6>
</ion-col>
</ion-row>
<div class="md-errors-spacer" [hidden]="addressType.valid || submitted == false" class="ion-padding-start">
Address Type is required
</div>
</ion-grid>
<div class="row">
<button class="btn btn-info" (click)="getGeolocation()">Get Current</button>
</div>
<div class="row">
<input class="" type="text" placeholder="Address 1" [(ngModel)]="address.firstAddress" name="firstAddress" #firstAddress="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="firstAddress.valid || submitted == false" class="ion-padding-start">
Address 1 is required
</div>
<div class="row">
<input class="" type="text" placeholder="Address 2" [(ngModel)]="address.secondAddress" name="secondAddress" #secondAddress="ngModel">
</div>
<div class="row">
<input class="" type="text" placeholder="Country" [(ngModel)]="address.country" name="country" #country="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="country.valid || submitted == false" class="ion-padding-start">
Country is required
</div>
<div class="row">
<input class="" type="text" placeholder="State" [(ngModel)]="address.state" name="state" #state="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="state.valid || submitted == false" class="ion-padding-start">
State is required
</div>
<div class="row">
<input class="" type="text" placeholder="District" [(ngModel)]="address.district" name="district" #district="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="district.valid || submitted == false" class="ion-padding-start">
District is required
</div>
<div class="row">
<input class="" type="text" placeholder="City" [(ngModel)]="address.city" name="city" #city="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="city.valid || submitted == false" class="ion-padding-start">
City is required
</div>
<div class="row">
<input class="" type="text" placeholder="Area" [(ngModel)]="address.area" name="area" #area="ngModel">
</div>
<div class="row">
<input class="" type="text" placeholder="Landmark" [(ngModel)]="address.landmark" name="landmark" #landmark="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="landmark.valid || submitted == false" class="ion-padding-start">
Landmark is required
</div>
<div class="row">
<input class="" type="text" placeholder="ZipCode" [(ngModel)]="address.zip" name="zip" #zip="ngModel" required>
</div>
<div class="md-errors-spacer" [hidden]="zip.valid || submitted == false" class="ion-padding-start">
ZipCode is required
</div>
<div class="row">
<button class="login_btn" (click)="onAddrss(addressForm)">ADD</button>
</div>
</form>
</div>
</div>
</ion-content>
\ No newline at end of file
.login_wrapper {
width: 80%;
margin: 0 auto;
padding-top: 30px;
.logo_wrapper {
width: 100%;
text-align: center;
padding-top: 50px;
padding-bottom: 30px;
img {
width: 180px;
}
}
h6 {
color: rgba(41, 40, 91, 1);
margin: 0px;
span {
position: relative;
top: 2px;
}
a {
color: rgba(41, 40, 91, 1);
text-decoration: none;
font-weight: 900;
}
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 6px;
top: 11px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
}
}
}
.form_div {
.row {
margin-bottom: 20px;
input {
border: 1px solid rgba(215, 213, 228, 1);
background: transparent;
color: rgba(215, 213, 228, 1);
width: 100%;
height: 45px;
text-align: left;
border-radius: 8px;
font-size: 16px;
padding-left: 15px;
padding-right: 15px;
}
.login_btn {
width: 100%;
background-color: #29285b;
color: #fff;
border-radius: 8px;
height: 45px;
font-size: 16px;
}
hr {
border: 1px solid rgba(215, 213, 228, 1);
border-bottom: none;
margin-top: 30px;
margin-bottom: 10px;
}
P {
text-align: center;
color: rgba(59, 57, 77, 1);
margin: 0px;
position: relative;
bottom: 20px;
span {
background-color: #fff;
padding: 10px;
font-size: 18px;
}
}
h4 {
color: rgba(59, 57, 77, 1);
text-align: center;
margin: 0px;
padding-top: 15px;
}
h6 {
color: rgba(41, 40, 91, 1);
margin: 0px;
span {
position: relative;
top: 5px;
}
a {
color: rgba(41, 40, 91, 1);
text-decoration: none;
font-weight: 900;
}
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 10px;
top: 15px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
}
}
}
.social_div {
border: 1px solid rgba(215, 213, 228, 1);
height: 45px;
border-radius: 20px;
.social_btn {
display: inline-block;
width: 50%;
text-align: center;
height: 100%;
font-size: 18px;
padding: 9px;
}
}
}
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddaddresssPage } from './addaddresss.page';
describe('AddaddresssPage', () => {
let component: AddaddresssPage;
let fixture: ComponentFixture<AddaddresssPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddaddresssPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddaddresssPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Location } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NativeGeocoder, NativeGeocoderOptions, NativeGeocoderResult } from '@ionic-native/native-geocoder/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { NgForm } from '@angular/forms';
import { AuthService } from './../../config/auth.service';
import { Address } from './../../config/services/user';
@Component({
selector: 'app-addaddresss',
templateUrl: './addaddresss.page.html',
styleUrls: ['./addaddresss.page.scss'],
})
export class AddaddresssPage implements OnInit {
geoLatitude: number;
geoLongitude: number;
geoAccuracy: number;
geoAddress: string;
address: Address = {
addressType: '',
area: '',
city: '',
country: '',
district: '',
firstAddress: '',
landmark: '',
zip: '',
secondAddress: '',
state: '',
default: 0
};
submitted = false;
geoencoderOptions: NativeGeocoderOptions = {
useLocale: true,
maxResults: 5
};
constructor(
private router: Router,
private route: ActivatedRoute,
private location: Location,
private geolocation: Geolocation,
private nativeGeocoder: NativeGeocoder,
private register: AuthService
) { }
ngOnInit() {
}
goToPage(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
goBack() {
this.location.back();
}
getGeolocation() {
console.log('getLocation');
this.geolocation.getCurrentPosition().then(pos => {
console.log('get New location');
console.log(pos);
this.geoLatitude = pos.coords.latitude;
this.geoLongitude = pos.coords.longitude;
this.geoAccuracy = pos.coords.accuracy;
this.getGeoencoder(this.geoLatitude, this.geoLongitude);
}).catch(err => {
alert('Error getting location' + JSON.stringify(err));
});
}
getGeoencoder(latitude, longitude) {
console.log('reached');
this.nativeGeocoder.reverseGeocode(latitude, longitude, this.geoencoderOptions)
.then((result: NativeGeocoderResult[]) => {
console.log(result);
this.geoAddress = this.generateAddress(result[0]);
console.log(this.geoAddress);
})
.catch((error: any) => {
alert('Error getting location' + JSON.stringify(error));
});
}
generateAddress(addressObj) {
const obj = [];
let address = '';
// tslint:disable-next-line:forin
for (const key in addressObj) {
obj.push(addressObj[key]);
}
obj.reverse();
for (const val in obj) {
if (obj[val].length) {
address += obj[val] + ', ';
}
}
return address.slice(0, -2);
}
onAddrss(form: NgForm) {
this.submitted = true;
console.log(form.value);
if (form.valid) {
console.log(form.value);
this.register.createAddress(form.value);
} else {
console.log(form.errors);
}
}
}
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 { AddcardPage } from './addcard.page';
const routes: Routes = [
{
path: '',
component: AddcardPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [AddcardPage]
})
export class AddcardPageModule {}
<div class="nav_header">
<button class="nav_btn nav_back floatLeft" (click)="goBack()">
<img src="../assets/Group17_2.png">
</button>
<div class="nav_title floatLeft">
<h4>ADD YOUR CARD</h4>
</div>
<div class="clear"></div>
</div>
<ion-content>
<div class="login_wrapper">
<div class="form_div">
<div class="row">
<p>Credit/Debit Card</p>
<input class="" type="text" placeholder="0000 0000 0000 0000">
</div>
<div class="row">
<p>Expiry Date</p>
<ion-row>
<ion-col size="4" class="p0">
<input class="" type="text" placeholder="00/0000">
</ion-col>
<ion-col class="p0"></ion-col>
</ion-row>
</div>
<div class="row">
<p>CVV</p>
<ion-row>
<ion-col size="4" class="p0">
<input class="" type="text" placeholder="_ _ _">
</ion-col>
<ion-col class="p0"></ion-col>
</ion-row>
</div>
<div class="row">
<button class="login_btn">ADD</button>
</div>
</div>
</div>
</ion-content>
\ No newline at end of file
.login_wrapper {
width: 80%;
margin: 0 auto;
padding-top: 30px;
.logo_wrapper {
width: 100%;
text-align: center;
padding-top: 50px;
padding-bottom: 30px;
img {
width: 180px;
}
}
h6 {
color: rgba(41, 40, 91, 1);
margin: 0px;
span {
position: relative;
top: 2px;
}
a {
color: rgba(41, 40, 91, 1);
text-decoration: none;
font-weight: 900;
}
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 6px;
top: 11px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
}
}
}
.form_div {
.row {
margin-bottom: 20px;
input {
border: 1px solid rgba(215, 213, 228, 1);
background: transparent;
color: rgba(215, 213, 228, 1);
width: 100%;
height: 45px;
text-align: left;
border-radius: 8px;
font-size: 16px;
padding-left: 15px;
padding-right: 15px;
text-align: center;
}
.login_btn {
width: 100%;
background-color: #29285b;
color: #fff;
border-radius: 8px;
height: 45px;
font-size: 16px;
}
hr {
border: 1px solid rgba(215, 213, 228, 1);
border-bottom: none;
margin-top: 30px;
margin-bottom: 10px;
}
P {
text-align: left;
color: rgba(59, 57, 77, 1);
margin: 0px;
font-weight: 500;
padding-bottom: 10px;
span {
background-color: #fff;
padding: 10px;
font-size: 18px;
}
}
h4 {
color: rgba(59, 57, 77, 1);
text-align: center;
margin: 0px;
padding-top: 15px;
}
h6 {
color: rgba(41, 40, 91, 1);
margin: 0px;
span {
position: relative;
top: 5px;
}
a {
color: rgba(41, 40, 91, 1);
text-decoration: none;
font-weight: 900;
}
.styled-checkbox {
position: absolute; // take it out of document flow
opacity: 0; // hide it
&+label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
&+label:before {
content: '';
margin-right: 10px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
border-radius: 10px;
background: white;
border: 1px solid rgba(215, 213, 228, 1);
}
// Box hover
// Box checked
&:checked+label:before {
background: #29285b;
}
// Disabled state label.
&:disabled+label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled+label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked+label:after {
content: '';
position: absolute;
left: 10px;
top: 15px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
}
}
}
.social_div {
border: 1px solid rgba(215, 213, 228, 1);
height: 45px;
border-radius: 20px;
.social_btn {
display: inline-block;
width: 50%;
text-align: center;
height: 100%;
font-size: 18px;
padding: 9px;
}
}
}
}
}
\ No newline at end of file
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddcardPage } from './addcard.page';
describe('AddcardPage', () => {
let component: AddcardPage;
let fixture: ComponentFixture<AddcardPage>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddcardPage ],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddcardPage);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-addcard',
templateUrl: './addcard.page.html',
styleUrls: ['./addcard.page.scss'],
})
export class AddcardPage implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '', loadChildren: './landing/landing.module#LandingPageModule'
},
{ path: 'tabs',loadChildren: './tabs/tabs.module#TabsPageModule' },
{ path: 'login', loadChildren: './login/login.module#LoginPageModule' },
{ path: 'signup', loadChildren: './signup/signup.module#SignupPageModule' },
{ path: 'verification', loadChildren: './verification/verification.module#VerificationPageModule' },
{ path: 'forgot', loadChildren: './forgot/forgot.module#ForgotPageModule' },
{ path: 'changepass', loadChildren: './changepass/changepass.module#ChangepassPageModule' },
{ path: 'orderdelivered', loadChildren: './orderdelivered/orderdelivered.module#OrderdeliveredPageModule' },
{ path: 'orderplaced', loadChildren: './orderplaced/orderplaced.module#OrderplacedPageModule' },
{ path: 'ordercancelled', loadChildren: './ordercancelled/ordercancelled.module#OrdercancelledPageModule' },
{ path: 'myorder', loadChildren: './myorder/myorder.module#MyorderPageModule' },
{ path: 'cart', loadChildren: './cart/cart.module#CartPageModule' },
{ path: 'changedetails', loadChildren: './changedetails/changedetails.module#ChangedetailsPageModule' },
{ path: 'wishlist', loadChildren: './wishlist/wishlist.module#WishlistPageModule' },
{ path: 'addaddresss', loadChildren: './addaddresss/addaddresss.module#AddaddresssPageModule' },
{ path: 'profile', loadChildren: './profile/profile.module#ProfilePageModule' },
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'productlist', loadChildren: './productlist/productlist.module#ProductlistPageModule' },
{ path: 'productdetail', loadChildren: './productdetail/productdetail.module#ProductdetailPageModule' },
{ path: 'reviewlist', loadChildren: './reviewlist/reviewlist.module#ReviewlistPageModule' },
{ path: 'catagory', loadChildren: './catagory/catagory.module#CatagoryPageModule' },
{ path: 'trackorder', loadChildren: './trackorder/trackorder.module#TrackorderPageModule' },
{ path: 'storelist', loadChildren: './storelist/storelist.module#StorelistPageModule' },
{ path: 'nearby', loadChildren: './nearby/nearby.module#NearbyPageModule' },
{ path: 'review', loadChildren: './review/review.module#ReviewPageModule' },
{ path: 'delivery', loadChildren: './delivery/delivery.module#DeliveryPageModule' }, { path: 'addcard', loadChildren: './addcard/addcard.module#AddcardPageModule' }
];
@NgModule({
imports: [
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
],
exports: [RouterModule]
})
export class AppRoutingModule {}
<ion-app>
<ion-split-pane>
<ion-menu>
<ion-content>
<div class="side_menu_wrapper">
<div class="top_banner">
<div class="top_image">
</div>
<div class="top_detail">
<h4>John Doe</h4>
<p>[email protected]</p>
</div>
<div class="clear"></div>
</div>
<div class="sidemenu_list">
<ul>
<li>Shop</li>
<li>About us</li>
<ion-menu-toggle>
<li (click)="vieworder('myorder')">View Order</li>
</ion-menu-toggle>
<div class="sub_menu">
<ul>
<li>Men's Fashion</li>
<li>Women's Fashion</li>
<li>Features</li>
<li>Bags</li>
<li>Shoes</li>
<li>Electronics</li>
</ul>
</div>
<li>Complaints & Feedback</li>
<li>
<span class="floatLeft" (click)="authService.SignOut()">Logout</span>
<span class="floatRight version">Version 0.1.0.2</span>
<div class="clear"></div>
</li>
</ul>
</div>
</div>
</ion-content>
</ion-menu>
<ion-router-outlet main></ion-router-outlet>
</ion-split-pane>
</ion-app>
\ No newline at end of file
@import url('https://fonts.googleapis.com/css?family=Abel&display=swap');
@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
* {
font-family: 'Abel', sans-serif;
-webkit-font-smoothing: antialiased;
}
.side_menu_wrapper {
background: rgba(41, 40, 91, 1);
width: 100%;
height: 100vh;
padding-left: 20px;
padding-top: 20px;
padding-right: 10px;
.top_banner {
.top_image {
width: 60px;
height: 60px;
float: left;
background-color: #fff;
border-radius: 50%;
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border-radius: 50%;
}
}
.top_detail {
width: calc(100% - 60px);
float: left;
padding: 7px;
padding-left: 15px;
h4 {
margin: 0px;
padding: 0px;
color: #fff;
}
p {
margin: 0px;
padding: 0px;
color: #fff;
color: rgba(176, 174, 199, 1);
}
}
}
.sidemenu_list {
padding-top: 30px;
ul {
margin: 0px;
padding: 0px;
li {
list-style: none;
color: #fff;
font-weight: 200;
font-size: 15px;
padding: 10px;
font-size: 16px;
&:focus {
background-color: rgba(40, 36, 88, 1);
}
&:hover {
background-color: rgba(40, 36, 88, 1);
}
.version {
color: rgba(176, 174, 199, 1);
font-size: 14px;
}
}
.sub_menu {
padding-left: 25px;
margin-bottom: 40px;
padding-top: 10px;
ul {
margin: 0px;
padding: 0px;
li {
list-style: none;
color: rgba(176, 174, 199, 1);
}
}
}
}
}
}
\ No newline at end of file
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 { 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 },
],
}).compileComponents();
}));
it('should create the app', () => {
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();
});
// TODO: add more tests!
});
import { Component } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { AngularFirestore, AngularFirestoreDocument, AngularFirestoreCollection } from '@angular/fire/firestore';
import * as firebase from 'firebase';
import { ModalController } from '@ionic/angular';
import { DeliverypopPage } from './deliverypop/deliverypop.page';
import { AuthService } from './../config/auth.service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss']
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private router: Router,
public afs: AngularFirestore,
public modalController: ModalController,
public authService: AuthService
) {
this.initializeApp();
this.orderState();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.statusBar.overlaysWebView(true);
this.statusBar.hide();
});
}
async finishpop(data: any) {
const modal = await this.modalController.create({
component: DeliverypopPage,
componentProps: data
});
return await modal.present();
}
orderState() {
console.log('called');
const custId = 'WwHnLICVY2dvZGUHuKqasiTB91a2';
firebase.firestore().collection('orders').where('custId', '==', custId)
.onSnapshot((snapData) => {
snapData.docChanges().forEach((change) => {
if (change.type === 'modified') {
const data = change.doc.data();
if (data.orderStatus === 7) {
this.finishpop(data);
}
}
});
});
/*
.onSnapshot(function(snapshot) {
snapshot.docChanges().forEach(function(change) {
if (change.type === "added") {
console.log("New city: ", change.doc.data());
}
if (change.type === "modified") {
console.log("Modified city: ", change.doc.data());
}
if (change.type === "removed") {
console.log("Removed city: ", change.doc.data());
}
});
}); */
}
vieworder(path, data = null) {
this.router.navigateByUrl(path, { queryParams: data });
document.body.scrollTop = document.documentElement.scrollTop = 0;
}
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { IonicStorageModule } from '@ionic/storage';
import { GooglePlus } from '@ionic-native/google-plus/ngx';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AngularFireModule } from '@angular/fire';
import { AngularFirestore } from '@angular/fire/firestore';
import { AngularFirestoreModule } from '@angular/fire/firestore';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { Geolocation } from '@ionic-native/geolocation/ngx';
import { NativeGeocoder } from '@ionic-native/native-geocoder/ngx';
import { environment } from '../environments/environment';
import { ServiceService } from './../config/service.service';
import { AuthService } from './../config/auth.service';
import { from } from 'rxjs';
import { DeliverypopPageModule} from './deliverypop/deliverypop.module';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [BrowserModule,
IonicModule.forRoot(),
IonicStorageModule.forRoot(),
AppRoutingModule,
BrowserAnimationsModule,
AngularFireModule.initializeApp(environment.firebase),
DeliverypopPageModule,
AngularFireAuthModule,
AngularFirestoreModule,
FormsModule
],
providers: [
StatusBar,
SplashScreen,
Geolocation,
NativeGeocoder,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
ServiceService,
AuthService,
GooglePlus
],
bootstrap: [AppComponent]
})
export class AppModule {}
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 { CartPage } from './cart.page';
const routes: Routes = [
{
path: '',
component: CartPage
}
];
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild(routes)
],
declarations: [CartPage]
})
export class CartPageModule {}
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