Commit 8e5a8aba by Anju M S

update

parents
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
\ No newline at end of file
# 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/
.sourcemaps/
.sass-cache/
.tmp/
.versions/
coverage/
dist/
node_modules/
tmp/
temp/
hooks/
platforms/
plugins/
plugins/android.json
plugins/ios.json
www/
$RECYCLE.BIN/
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
### :point_right: This starter repo has moved to the [ionic-team/starters](https://github.com/ionic-team/starters/tree/master/ionic-angular/official/sidemenu) repo! :point_left:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.vmig.in" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Vmig</name>
<description>Online Salon Appointment Booking Solution.</description>
<author email="[email protected]" href="http://vmig.kz">Vmig</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="23" />
<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="7000" />
<preference name="android-targetSdkVersion" value="26" />
<platform name="android">
<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="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="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="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="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<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="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-geolocation" spec="^4.0.1">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="To locate you" />
</plugin>
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
<plugin name="cordova-plugin-request-location-accuracy" spec="^2.2.3" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" spec="^3.2.2" />
<plugin name="cordova-android-support-gradle-release" spec="^1.4.4">
<variable name="ANDROID_SUPPORT_VERSION" value="23.+" />
</plugin>
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="cordova-plugin-nativegeocoder" spec="^3.1.2" />
<plugin name="onesignal-cordova-plugin" spec="^2.4.5" />
<engine name="android" spec="6.3.0" />
</widget>
{
"name": "haircutbox",
"integrations": {
"cordova": {}
},
"type": "ionic-angular"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "haircutbox",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/compiler-cli": "5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@angular/router": "^7.2.14",
"@ionic-native/camera": "^4.17.0",
"@ionic-native/core": "4.3.2",
"@ionic-native/geolocation": "^4.20.0",
"@ionic-native/in-app-browser": "^5.3.0",
"@ionic-native/launch-navigator": "^5.3.0",
"@ionic-native/location-accuracy": "^4.17.0",
"@ionic-native/native-geocoder": "^4.20.0",
"@ionic-native/onesignal": "^4.17.0",
"@ionic-native/splash-screen": "4.3.2",
"@ionic-native/status-bar": "4.3.2",
"@ionic/storage": "2.1.3",
"@ngx-translate/core": "^9.1.1",
"@ngx-translate/http-loader": "^2.0.1",
"cordova-admobsdk": "^7.37.0",
"cordova-android": "6.3.0",
"cordova-ios": "4.4.0",
"cordova-plugin-actionsheet": "^2.2.2",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-admobpro-firebase": "^2.37.0",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-extension": "^1.5.4",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-nativegeocoder": "^3.1.2",
"cordova-plugin-request-location-accuracy": "^2.2.3",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"ionic": "^3.9.2",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic3-star-rating": "^1.1.4",
"ionicons": "3.0.0",
"jquery": "^3.4.1",
"onesignal-cordova-plugin": "^2.4.5",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.2.2",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.3",
"@types/googlemaps": "^3.30.19",
"typescript": "2.4.2",
"ws": "3.3.2",
"cordova-android-support-gradle-release": "^1.4.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-camera": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-request-location-accuracy": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"cordova-plugin-nativegeocoder": {},
"onesignal-cordova-plugin": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-admobpro-firebase": {
"PLAY_SERVICES_VERSION": "16.0.0"
},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "23.+"
}
},
"platforms": [
"android"
]
}
}
\ No newline at end of file
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/
57993656f105732be5f5e4a9b7b797b8
\ No newline at end of file
fec59aa43a02f7aa055f06d923601500
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { Nav, Platform, Events } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { LocationAccuracy } from '@ionic-native/location-accuracy';
import { Geolocation } from '@ionic-native/geolocation';
import { Storage } from '@ionic/storage';
import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderForwardResult, NativeGeocoderOptions } from '@ionic-native/native-geocoder';
import { OneSignal } from '@ionic-native/onesignal';
import { user } from '../providers/model/model';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../providers/subject.service';
import { WebService_lang } from '../providers/web.service';
import * as $ from 'jquery';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
@ViewChild('language') language: ElementRef;
rootPage: any = "HomePage";
device_id:any;
local:user;
lang = 'en';
pages: Array<{title: string, component: any}>;
constructor(public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
public storage:Storage,
/*private geolocation: Geolocation,
private locationAccuracy: LocationAccuracy,
private nativeGeocoder: NativeGeocoder, */
public oneSignal: OneSignal,
public events: Events) {
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
events.subscribe('user:created', (user, time) => {
console.log(user);
this.local = user;
});
this.initializeApp();
// used for an example of ngFor and navigation
/* this.pages = [
{ title: 'Home', component: HomePage },
{ title: 'List', component: ListPage }
];*/
}
ngOnInit() {
this.language.nativeElement.value = this.lang === 'ru' ? 1 : 0;
}
changeLang(val: string) {
console.log("selected"+val);
if (val == '1') {
$('body').addClass('ru');
this.lang = 'ru';
this.service_lang.setLocalStorageItem('lang', 'ru');
this.subjectService.changeLang('ru');
} else {
$('body').removeClass('ru');
this.lang = 'en';
this.service_lang.setLocalStorageItem('lang', 'en');
this.subjectService.changeLang('en');
}
}
initializeApp() {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.statusBar.styleDefault();
this.splashScreen.hide();
this.enable_location()
this.storage.get('user_data').then(data => {
console.log(data)
if (data) {
this.local = data
}
})
this.triggerNotification();
});
}
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
this.nav.setRoot(page);
}
open_page(page){
this.nav.push(page);
}
enable_location() {
var current_loc = 'Infopark, Kakkanad, Ernakulam';
var current_lat_lng = {'lat' : 10.0120 ,'lng' :76.3608}
this.storage.set('current',{'location':current_loc,'lat_lng':current_lat_lng});
this.storage.set('lat_lng', {'lat' : current_lat_lng.lat ,'lng' :current_lat_lng.lng} );
/*let optionss: NativeGeocoderOptions = {
useLocale: true,
maxResults: 5
};
this.geolocation.getCurrentPosition().then((resp) => {
//console.log(resp);
//console.log(resp);
this.nativeGeocoder.reverseGeocode(resp.coords.latitude, resp.coords.longitude, optionss).then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0]))).catch((error: any) => console.log(error));
}).catch((error) => {
console.log('Error getting location', error);
});
let watch = this.geolocation.watchPosition();
var This = this;
watch.subscribe((data) => {
console.log(data);
this.nativeGeocoder.reverseGeocode(data.coords.latitude, data.coords.longitude, optionss).then((result: NativeGeocoderReverseResult[]) => {
/*This.storage.set('current_loc',result[0].subLocality+", "+result[0].locality+", "+result[0].subAdministrativeArea+", "+result[0].administrativeArea+", "+result[0].countryName);
This.storage.set('current_lat_lng', {'lat' : data.coords.latitude ,'lng' :data.coords.longitude} );*/
/*var current_loc = result[0].subLocality+", "+result[0].locality+", "+result[0].subAdministrativeArea+", "+result[0].administrativeArea+", "+result[0].countryName;
var current_lat_lng = {'lat' : data.coords.latitude ,'lng' :data.coords.longitude};
This.storage.set('current',{'location':current_loc,'lat_lng':current_lat_lng});
//This.openPage("HomePage");
console.log(JSON.stringify(result[0]))
}).catch((error: any) => console.log(error));
//"countryCode":"IN","countryName":"India","postalCode":"682030","administrativeArea":"Kerala","subAdministrativeArea":"Ernakulam","locality":"Kakkanad","subLocality":"Infopark"
// data can be a set of coordinates, or an error (if an error occurred).
// data.coords.latitude
// data.coords.longitude
});
console.log("map called");
let options = {
enableHighAccuracy: true
};
this.locationAccuracy.canRequest().then((res: boolean) => {
if (res) {
console.log(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY);
let location_accuracyy = Number(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY);
let location_accuracy = location_accuracyy.toString();
this.locationAccuracy.request(location_accuracyy).then((loc) => {
this.geolocation.getCurrentPosition().then(pos => {
console.log('lat: ' + pos.coords.latitude + ', lon: ' + pos.coords.longitude);
console.log(pos);
this.storage.set('lat_lng', {'lat' : pos.coords.latitude ,'lng' :pos.coords.longitude} );
}).catch((err) => {
alert(err);
})
}, (error) => {
alert(error);
})
}
},(error)=>{
console.log(error);
})*/
}
triggerNotification() {
var This = this;
this.oneSignal.startInit('cd0f950d-2b1c-4c16-949d-bff73a8c1f56', '255038393105');
this.oneSignal.registerForPushNotifications();
this.oneSignal.inFocusDisplaying(this.oneSignal.OSInFocusDisplayOption.None);
this.oneSignal.getIds().then((ids) => {
console.log('getIds: ' + JSON.stringify(ids));
this.device_id =ids;
console.log(this.device_id.userId);
This.storage.set('get_deviceId',this.device_id);
});
console.log('here i');
this.storage.get('get_deviceId').then(data => {
console.log("asdasdasdsad");
console.log(data);
if(data){
this.device_id = data.userId;
console.log(this.device_id.userId);
}
})
this.oneSignal.handleNotificationReceived().subscribe((msg) => {
console.log('Notification received');
console.dir(msg);
});
this.oneSignal.handleNotificationOpened().subscribe((msg) => {
console.log('Notification opened');
this.nav.push('HomePage');
/*console.log(JSON.stringify(msg));
var pool_id = msg.notification.payload.additionalData.pool_id;
if(pool_id)
this.nav.setRoot('QuoteDetailsPage',{'pool_id' : pool_id,'from_push' : false});*/
//console.log(this.event_id);
//this.detail(this.event_id);
});
this.oneSignal.endInit();
}
login(){
this.storage.remove('user_data');
this.storage.remove('token');
this.local = undefined;
this.nav.setRoot("LoginPage");
}
}
<ion-menu [content]="content">
<ion-content class="sidemenu_main">
<div class="language_change">
<ion-row>
<ion-col col-6>
<p>{{'common.Choose_Language' | translate}}</p>
</ion-col>
<ion-col col-6>
<select id="translation" class="translation" #language (change)="changeLang($event.target.value)">
<option value="0" selected>EN</option>
<option value="1">RU</option>
</select>
</ion-col>
</ion-row>
</div>
<div class="sidemenu_main" *ngIf="local">
<div class="sidemnu_profile_circle">
<img [src]="local.profile_pic" onError="this.src='assets/imgs/spa.jpg';">
</div>
<h6>{{'common.Hi' | translate}}</h6>
<h4>{{local.firstname}} {{local.lastname}}</h4>
<ul>
<li (click)="openPage('HomePage')" menuClose>
{{'common.Home' | translate}}</li>
<li (click)="open_page('ProfilePage')" menuClose>
{{'common.My_Profile' | translate}}</li>
<li (click)="open_page('MybookingPage')" menuClose>
{{'common.My_Booking' | translate}}</li>
<!-- <li (click)="open_page('NotificationPage')" menuClose>
<ion-icon name="md-arrow-dropright"></ion-icon>Notifications</li> -->
<!-- <li (click)="open_page('MessagePage')" menuClose>
<ion-icon name="md-arrow-dropright"></ion-icon>My Chats</li> -->
<li (click)="login()" menuClose>
{{'common.Logout' | translate}}</li>
</ul>
</div>
<div class="sidemenu_main" *ngIf="!local">
<div class="sidemnu_profile_circle">
</div>
<h6>{{'common.Hi' | translate}} </h6>
<h4> {{'common.Guest' | translate}}</h4>
<ul>
<li (click)="openPage('HomePage')" menuClose>
{{'common.Home' | translate}}</li>
<li menuClose (click)="openPage('LoginPage')">
{{'common.Sign_in' | translate}}
</li>
<li menuClose (click)="openPage('SignupPage')">
{{'common.Sign_Up' | translate}}
</li>
<li menuClose (click)="openPage('ForgotPage')">
{{'common.Forgot_Password' | translate}}
</li>
</ul>
</div>
</ion-content>
</ion-menu>
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
\ No newline at end of file
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { Camera } from '@ionic-native/camera';
import { LocationAccuracy } from '@ionic-native/location-accuracy';
import { Geolocation } from '@ionic-native/geolocation';
import { NativeGeocoder } from '@ionic-native/native-geocoder';
import { HttpClientModule,HttpClient } from '@angular/common/http';
import { HttpModule, Http } from '@angular/http';
import { IonicStorageModule } from '@ionic/storage';
import { OneSignal } from '@ionic-native/onesignal';
import { MyApp } from './app.component';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { CommonProvider } from '../providers/common/common';
import { LaunchNavigator, LaunchNavigatorOptions } from '@ionic-native/launch-navigator/ngx';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { TranslateModule, TranslateLoader} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import { SubjectService } from './../providers/subject.service';
import { WebService_lang } from './../providers/web.service';
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
@NgModule({
declarations: [
MyApp
],
imports: [
BrowserModule,
IonicModule.forRoot(MyApp),
TranslateModule.forRoot(),
IonicStorageModule.forRoot(),
HttpModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [
StatusBar,
SplashScreen,
LocationAccuracy,
Geolocation,
NativeGeocoder,
Camera,
OneSignal,
WebService_lang,
SubjectService,
{provide: ErrorHandler, useClass: IonicErrorHandler},
CommonProvider,
LaunchNavigator,
InAppBrowser
]
})
export class AppModule {}
/*
Site Name: BMSV2App
URI: http:
Description: This is the theme css for BMSV2App
Version: 0.1
Author: Amal-Techware Solution
Author URI:
Tags:
---------------------------
THEME STYLES
---------------------------
TABLE OF CONTENTS
---------------------------
01. FONTS-N-SIZES
02. FONTS-COLOR
03. THEMES-N-BACKGROUNDS
04. SPACING-N-POSITIONS
05. ALIGMENTS
06. ALERTS-N-MESSAGES
07. BODY-STRUCTURE
08. OVERWRITTEN
*/
/*-------------------------------
01. FONTS-N-SIZES
--------------------------------*/
@import url('https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i');
* {
font-family: 'Roboto', sans-serif;
}
*::-webkit-scrollbar {
display: none;
}
.no-scroll .scroll-content {
overflow: hidden;
}
a {
text-decoration: none !important;
}
.content {
background: #eeee;
}
/*-------------------------------
02. FONTS-SETTINGS
--------------------------------*/
.text_color_white {
color: #fff !important;
}
.text_color_theme {
color: #f0525f !important;
}
.font_size_xs {
font-size: 12px !important;
}
.font_size_sm {
font-size: 14px !important;
}
.font_size_md {
font-size: 16px !important;
}
.font_size_lg {
font-size: 18px !important;
}
.font_size_xl {
font-size: 20px !important;
}
.font_size_vl {
font-size: 35px !important;
}
.font_weight300 {
font-weight: 300 !important;
}
.font_weight400 {
font-weight: 400 !important;
}
.font_weight500 {
font-weight: 500 !important;
}
.font_weight600 {
font-weight: 600 !important;
}
/*-------------------------------
03. THEMES-N-BACKGROUNDS
--------------------------------*/
.theme_background {
background-color: rgba(240, 82, 95, 0.9);
}
.theme_transparent {
background: transparent !important;
}
.theme_white {
background-color: #f7f8fd !important;
}
.theme_off_white {
background-color: #f4f4f4 !important;
}
.theme_dark_transparent {
background-color: rgba(0, 0, 0, 0.6) !important;
}
.theme_white_transparent {
background-color: rgba(243, 243, 243, 0.6) !important;
}
/*-------------------------------
04. SPACING-N-POSITIONS
--------------------------------*/
.width25 {
width: 25% !important;
}
.width50 {
width: 50% !important;
}
.width75 {
width: 75% !important;
}
.widthFull {
width: 100% !important;
}
.widthAuto {
width: auto !important;
}
.height25 {
height: 25% !important;
}
.height50 {
height: 50% !important;
}
.height75 {
width: 75% !important;
}
.heightFull {
height: 100% !important;
}
.heightAuto {
height: auto !important;
}
.p0 {
padding: 0px !important;
}
.pl0 {
padding-left: 0px !important;
}
.pr0 {
padding-right: 0px !important;
}
.pt0 {
padding-top: 0px !important;
}
.pb0 {
padding-bottom: 0px !important;
}
.p10 {
padding: 10px !important;
}
.m0 {
margin: 0px !important;
}
.ml0 {
margin-left: 0px !important;
}
.mr0 {
margin-right: 0px !important;
}
.mt0 {
margin-top: 0px !important;
}
.mb0 {
margin-bottom: 0px !important;
}
.mAuto {
margin: 0 auto !important;
}
.clear {
clear: both !important;
}
.absolute {
position: absolute !important;
}
.relative {
position: relative !important;
}
.fixed {
position: fixed !important;
}
/*-------------------------------
05. ALIGMENTS
--------------------------------*/
.floatLeft {
float: left !important;
}
.floatRight {
float: right !important;
}
.textLeft {
text-align: left !important;
}
.textRight {
text-align: right !important;
}
.textCenter {
text-align: center !important;
}
/*-------------------------------
06. ALERTS-N-MESSAGES
--------------------------------*/
.alert {
padding: 10px;
border: 1px solid transparent;
font-weight: 600;
transition: all 0.5s ease;
border-bottom: 0px;
font-weight: 200;
letter-spacing: 2px;
}
.warning {
color: #fff;
background-color: #8a6d3b;
}
.success {
color: #fff;
background-color: #3c763d;
}
.error {
color: #fff;
background-color: #a94442;
}
/*-------------------------------
07. BODY-STRUCTURE
--------------------------------*/
.nav_header {
width: 100%;
z-index: 999;
}
.nav_btn {
width: 50px !important;
height: 50px !important;
background: transparent;
margin: 0px;
font-size: 25px;
color: #fff;
padding: 0px !important;
box-shadow: none !important;
background-repeat: no-repeat !important;
background-position: center !important;
background-size: 25px !important;
}
.nav_header_title {
height: 100%;
font-weight: 400;
font-size: 16px;
color: #fff;
padding: 7px;
font-weight: 400;
text-transform: capitalize;
width: calc(100% - 100px);
letter-spacing: 1px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding-left: 8px;
padding-right: 8px;
text-align: center;
}
.nav_header_title img {
width: 100px;
}
.nav_header_title .icon {}
.clear {
clear: both !important;
}
.border {
border: 1px solid;
}
.borderNone {
border: none !important;
}
.nav_menu {
background: url('../assets/imgs/nav_menu.png');
}
.nav_back {
background: url('../assets/imgs/nav_back.png');
}
.nav_back_dark {
background: url('../assets/imgs/nav_back_dark.png');
}
.nav_cart_dark {
background: url('../assets/imgs/nav_cart_dark.png');
}
.nav_option {
background: url('../assets/imgs/nav_option.png');
}
.nav_search {
background: url('../assets/imgs/nav_search.png');
background-size: 30px !important;
}
.nav_search_dark {
background: url('../assets/imgs/nav_search_dark.png');
}
.nav_filter_dark {
background: url('../assets/imgs/nav_filter_dark.png');
}
.nav_header_title h5 {
color: #fff;
margin: 0px;
padding: 7px;
text-align: left;
font-weight: 300;
padding-left: 0px;
}
.nav_white_header {
background: #ffffff;
.nav_btn {
color: #606060;
}
.nav_header_title {
h5 {
color: #707070;
text-align: left;
font-weight: 400;
}
}
}
/*-------------------------------
08. OVERWRITTEN
--------------------------------*/
.header-md::after,
.tabs-md[tabsPlacement="top"]>.tabbar::after,
.footer-md::before,
.tabs-md[tabsPlacement="bottom"]>.tabbar::before {
background: none !important;
}
.activated {
background: transparent !important;
}
button {
box-shadow: none !important;
}
.item-input-has-focus {
.item-inner {
box-shadow: none !important;
border: none !important;
transition: none !important;
}
}
.item-input-has-focus:last-child {
.item-inner {
box-shadow: none !important;
border: none !important;
transition: none !important;
}
}
.item {
background: transparent !important;
padding: 0px !important;
border: none !important;
.item-inner {
padding: 0px !important;
.input {
height: 100%;
.text-input {
padding: 0px !important;
margin: 0px !important;
width: 100%;
}
}
}
}
.button-md:hover:not(.disable-hover) {
background: transparent !important;
}
.alert-wrapper {
background: url('../assets/imgs/header.png');
background-size: cover !important;
background-position: center !important;
.alert-radio-group {
border: none;
.alert-radio-icon {
border-color: #fff !important;
.alert-radio-inner {
background: #fff !important;
}
}
.alert-radio-label {
color: #fff;
font-weight: 200;
font-size: 16px;
}
}
.alert-button-group {
padding: 0px !important;
.alert-button {
padding: 15px !important;
margin: 0px !important;
width: 50% !important;
color: #fff;
font-weight: 300;
text-transform: capitalize;
.button-inner {
text-align: center !important;
justify-content: center !important;
}
}
}
}
.on_demo {
font-size: 16px;
color: #3e1e5f;
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
font-weight: 400;
img {
width: 150px;
padding-bottom: 20px;
}
}
.sidemenu_wrapper {
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
overflow-y: hidden;
padding-left: 20px;
.profile_banner {
.profie_circle {
width: 100px;
height: 100px;
border-radius: 50%;
background: #da1c5c;
border-radius: 50%;
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
}
h5 {
margin: 0px;
color: #fff;
padding-top: 15px;
font-size: 30px;
font-weight: 300;
text-align: left;
}
p {
margin: 0px;
color: #fff;
font-size: 16px;
font-weight: 300;
text-align: left;
}
hr {
margin: 0px;
padding: 0px;
border: 2px solid #ffd200;
width: 30px;
margin-top: 10px;
height: 0px;
}
}
ul {
padding: 0px;
margin: 0px;
padding-top: 30px;
li {
list-style: none;
font-size: 18px;
font-weight: 200;
color: #fff;
text-align: left;
padding-bottom: 20px;
.icon {
margin-right: 10px;
}
}
}
}
.picker-wrapper {
background: #ef5958 !important;
}
.picker-toolbar {
background: #ef5958 !important;
.picker-button {
color: #fff !important;
font-weight: 300;
font-size: 18px;
text-transform: capitalize;
}
}
.picker-opt {
color: #fff !important;
font-weight: 300 !important;
font-size: 16px !important;
}
.picker-opt-selected {
font-weight: 500 !important;
font-size: 22px !important;
}
.language_change{
padding: 15px;
p{
color: #fff;
margin: 0px;
padding:4px;
height:30px;
text-align:left;
}
select{
width: 100%;
border:none;
background: transparent;
height:30px;
color: #fff;
}
}
.sidemenu_main {
padding: 30px;
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
overflow-y: hidden;
background: url("../assets/imgs/sidemenu_bg.png");
.sidemnu_profile_circle {
width: 120px;
height: 120px;
border-radius: 50%;
background: #fff;
img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
}
h6 {
color: #fff;
margin: 0px;
padding-top: 30px;
text-align: left;
font-size: 25px;
font-weight: 300;
}
h4 {
color: #fff;
margin: 0px;
text-align: left;
font-size: 28px;
font-weight: 400;
padding-bottom: 10px;
}
ul {
padding: 0px;
li {
list-style: none;
text-align: left;
color: #fff;
font-weight: 300;
font-size: 22px;
padding-top: 10px;
padding-bottom: 10px;
.icon {
padding-right: 15px;
}
}
}
}
.no_shop{
font-size:20px;
font-weight:300;
}
\ No newline at end of file
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
{
"common":{
"Choose_Language":"Choose Language",
"User_Credential":"User Credential",
"Password":"Password",
"Username":"Username",
"Email_ID":"Email ID",
"Phone_No":"Phone No",
"Confirm_Password":"Confirm Password",
"enter_your_address":"Enter your address",
"Pick_date":"Pick date",
"Pick_time":"Pick time",
"First_name":"First name",
"Last_name":"Last name",
"Guest":"Guest",
"on":"on",
"at":"at",
"English":"English",
"Russian":"Russian",
"Shop_Details":"Shop Details",
"Book":"Book",
"Working_Hours":"Working Hours",
"Services_Available":"Services Available",
"Gallery":"Gallery",
"Reviews":"Reviews",
"Filter":"Filter",
"Services":"Services",
"Offers":"Offers",
"Gender":"Gender",
"Location":"Location",
"Female":"Female",
"Unisex":"Unisex",
"Forgot_Password":"ForgotPassword",
"Invalid_Email_id,_kindly_retype_the_correct_mail_id":"Invalid Email id, kindly retype the correct mail id",
"Submit":"Submit",
"to_signup":"to signup",
"Home":"Home",
"Current_Location":"Current Location",
"No_Shops_available_in_this_city":"No Shops available in this city",
"List":"List",
"You_navigated_here_from":"You navigated here from",
"Invalid_Credential":"Invalid Credential",
"Login":"Login",
"Forgot_Password?":"Forgot Password",
"My_Chats":"My Chats",
"Tomiris_Abesheva":"Tomiris Abesheva",
"Hi,_How_are_you?":"Hi, How are you?",
"Aidar_Smagulov":"Aidar Smagulov",
"Diana_Smagulova":"Diana Smagulova",
"PM":"PM",
"Kamilla_Lee":"Kamilla Lee",
"My_Booking":"My Booking",
"Bookings":"Bookings",
"Completed":"Completed",
"Date":"Date",
"Time":"Time",
"Total_Amount":"Total Amount",
"Status":"Status",
"COLLECT_ITEM":"COLLECT ITEM",
"Notifications":"Notifications",
"Edit_Profile":"Edit Profile",
"First_Name_Required":"First Name Required",
"Lastname_Name_Required":"Lastname Name Required",
"Please_input_valid_email_ID":"Please input valid email ID",
"Male":"Male",
"Please_input_valid_Mobile_No":"Please input valid Mobile No",
"SAVE":"SAVE",
"rate":"rate",
"Booking":"Booking",
"Choose_your_booking_date":"Choose your booking date",
"Choose_your_booking_time":"Choose your booking time",
"Choose_your_services":"Choose your services",
"Total_Fare":"Total Fare",
"Apply":"Apply",
"shop":"shop",
"Username_is_required":"Username is required",
"Enter_a_valid_Email":"Enter a valid Email",
"Enter_a_valid_Phone_no":"Enter a valid Phone no",
"Password_length_is_6_character":"Password length is 6 character",
"Password_Mismatch":"Password Mismatch",
"I_accept_terms_&_condition":"I accept terms & condition",
"Please_accept_condition":"Please accept condition",
"Sign_Up":"Sign Up",
"Sign_in":"Sign in",
"Already_had_an_account?":"Already had an account?",
"Minimum_6_characters_required":"Minimum 6 characters required",
"Are_you_new_to_VMig?":"Are you new to VMig?",
"Click_here":"Click here",
"Success!":"Success!",
"Your_booking_has_been_confirmed":"Your booking has been confirmed",
"Booking_ID_is":"Booking ID is",
"Go_to_Home":"Go to Home",
"My_Profile":"My Profile",
"Logout":"Logout",
"Hi":"Hi"
}
}
\ No newline at end of file
{
"common":{
"Choose_Language":"Выберите язык",
"User_Credential":"Учетные данные пользователя",
"Password":"пароль",
"Username":"имя пользователя",
"Email_ID":"Эл. адрес",
"Phone_No":"Номер телефона",
"Confirm_Password":"Подтвердите Пароль",
"enter_your_address":"Введите свой адрес",
"Pick_date":"Выберите дату",
"Pick_time":"Выбрать время",
"First_name":"Имя",
"Last_name":"Фамилия",
"Guest":"гость",
"on":"на",
"at":"в",
"English":"английский",
"Russian":"русский",
"Shop_Details":"О Салоне",
"Book":"Запись",
"Working_Hours":"Рабочий График",
"Services_Available":"Доступные Услуги",
"Gallery":"Галерея",
"Reviews":"Отзывы",
"Filter":"Фильтр",
"Services":"Услуги",
"Offers":"Акций",
"Gender":"Пол",
"Location":"Местоположение",
"Female":"Женский",
"Unisex":"Унисекс",
"Forgot_Password":"Забыл пароль",
"Invalid_Email_id,_kindly_retype_the_correct_mail_id":"Проверьте правильность email",
"Submit":"Отправить",
"to_signup":"Для регистраций",
"Home":"Главная",
"Current_Location":"Нынешнее Местоположение",
"No_Shops_available_in_this_city":"Нет доступных салонов в этом городе",
"List":"Лист",
"You_navigated_here_from":"Вы пришли сюда из",
"Invalid_Credential":"Неверные Символы",
"Login":"Логин",
"My_Chats":"Мой чат",
"Tomiris_Abesheva":"Томирис Абашева",
"Hi,_How_are_you?":"Привет, как у вас дела?",
"Aidar_Smagulov":"Айдар Смагулов",
"Diana_Smagulova":"Диана Смагулова",
"PM":"ВЕЧЕРА",
"Kamilla_Lee":"Камила Ли",
"My_Booking":"Мои Заявки",
"Bookings":"Заявки",
"Completed":"Завершено",
"Date":"Дата",
"Time":"Время",
"Total_Amount":"Общая Сумма",
"Status":"Статус",
"COLLECT_ITEM":"СОБРАТЬ ПУНКТ",
"Notifications":"Напоминания",
"Edit_Profile":"Редактировать Профиль",
"First_Name_Required":"Имя (Обязательно)",
"Lastname_Name_Required":"Фамилия (Обязательно)",
"Please_input_valid_email_ID":"Введите свой email",
"Male":"Мужчина",
"Please_input_valid_Mobile_No":"Введите свой номер телефона",
"SAVE":"СОХРАНИТЬ",
"rate":"рейтинг",
"Booking":"Заявка",
"Choose_your_booking_date":"Выберите день записи",
"Choose_your_booking_time":"Выберите время записи",
"Choose_your_services":"Выберите услугу",
"Total_Fare":"Общий Тариф",
"Apply":"Подтвердить",
"shop":"салон",
"Username_is_required":"Требуется логин",
"Enter_a_valid_Email":"Введите свой email",
"Enter_a_valid_Phone_no":"Введите свой номер телефона",
"Password_length_is_6_character":"Пароль минимум из 6 символов",
"Password_Mismatch":"Пароли не совпадают",
"I_accept_terms_&_condition":"Я принимаю все условия сервиса",
"Please_accept_condition":"Пожалуйста, ознакомьтесь с условиями",
"Sign_Up":"Регистрация",
"Sign_in":"Войти",
"Already_had_an_account?":"У вас уже есть аккаунт?",
"Minimum_6_characters_required":"Минимум из 6 символов",
"Are_you_new_to_VMig?":"Вы у нас впервые?",
"Click_here":"Нажать тут",
"Forgot_Password?":"Забыли пароль?",
"Success!":"Успешно!",
"Your_booking_has_been_confirmed":"Ваша заявка успешно принята",
"Booking_ID_is":"Номер Брони",
"Go_to_Home":"На Главную",
"My_Profile":"Мой профайл",
"Logout":"Выйти",
"Hi":"Привет"
}
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>VMig</title>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBniwyiEPSjS9IUvbhBmS0ampJkzE2cSS0"></script>
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
</head>
<body>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The vendor js is generated during the build process
It contains all of the dependencies in node_modules -->
<script src="build/vendor.js"></script>
<!-- The main bundle js is generated during the build process -->
<script src="build/main.js"></script>
</body>
</html>
{
"name": "Ionic",
"short_name": "Ionic",
"start_url": "index.html",
"display": "standalone",
"icons": [{
"src": "assets/imgs/logo.png",
"sizes": "512x512",
"type": "image/png"
}],
"background_color": "#4e8ef7",
"theme_color": "#4e8ef7"
}
\ No newline at end of file
File added
<!--
Generated template for the BookPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>book</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { BookPage } from './book';
@NgModule({
declarations: [
BookPage,
],
imports: [
IonicPageModule.forChild(BookPage),
],
})
export class BookPageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the BookPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-book',
templateUrl: 'book.html',
})
export class BookPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad BookPage');
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" (click)="back()">
<ion-icon name="arrow-back"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>Sandeep Patnaik</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content padding>
<div class="chat_chat_wrap">
<ul>
<li class="chat_received">
<div class="chat_message_photo"></div>
<div class="chat_message_content">
<p> lorem ipsum content</p>
<span>26 Aug</span><span>02:00pm</span>
</div>
<div class="clear"></div>
</li>
<li class="chat_sented">
<div class="chat_message_photo"></div>
<div class="chat_message_content">
<p> lorem ipsum content</p>
<p> lorem ipsum content</p>
<span>26 Aug</span><span>02:00pm</span>
</div>
<div class="clear"></div>
</li>
<li class="chat_received">
<div class="chat_message_photo"></div>
<div class="chat_message_content">
<img src="assets/imgs/ian-avatar.png"><br>
<span>26 Aug</span><span>02:00pm</span>
</div>
<div class="clear"></div>
</li>
</ul>
</div>
</ion-content>
<ion-footer>
<div class="chat_chat_type_wrapper">
<input class="chat_type_text floatLeft" type="text" placeholder="Type your message here">
<button class="chat_send floatRight"><ion-icon name="md-send"></ion-icon></button>
<div class="clear"></div>
</div>
</ion-footer>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ChatPage } from './chat';
@NgModule({
declarations: [
ChatPage,
],
imports: [
IonicPageModule.forChild(ChatPage),
],
})
export class ChatPageModule {}
page-chat {
.letter_btn {
font-size: 18px;
font-weight: 300;
width: 60px !important;
text-transform: capitalize !important;
}
.chat_chat_wrap {
width: 100%;
}
.chat_chat_wrap ul {
margin: 0px;
padding: 0px;
}
.chat_chat_wrap ul li {
list-style: none;
padding-bottom: 20px;
}
.chat_message_photo {
width: 40px;
height: 40px;
border-radius: 50%;
}
.chat_message_photo img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
.chat_message_content {
position: relative;
}
.chat_message_content h6 {
margin: 0px;
padding-bottom: 10px;
font-weight: 400;
}
.chat_message_content p {
margin: 0px;
padding: 15px;
border-radius: 10px;
padding-left: 25px;
padding-right: 25px;
margin-top: 5px;
font-weight: 300;
}
.chat_message_content img {
width: 185px;
height: 150px;
object-fit: cover;
object-position: center;
border-radius: 10px;
}
.chat_message_content span {
margin: 0px;
color: #a4a1a1;
font-size: 10px;
}
.chat_received {}
.chat_sented {}
.chat_received .chat_message_photo {
float: left;
background: #f0525f;
}
.chat_received .chat_message_content {
float: left;
text-align: right;
padding-left: 15px;
}
.chat_received .chat_message_content img {
border: 3px solid #f0525f;
}
.chat_received .chat_message_content p {
background: #f0525f;
color: #fff;
border-top-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.chat_received .chat_message_content span {
margin-right: 10px;
}
.chat_received .chat_message_content .chat_arrow {
width: 30px;
height: 30px;
position: absolute;
bottom: 25px;
left: 0px;
}
.chat_sented .chat_message_photo {
float: right;
background: #b9bdbb;
}
.chat_sented .chat_message_content {
float: right;
text-align: left;
padding-right: 15px;
}
.chat_sented .chat_message_content img {
border: 3px solid #b9b9b9;
}
.chat_sented .chat_message_content p {
background: #b9bdbb;
color: #fff;
border-top-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.chat_sented .chat_message_content span {
margin-left: 10px;
}
.chat_sented .chat_message_content .chat_arrow {
width: 30px;
height: 30px;
position: absolute;
top: 0px;
right: 0px;
}
.chat_chat_type_wrapper {
width: 100%;
position: relative;
padding: 15px;
}
.chat_chat_type_wrapper input {
width: calc(100% - 60px);
height: 50px;
font-size: 16px;
border: none;
padding-left: 30px;
padding-right: 30px;
color: #a2a2a2;
font-weight: 400;
background: #e7e7e7;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;
}
.chat_chat_type_wrapper input::placeholder {
color: #a2a2a2;
}
.chat_send {
width: 50px;
height: 50px;
color: #fff;
background: #f0525f;
border-radius: 50%;
font-size: 24px;
}
.chat_smiley {}
.chat_attach {}
.chat_photo {}
}
\ No newline at end of file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-chat',
templateUrl: 'chat.html',
})
export class ChatPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad ChatPage');
}
back(){
this.navCtrl.pop();
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" (click)="back()">
<ion-icon name="arrow-back"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>{{'common.Shop_Details' | translate}}</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<div *ngIf="result">
<ion-card>
<div class="shop_banner">
<div class="no_service" *ngIf ="result.shop.status == 0">
Салон временно недоступен
</div>
<img src="{{result.shop.image}}" onError="this.src='assets/imgs/advance-card-tmntr.jpg';" />
<div class="shop_detail">
<ion-row>
<ion-col col-9 class="p0">
<h4> {{result.shop.shop_name}}</h4>
</ion-col>
<ion-col col-3 class="p0">
<div *ngIf ="result.shop.status == 1">
<button ion-button small class="book_nw" (click)="book()">
{{'common.Book' | translate}}</button>
</div>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="p0">
<p>
{{result.shop.location}}, {{result.shop.city}}, {{result.shop.state}}, {{result.shop.country}}
</p>
</ion-col>
<ion-col col-3 class="p0">
</ion-col>
</ion-row>
</div>
</div>
<div class="shop_other_details">
<p>
{{result.shop.description}}
</p>
<p><strong>
{{'common.Working_Hours' | translate}}
&nbsp;:&nbsp;</strong> {{result.shop.working_time}}</p>
</div>
</ion-card>
<ion-card>
<div class="services">
<h6>{{'common.Services_Available' | translate}}</h6>
<ion-list *ngFor="let service of result.services">
<ion-row>
<ion-col col-8 class="p0">
<p>{{service.service_name}}</p>
</ion-col>
<ion-col col-4 class="p0 textRight">
<p><strong> <span item-end>{{service.price}}</span></strong></p>
</ion-col>
</ion-row>
</ion-list>
</div>
</ion-card>
<ion-card>
<div class="services">
<h6> {{'common.Gallery' | translate}}</h6>
<div class="gallery">
<ion-slides *ngIf="result.gallery" autoplay="1" loop="1" slidesPerView="1.5">
<ion-slide *ngFor="let images of result.gallery">
<img [src]="images.image_path" onError="this.src='assets/imgs/advance-card-tmntr.jpg';" />
</ion-slide>
</ion-slides>
</div>
</div>
</ion-card><!--
<span (click)="navv()">view map</span> -->
<ion-card (click)="navv()" padding>
<div #maps id="maps" style="height:300px;"></div>
</ion-card>
<ion-card *ngIf="result.review">
<div class="services">
<h6> {{'common.Reviews' | translate}}</h6>
<ul class="reviews">
<li *ngFor="let rev of result.review">
<div class="review_pic">
<img [src]="rev.profile_pic" onError="this.src='assets/imgs/advance-card-tmntr.jpg';">
</div>
<div class="review_detail">
<h2>{{rev.username}}</h2>
<p>{{rev.comments}}</p>
</div>
<div class="clear"></div>
</li>
</ul>
</div>
</ion-card>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { DetailedPage } from './detailed';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
DetailedPage,
],
imports: [
IonicPageModule.forChild(DetailedPage),
TranslateModule
],
})
export class DetailedPageModule {}
page-detailed {
#map {
width: 100%;
height: 100%;
}
.gm-style-iw+div {
display: none;
}
.card{
box-shadow: none;
margin: 5px;
width: calc(100% - 10px);
}
.shop_banner {
height: 250px;
position: relative;
.no_service{
background: rgba(255, 255, 255, 0.9);
position: absolute;
top:0px;
left:0px;
right:0px;
bottom:0px;
text-align: center;
z-index:99;
padding:30%;
font-size:18px;
padding-left:10px;
padding-right:10px;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.shop_detail {
background: rgba(0, 0, 0, 0.7);
position: absolute;
padding: 10px;
bottom: 0px;
left: 0px;
right: 0px;
h4 {
color: #fff;
margin: 0px;
font-size: 24px;
font-weight: 300;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
p {
color: #fff;
margin: 0px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.book_nw {
width: 100%;
margin: 0px;
height: 35px;
border-radius: 0px !important;
font-size: 18px;
font-weight: 300;
letter-spacing: 2px;
}
}
}
.shop_other_details {
padding: 15px;
p {
color: #a8a8a8;
text-align: justify;
font-size: 15px;
padding-bottom: 5px;
}
}
.services {
padding: 10px;
h6 {
color: #f0525f;
font-size: 20px;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid #eee;
}
p {
color: #a8a8a8;
padding: 0px;
padding-bottom: 4px;
strong {
color: #000;
}
}
}
.gallery {
.slides {
height: 200px;
.swiper-slide {
.slide-zoom {
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
border: 5px solid #fff;
border-radius: 10px;
}
}
}
}
}
.reviews {
padding: 0px;
margin: 0px;
padding-top:0px;
li {
list-style: none;
border-bottom: 1px solid #c7c7c7;
padding-bottom: 15px;
padding-top: 15px;
.review_pic {
width: 60px;
height: 60px;
border-radius: 50%;
float: left;
background: #a8a8a8;
img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
}
.review_detail {
float: left;
width: calc(100% - 60px);
padding-left: 10px;
}
}
}
}
\ No newline at end of file
import { Component, ViewChild , ElementRef} from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import { LaunchNavigator, LaunchNavigatorOptions } from '@ionic-native/launch-navigator/ngx';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
@IonicPage()
@Component({
selector: 'page-detailed',
templateUrl: 'detailed.html',
})
export class DetailedPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
//@ViewChild('map') mapElement: ElementRef;
@ViewChild('maps') mapElement: ElementRef;
shop_id:any;
result:any;
data:any;
map: any;
distnc:any;
launchnavigator:any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public storage: Storage,
public iab: InAppBrowser) {
this.shop_id = navParams.get('shop_id');
console.log(this.shop_id);
this.data = {"source_lat":"9.9312","source_lng":"76.2673","destination_lat":"10.0178","destination_lng":"76.3333"}
this.storage.get('set_location').then(curr_data=>{
if(curr_data){
this.data.source_lat = curr_data.lat_lng.lat;
this.data.source_lng = curr_data.lat_lng.lng;
}
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
source: any = [22.303894, 70.802160] // source lat,long
destination: any = [23.022505, 72.571362] // dest lat,long
navigate(){
alert("called");
let options: LaunchNavigatorOptions = {
start: this.source
};
this.launchnavigator.navigate(this.destination, options)
.then(
success => alert('Launched navigator'),
error => alert('Error launching navigator: ' + error)
);
}
ionViewDidLoad() {
console.log('ionViewDidLoad DetailedPage');
var post_data = {"id":this.shop_id,"token":""}
var This = this;
this.storage.get('token').then(data => {
if(data){
post_data['token'] = data;
}
})
this.service.show_loader();
this.service.post_data('shop_details',post_data).subscribe(data=>{
this.result = data;
console.log(this.result);
this.service.hide_loader();
this.data.destination_lat = this.result.shop.latitude;
this.data.destination_lng = this.result.shop.longitude;
setTimeout(() => {
console.log(this.data)
This.loadMap();
}, 500);
//console.log(data);
})
}
navv(){
const source = this.data.source_lat+","+this.data.source_lng;
const dest = this.data.destination_lat+","+this.data.destination_lng;
this.iab.create("https://www.google.com/maps?saddr="+source+"&daddr="+dest, "_system");
}
loadMap(){
console.log('load');
var directionsDisplay = new google.maps.DirectionsRenderer;
var directionsService = new google.maps.DirectionsService;
let latLng = new google.maps.LatLng(this.data.source_lat,this.data.source_lng);
let mapOptions = {
center: latLng,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var icon = {
url: "assets/icon/user.png", // url
scaledSize: new google.maps.Size(30, 30), // scaled size
origin: new google.maps.Point(0,0), // origin
anchor: new google.maps.Point(25, 25) // anchor
};
this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
directionsDisplay.setMap(this.map);
directionsDisplay.setOptions( { suppressMarkers: true } );
this.calculateAndDisplayRoute(directionsService, directionsDisplay);
var markers= new google.maps.Marker({
animation: google.maps.Animation.DROP,
position: new google.maps.LatLng(this.data.source_lat,this.data.source_lng),
icon: icon,
/*label: {
text: name,
color: 'black',
}*/
});
markers.setMap(this.map);
var icon1 = {
url: "assets/icon/shop.png", // url
scaledSize: new google.maps.Size(30, 30), // scaled size
origin: new google.maps.Point(0,0), // origin
anchor: new google.maps.Point(25, 25) // anchor
};
var markers1= new google.maps.Marker({
animation: google.maps.Animation.DROP,
position: new google.maps.LatLng(this.data.destination_lat,this.data.destination_lng),
icon: icon1,
/*label: {
text: name,
color: 'black',
}*/
});
markers1.setMap(this.map);
//this.addmarker_user(this.data,this.data,directionsService,directionsDisplay);
}
calculateAndDisplayRoute(directionsService,directionsDisplay){
var selectedMode ="DRIVING";
var This =this
directionsService.route({
//origin: {lat:Number(this.userdata.crnt_lattitude), lng:Number(this.userdata.crnt_longitude)}, // Haight.
//origin: {lat:Number(this.userdata.crnt_lattitude), lng:Number(this.userdata.crnt_longitude)}, // Haight.
origin: {lat:Number(this.data.source_lat), lng:Number(this.data.source_lng)},
destination: {lat:Number(this.data.destination_lat), lng:Number(this.data.destination_lng)},
travelMode: google.maps.TravelMode[selectedMode]
}, function(response, status) {
console.log(response)
if (status == 'OK') {
var point = response.routes[ 0 ].legs[ 0 ];
console.log(point)
This.distnc = point.duration.text
console.log(This.distnc);
//$( '#travel_data' ).html( 'Estimated travel time: ' + point.duration.text + ' (' + point.distance.text + ')' );
/*
var infowindow = new google.maps.InfoWindow({
content: "ETA "+This.distnc,
});
infowindow.open(This.map, markers);
google.maps.event.addListener(markers, 'click', function() {
infowindow.open(This.map, markers);
});
*/
directionsDisplay.setDirections(response);
} else {
window.alert('Directions request failed due to ' + status);
}
});
}
back(){
this.navCtrl.pop();
}
book(){
console.log(this.result);
this.navCtrl.push('ServicePage',{'shop':this.result});
}
}
<!--
Generated template for the FavouritePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>favourite</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { FavouritePage } from './favourite';
@NgModule({
declarations: [
FavouritePage,
],
imports: [
IonicPageModule.forChild(FavouritePage),
],
})
export class FavouritePageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the FavouritePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-favourite',
templateUrl: 'favourite.html',
})
export class FavouritePage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad FavouritePage');
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft">
<ion-icon name="close" (click)="close()"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>{{'common.Filter' | translate}}</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<div>
<ion-segment [(ngModel)]="filter">
<ion-segment-button value="service">
{{'common.Services' | translate}}
</ion-segment-button>
<ion-segment-button value="sort">
{{'common.Offers' | translate}}
</ion-segment-button>
<ion-segment-button value="gender">
{{'common.Gender' | translate}}
</ion-segment-button>
<ion-segment-button value="location">
{{'common.Location' | translate}}
</ion-segment-button>
</ion-segment>
</div>
<div [ngSwitch]="filter">
<ion-list *ngSwitchCase="'service'" padding>
<ion-card-content *ngIf="response">
<ion-item *ngFor="let service of response">
<ion-label>{{service.service_name}}</ion-label>
<ion-checkbox (ionChange)="filter_select('service',service.id,$event)"></ion-checkbox>
</ion-item>
</ion-card-content>
</ion-list>
<ion-list *ngSwitchCase="'sort'" padding radio-group>
<ion-item (click)="filter_select('offer','0-10')">
<ion-radio value="1"></ion-radio>
<ion-label>0 - 10%</ion-label>
</ion-item>
<ion-item (click)="filter_select('offer','10-20')">
<ion-radio value="2"></ion-radio>
<ion-label>10 - 20%</ion-label>
</ion-item>
<ion-item (click)="filter_select('offer','20-30')">
<ion-radio value="3"></ion-radio>
<ion-label>20 - 30%</ion-label>
</ion-item>
<ion-item (click)="filter_select('offer','30-40')">
<ion-radio value="4"></ion-radio>
<ion-label>30 - 40%</ion-label>
</ion-item>
<ion-item (click)="filter_select('offer','40-50')">
<ion-radio value="5"></ion-radio>
<ion-label>40 - 50%</ion-label>
</ion-item>
<ion-item (click)="filter_select('offer','50-100')">
<ion-radio value="6"></ion-radio>
<ion-label>Above 50%</ion-label>
</ion-item>
</ion-list>
<ion-list *ngSwitchCase="'gender'" padding>
<ion-item (click)="filter_select('gender',2)">
<ion-radio value="7"></ion-radio>
<ion-label>{{'common.Male' | translate}}</ion-label>
</ion-item>
<ion-item (click)="filter_select('gender',3)">
<ion-radio value="8"></ion-radio>
<ion-label>{{'common.Female' | translate}}</ion-label>
</ion-item>
<ion-item (click)="filter_select('gender',1)">
<ion-radio value="9"></ion-radio>
<ion-label>{{'common.Unisex' | translate}}</ion-label>
</ion-item>
</ion-list>
<ion-list *ngSwitchCase="'location'" padding radio-group>
<ion-row >
<ion-col col-1>
<ion-radio value="1" (click)="filter_select('location',1)" class="s_radio"></ion-radio>
</ion-col>
<ion-col col-11>
<input id="address_signup" (click)="initialize($event)" class="s_signup_input s_signup_location" placeholder="{{'common.enter_your_address' | translate}}">
</ion-col>
</ion-row>
<ion-row >
<ion-col col-1>
<ion-radio value="0" (click)="filter_select('location',0)" class="s_radio"></ion-radio>
</ion-col>
<ion-col col-11>
<ion-label class="s_signup_input">{{selected_location}}</ion-label>
</ion-col>
</ion-row>
</ion-list>
</div>
<ion-fab right bottom>
<button ion-fab (click)="dismiss()"><ion-icon name="checkmark"></ion-icon></button>
</ion-fab>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { FilterPage } from './filter';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
FilterPage,
],
imports: [
IonicPageModule.forChild(FilterPage),
TranslateModule
],
})
export class FilterPageModule {}
page-filter {
.segment-button {
text-transform: capitalize !important;
font-size: 16px !important;
font-weight: 400 !important;
}
.card-content {
padding: 0px;
.item {
.checkbox {
margin-right: 20px;
.checkbox-icon {
border: 1px solid #ef5958;
}
}
}
}
.label {
color: #a8a8a8 !important;
font-size: 18px;
font-weight: 400;
}
.s_signup_input{
width: 100%;
height: 40px;
border:none;
color: #a8a8a8 !important;
font-size: 18px;
font-weight: 400;
border-bottom: 1px solid #a8a8a8;
padding: 10px;
margin:0px;
}
.s_radio{
position:relative;
top: 15px;
}
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, ViewController } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
@IonicPage()
@Component({
selector: 'page-filter',
templateUrl: 'filter.html',
})
export class FilterPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
filter:any;
result:any;
response:any;
search_filter:any;
location:any;
selected_location:any;
selected_lat_lng:any;
componentForm:any;
current_location:any;
place_choose:number;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public viewCtrl:ViewController,
public storage: Storage) {
this.filter = "service";
this.place_choose = 0;
this.response = navParams.get('params');
console.log(this.response);
this.search_filter = {"service":[],"offer":"","gender":"","location":"","key_word":""};
//this.location = {"lat":"9.966","lng":"76.3029"}
this.search_filter.key_word = '';
this.componentForm = {
locality: 'long_name',
};
this.storage.get('current').then(data=>{
if(data){
this.selected_location = data.location;
}
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
// this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
/*console.log('ionViewDidLoad FilterPage');
this.service.post_data('shop_details',post_data).subscribe(data=>{
this.result = data;
})*/
}
close(){
this.viewCtrl.dismiss();
console.log('ionViewDidLoad FilterPage');
}
filter_select(type:string,value,event=undefined){
switch(type){
case "service":
if(event.checked==true){
this.search_filter.service.push(value);
} else {
var index = this.search_filter.service.indexOf(value);
this.search_filter.service.splice(index,1);
}
break;
case "offer":
this.search_filter.offer = value;
break;
case "gender":
this.search_filter.gender = value;
break;
default:
if(this.place_choose==1){
this.location = this.selected_lat_lng;
} else if(this.place_choose==2){
this.storage.get('current').then(curr_data=>{
if(curr_data){
this.location = curr_data.lat_lng;
}
})
} else {
this.location = "";
}
this.search_filter.location = this.location;
}
}
dismiss() {
console.log(this.search_filter);
if(this.place_choose!=0){
this.search_filter.location = this.location
}
this.viewCtrl.dismiss(this.search_filter);
}
initialize(evt) {
console.log('map', evt)
var elm = evt.target.id;
var addressType=elm;
var input = document.getElementById(elm);
var options = {
types: ['(cities)']
};
this.location = 0;
var autocomplete = new google.maps.places.Autocomplete(input,options);
let thiss = this;
google.maps.event.addListener(autocomplete, 'place_changed', function () {
var place = autocomplete.getPlace();
console.log(place.address_components);
for (var i = 0; i < place.address_components.length; i++) {
addressType = place.address_components[i].types[0];
console.log(addressType);
if(addressType =='locality'){
var val = place.address_components[i][thiss.componentForm[addressType]];
(document.getElementById(elm) as HTMLInputElement).value= place.formatted_address;
}
console.log(val);
}
console.log(place.formatted_address)
//thiss.selected_location = place.formatted_address;
var latLong = autocomplete.getPlace().geometry.location;
var js=JSON.stringify(latLong);
var par=JSON.parse(js);
var sel_location = place.formatted_address;
if(par){
var lat_lng = {"lat":par.lat,"lng":par.lng};
thiss.selected_lat_lng = lat_lng;
thiss.location = lat_lng;
thiss.storage.set('set_location',{'location':sel_location,'lat_lng':lat_lng})
}
console.log(thiss.location);
});
}
choose_loc(value:number){
this.place_choose = value;
if(value==2){
this.storage.get('current').then(curr_data=>{
if(curr_data){
this.location = curr_data.lat_lng;
}
})
}
}
}
<ion-content padding class="theme_background">
<ion-card>
<form [formGroup]="ForgotForm">
<h5>{{'common.Forgot_Password?' | translate}}</h5>
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input formControlName="email_id" type="text" placeholder="{{'common.Email_ID' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="ForgotForm.controls.email_id.invalid && (ForgotForm.get('email_id').dirty || ForgotForm.get('email_id').touched)">
{{'common.Enter_a_valid_Email' | translate}}
</div>
<div class="clear"></div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="forgot()" [disabled]="ForgotForm.invalid">{{'common.Submit' | translate}}</button>
</ion-card>
<br>
<p (click)="signup()"><strong>{{'common.Click_here' | translate}}</strong> {{'common.to_signup' | translate}}</p>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ForgotPage } from './forgot';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
ForgotPage,
],
imports: [
IonicPageModule.forChild(ForgotPage),
TranslateModule
],
})
export class ForgotPageModule {}
page-forgot {
.card {
margin: 0px;
box-shadow: none;
width: 100%;
background: transparent;
padding: 15px;
h5 {
color: #fff;
font-size: 24px;
font-weight: 300;
padding-bottom: 25px;
}
.list {
.logo_div {
text-align: center;
img {
width: 250px;
margin: 0 auto;
}
}
.item {
margin-bottom: 10px !important;
.item-inner {
.input-wrapper {
.input {
.text-input {
height: 50px;
border-bottom: 2px solid #fff;
color: #fff;
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
&::placeholder {
color: #fff;
}
}
}
}
}
}
}
.checkbox {
position: relative !important;
top: 8px !important;
margin-right: 15px !important;
}
.checkbox-icon {
border: 1px solid #fff !important;
width: 20px !important;
height: 20px !important;
background: transparent !important;
}
.checkbox-checked .checkbox-inner {
left: 6px !important;
top: 3px !important;
}
.label {
margin: 0px;
p {
color: #fff;
text-align: left;
font-size: 20px;
font-weight: 300;
}
}
.login_btn {
margin-top: 20px;
width: 100%;
border: 2px solid #fff;
background: transparent !important;
height: 50px;
font-size: 30px;
font-weight: 300;
text-transform: capitalize !important;
}
}
p {
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 300;
padding-top: 20px;
}
}
.ion-page {
background: url("../assets/imgs/salon.gif");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Validators, FormGroup, FormBuilder } from '@angular/forms';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
/**
* Generated class for the ForgotPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-forgot',
templateUrl: 'forgot.html',
})
export class ForgotPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
ForgotForm: FormGroup;
constructor(
public navCtrl: NavController,
public navParams: NavParams,
private formBuilder: FormBuilder,
public service: CommonProvider,
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
) {
this.ForgotForm = this.formBuilder.group({
email_id: ['', Validators.compose([Validators.required, Validators.pattern("[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}")])],
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
console.log('ionViewDidLoad ForgotPage');
}
forgot(){
this.service.show_loader();
console.log(this.ForgotForm.value);
this.service.post_data('forgotPwd',this.ForgotForm.value).subscribe(response=>{
if (response.status == 'success'){
var This = this;
this.service.hide_loader();
this.service.presentToast(response.message);
setTimeout(() => {
This.navCtrl.setRoot('LoginPage')
}, 500);
}
else{
this.service.hide_loader();
this.service.presentToast("Invalid username and Password");
}
}, (err) => {
var data = JSON.parse(err);
console.log(data);
this.service.presentToast(data['message']);
this.service.hide_loader();
})
}
signup(){
this.navCtrl.push("SignupPage");
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>{{'common.Home' | translate}}</h5>
</div>
<div class="clear"></div>
<div class=" widthFull">
<ion-searchbar [(ngModel)]="myInput" [showCancelButton]="shouldShowCancel" (ionInput)="onInput($event.target.value)" (ionCancel)="onCancel($event)">
</ion-searchbar>
</div>
</ion-header>
<ion-content>
<div class="search_local">
<ion-item>
<ion-icon name="pin" item-start></ion-icon>
<h2 *ngIf="selected_location">{{selected_location}}</h2>
<ion-icon name="ios-create" item-end (click)="edit_place()"></ion-icon>
</ion-item>
</div>
<div *ngIf="selected_location">
<ion-card-content class="p0" >
<div *ngIf="!place_choose">
<div class="">
<input id="address_signup" (click)="initialize($event)" class="s_signup_location" placeholder="{{'common.enter_your_address' | translate}}">
<button ion-button icon-only (click)="get_current()" full class="m0">
<ion-icon name="locate"></ion-icon> {{'common.Current_Location' | translate}}
</button>
</div>
</div>
</ion-card-content>
</div>
<div class="grid-basic-page" *ngIf="result">
<ion-card *ngFor="let shops of result.shops" (click)="view_shop(shops.id)">
<div class="shop_banner">
<img src="{{shops.image}}" onError="this.src='assets/imgs/spa.jpg';">
<div class="shop_banner_detail">
<ion-row>
<ion-col col-6 class="p0">
<h2>{{shops.shop_name}}</h2>
<h4>{{round2Fixed(shops.distance)}} km</h4>
</ion-col>
<ion-col col-6 class="p0 ratting">
<ionic3-star-rating activeIcon="ios-heart" defaultIcon="ios-heart-outline" activeColor="#eb4354" defaultColor="#f4f4f4" readonly="false" [rating]="shops.total_rating">
</ionic3-star-rating>
</ion-col>
</ion-row>
</div>
<div class="shop_ratting">
{{shops.total_rating}}.0
</div>
</div>
</ion-card>
<ion-card *ngIf="result.shops.length==0">
<ion-card-content class="no_shop">
{{'common.Current_Location' | translate}}
</ion-card-content>
</ion-card>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div>
<ion-fab right bottom>
<button ion-fab (click)="filter()"><ion-icon name="funnel"></ion-icon></button>
</ion-fab>
</ion-content>
<!--
Generated template for the HomePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<!-- <ion-header>
<ion-navbar>
<ion-title>home</ion-title>
<span item-end><ion-icon ios="ios-options" (click)="filter()"></ion-icon></span>
</ion-navbar>
</ion-header>
<ion-content class="grid-basic-page" *ngIf="result">
<ion-card *ngFor="let shops of result.shops" (click)="view_shop(shops.id)">
<ion-item>
<span><h2>{{shops.shop_name}} <ion-icon ios="ios-heart" float-right *ngIf="shops.fav_status==1"></ion-icon> <ion-icon ios="ios-heart-outline" float-right *ngIf="shops.fav_status==0"></ion-icon><h4>{{round2Fixed(shops.distance)}} mi</h4></h2></span>
</ion-item>
<img src="{{shops.image}}" onError="this.src='assets/imgs/advance-card-tmntr.jpg';">
<ion-card-content>
<p>{{get_elipse(shops.description)}}</p>
</ion-card-content>
<ion-row>
<ion-col>
<button ion-button icon-start clear small>
<ion-icon name="thumbs-up"></ion-icon>
<div>{{shops.fav_count}} Like(s)</div>
</button>
</ion-col>
<ion-col>
<button ion-button icon-start clear small>
<ion-icon name="text"></ion-icon>
<div>{{shops.review_count}} Comment(s)</div>
</button>
</ion-col>
<ion-col>
<button ion-button icon-start clear small>
<ion-icon name="star"></ion-icon>
<div>{{shops.total_rating}} Rate</div>
</button>
</ion-col>
</ion-row>
</ion-card>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
>>>>>>> ce70b671b5ce54e2b1f11849c1fe8398e7b85e0f -->
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { HomePage } from './home';
import { StarRatingModule } from 'ionic3-star-rating';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
HomePage,
],
imports: [
IonicPageModule.forChild(HomePage),
StarRatingModule,
TranslateModule
],
})
export class HomePageModule {}
page-home {
.nav_header_title {
width: calc(100% - 50px) !important;
}
.card {
box-shadow: none;
margin: 5px;
width: calc(100% - 10px);
.shop_banner {
width: 100%;
height: 220px;
position: relative;
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.shop_banner_detail {
position: absolute;
padding: 10px;
bottom: 0px;
left: 0px;
right: 0px;
background: rgba(0, 0, 0, 0.7);
h2 {
color: #fff;
font-weight: 300;
font-size: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
h4 {
color: #fff;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.shop_ratting {
position: absolute;
width: 40px;
height: 40px;
color: #fff;
top: 10px;
right: 10px;
background: #00cc9a;
text-align: center;
font-size: 18px;
padding: 7px;
border-radius: 3px;
font-weight: 300;
}
.ratting {
text-align: right;
.ionic3-star-rating {
button {
margin: 0px;
width: 20px;
height: 20px;
margin: 2px;
}
.icon {
font-size: 20px !important;
}
}
}
}
}
.footer_btn {
margin: 0px;
padding: 0px;
width: 100%;
border-radius: 0px;
height: 50px;
text-transform: capitalize;
font-weight: 300;
font-size: 24px;
.icon {
padding-right: 10px;
}
}
.s_signup_input {
width: 80%;
padding: 10px 20px;
margin: 8px 25px !important;
box-sizing: border-box;
}
.widthFull_new {
margin: 0px 5%
}
.search_local{
background: #fff;
padding-top:0px;
padding-bottom:0px;
padding-left:10px;
padding-right:10px;
.item-inner{
border:none !important;
}
h2{
color: #a8a8a8;
}
.icon{
color:#f0525f;
}
}
.s_signup_location{
width:100%;
height:35px;
border:none;
padding-left:10px;
padding-right:10px;
font-size: 20px;
color: #a8a8a8;
&::placeholder{
color: #a8a8a8;
}
}
.no_shop{
font-size:20px;
font-weight:300;
}
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams,ModalController,AlertController } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import { Geolocation } from '@ionic-native/geolocation';
import { NativeGeocoder, NativeGeocoderReverseResult, NativeGeocoderOptions } from '@ionic-native/native-geocoder';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
@IonicPage()
@Component({
selector: 'page-home',
templateUrl: 'home.html',
})
export class HomePage {
@ViewChild('language') language: ElementRef;
lang = 'en';
user_id:any;
result:any;
filters:any;
myInput:any;
componentForm:any;
place_choose:boolean = true;
selected_location:any;
location:number = 1;
selected_lat_lng:any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public modalCtrl: ModalController,
public storage: Storage,
private geolocation: Geolocation,
private nativeGeocoder: NativeGeocoder,
private alertCtrl: AlertController
) {
this.componentForm = {
locality: 'long_name',
};
this.place_choose = true;
this.location = 1;
this.storage.get('set_location').then(data=>{
if(data){
this.selected_location = data.location;
} else {
this.storage.get('current').then(curr_data=>{
if(curr_data){
this.storage.set('set_location',{'location':curr_data.location,'lat_lng':curr_data.lat_lng})
this.selected_location = curr_data.location;
this.selected_lat_lng = curr_data.lat_lng;
} else {
this.enable_location();
}
})
}
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
this.filters = {"service":[],"offer":"","gender":"","location":"","key_word":""};
var This = this;
this.service.show_loader();
var timer = setInterval(function(){
This.storage.get('set_location').then(data=>{
if(data!=undefined){
console.log("enter");
console.log(data);
clearInterval(timer);
This.service.hide_loader();
//This.get_current();
This.view_shop_list();
} else {
console.log("loop");
//This.service.show_loader();
This.enable_location();
This.storage.get('current').then(curr_data=>{
if(curr_data){
This.storage.set('set_location',{'location':curr_data.location,'lat_lng':curr_data.lat_lng})
clearInterval(timer);
This.selected_location = curr_data.location;
This.selected_lat_lng = curr_data.lat_lng;
This.get_current();
}
})
}
})
},1000);
console.log('ionViewDidLoad HomePage');
}
view_shop_list(){
this.service.show_loader();
var This = this;
console.log("shop list called");
this.storage.get('token').then(data => {
if(data){
post_data['token'] = data;
}
})
var post_data = {"current_lat":"","current_lng":"","page":"1","filter":this.filters}
this.storage.get('set_location').then(data=>{
console.log("set location");
console.log(data)
if(data){
post_data.current_lat = data.lat_lng.lat;
post_data.current_lng = data.lat_lng.lng;
console.log(post_data)
this.onInput('');
/*setTimeout(function(){
This.service.post_data('shop_list',post_data).subscribe(data=>{
This.result = data;
This.service.hide_loader();
//console.log(data);
})
},500);*/
This.service.hide_loader();
} else {
this.service.presentToast("Something error found in location access. Please reset your location");
var This = this;
setTimeout(function(){
This.service.hide_loader();
This.presentConfirm();
},5000);
//this.get_current();
//this.enable_location();
}
})
}
presentConfirm() {
let alert = this.alertCtrl.create({
title: 'Enable Location',
message: 'Please allow your location',
buttons: [
{
text: 'Allow',
handler: () => {
window.location.reload();
}
}
]
});
alert.present();
}
get_current(){
this.location = 1;
var This = this;
this.storage.get('current').then(data=>{
if(data){
console.log(data);
console.log("get current location")
this.selected_location = data.location;
this.selected_lat_lng = data.lat_lng
this.storage.set('set_location',{'location':data.location,'lat_lng':data.lat_lng})
setTimeout(function(){
This.map_fu();
This.myInput = '';
This.onInput('');
},500);
}
})
//this.place_choose = true;
}
get_elipse(des:string){
var args = 100;
if (des.length > args) {
return des.substring(0, args) + '...';
} else {
return des;
}
}
doInfinite(infiniteScroll){
console.log('Begin async operation');
var This = this;
var post_data = {"current_lat":"","current_lng":"","page":"1","filter":this.filters}
this.storage.get('set_location').then(data=>{
post_data.current_lat = data.lat_lng.lat;
post_data.current_lng = data.lat_lng.lng;
})
this.storage.get('token').then(data => {
if(data){
post_data['token'] = data;
}
})
setTimeout(() => {
/*for (let i = 0; i < 30; i++) {
this.items.push( this.items.length );
}
console.log('Async operation has ended');*/
if(This.result.shop_count>This.result.shops.length){
setTimeout(function(){
This.service.post_data('shop_list',post_data).subscribe(data=>{
data.shops.forEach(function(item){
This.result.shops.push(item);
})
})
},500);
}
infiniteScroll.complete();
}, 500);
}
round2Fixed(value) {
value = +value;
if (isNaN(value))
return NaN;
// Shift
value = value.toString().split('e');
value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + 2) : 2)));
// Shift back
value = value.toString().split('e');
return (+(value[0] + 'e' + (value[1] ? (+value[1] - 2) : -2))).toFixed(2);
}
view_shop(id){
this.navCtrl.push('DetailedPage',{'shop_id':id});
}
filter(){
this.map_fu();
let filterModal = this.modalCtrl.create("FilterPage",{"params":this.result.services});
filterModal.onDidDismiss(data => {
console.log(data);
var This = this;
if(data!=undefined){
var post_data = {"current_lat":"","current_lng":"","page":"1","filter":""}
this.storage.get('set_location').then(curr_data=>{
if(curr_data){
post_data.current_lat = curr_data.lat_lng.lat;
post_data.current_lng = curr_data.lat_lng.lng;
this.selected_location = curr_data.location;
}
})
post_data.filter = data;
if(this.myInput!=''){
post_data.filter['key_word'] = this.myInput;
}
if(data.location!=''){
post_data.current_lat = data.location.lat;
post_data.current_lng = data.location.lng;
}
this.storage.get('token').then(data => {
if(data){
post_data['token'] = data;
}
})
//console.log(data);
this.service.show_loader();
setTimeout(function(){
This.service.post_data('shop_list',post_data).subscribe(data=>{
This.result = data;
This.service.hide_loader();
//console.log(data);
})
},500);
}
})
filterModal.present();
}
onInput(keyword){
console.log(keyword);
console.log(this.filters);
//this.myInput = keyword.data;
var post_data = {"current_lat":"","current_lng":"","page":"1","filter":this.filters}
this.storage.get('set_location').then(curr_data=>{
if(curr_data){
post_data.current_lat = curr_data.lat_lng.lat;
post_data.current_lng = curr_data.lat_lng.lng;
console.log(curr_data);
}
})
this.storage.get('token').then(data => {
if(data){
post_data['token'] = data;
}
})
post_data.filter['key_word'] = '';
if(this.myInput!=''){
post_data.filter['key_word'] = keyword;
}
var This = this;
this.service.show_loader();
setTimeout(function(){
console.log('Post data to send',post_data);
This.service.post_data('shop_list',post_data).subscribe(data=>{
This.result = data;
This.service.hide_loader();
//console.log(data);
})
},500)
}
edit_place(){
console.log("called Place")
this.place_choose = !this.place_choose;
}
initialize(evt) {
console.log('map', evt)
var elm = evt.target.id;
var addressType=elm;
var input = document.getElementById(elm);
var options = {
//types: ['(cities)']
};
this.location = 0;
var autocomplete = new google.maps.places.Autocomplete(input,options);
var thiss = this;
google.maps.event.addListener(autocomplete, 'place_changed', function () {
thiss.map_fu();
var place = autocomplete.getPlace();
console.log(place.address_components);
for (var i = 0; i < place.address_components.length; i++) {
addressType = place.address_components[i].types[0];
console.log(addressType);
if(addressType =='locality'){
var val = place.address_components[i][thiss.componentForm[addressType]];
(document.getElementById(elm) as HTMLInputElement).value= place.formatted_address;
}
console.log(val);
}
console.log(place.formatted_address)
thiss.selected_location = place.formatted_address;
var latLong = autocomplete.getPlace().geometry.location;
var js=JSON.stringify(latLong);
var par=JSON.parse(js);
var sel_location = place.formatted_address;
var lat_lng = {"lat":par.lat,"lng":par.lng};
thiss.selected_lat_lng = lat_lng;
thiss.storage.set('set_location',{'location':sel_location,'lat_lng':lat_lng});
console.log('Test');
setTimeout(function(){
console.log('inside settimeout function')
thiss.map_fu();
thiss.myInput = '';
thiss.onInput('');
},500);
console.log(thiss.location);
});
}
map_fu(){
console.log("function called");
this.place_choose = true;
}
enable_location() {
let optionss: NativeGeocoderOptions = {
useLocale: true,
maxResults: 5
};
this.geolocation.getCurrentPosition().then((resp) => {
//console.log(resp);
//console.log(resp);
this.nativeGeocoder.reverseGeocode(resp.coords.latitude, resp.coords.longitude, optionss).then((result: NativeGeocoderReverseResult[]) => console.log(JSON.stringify(result[0]))).catch((error: any) => console.log(error));
}).catch((error) => {
console.log('Error getting location', error);
});
let watch = this.geolocation.watchPosition();
var This = this;
watch.subscribe((data) => {
console.log(data);
this.nativeGeocoder.reverseGeocode(data.coords.latitude, data.coords.longitude, optionss).then((result: NativeGeocoderReverseResult[]) => {
var current_loc = result[0].subLocality+", "+result[0].locality+", "+result[0].subAdministrativeArea+", "+result[0].administrativeArea+", "+result[0].countryName;
var current_lat_lng = {'lat' : data.coords.latitude ,'lng' :data.coords.longitude};
This.storage.set('current',{'location':current_loc,'lat_lng':current_lat_lng});
//window.location.reload();
console.log(JSON.stringify(result[0]))
}).catch((error: any) => console.log(error));
});
}
}
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>List</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<ion-list>
<button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">
<ion-icon [name]="item.icon" item-start></ion-icon>
{{item.title}}
<div class="item-note" item-end>
{{item.note}}
</div>
</button>
</ion-list>
<div *ngIf="selectedItem" padding>
You navigated here from <b>{{selectedItem.title}}</b>
</div>
</ion-content>
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
@Component({
selector: 'page-list',
templateUrl: 'list.html'
})
export class ListPage {
selectedItem: any;
icons: string[];
items: Array<{title: string, note: string, icon: string}>;
constructor(public navCtrl: NavController, public navParams: NavParams) {
// If we navigated to this page, we will have an item available as a nav param
this.selectedItem = navParams.get('item');
// Let's populate this page with some filler content for funzies
this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
'american-football', 'boat', 'bluetooth', 'build'];
this.items = [];
for (let i = 1; i < 11; i++) {
this.items.push({
title: 'Item ' + i,
note: 'This is item #' + i,
icon: this.icons[Math.floor(Math.random() * this.icons.length)]
});
}
}
itemTapped(event, item) {
// That's right, we're pushing to ourselves!
this.navCtrl.push(ListPage, {
item: item
});
}
}
<ion-content padding class="theme_background">
<ion-card>
<form [formGroup]="loginForm">
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input formControlName="username" type="text" placeholder="{{'common.User_Credential' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.username.invalid && (loginForm.get('username').dirty || loginForm.get('username').touched)">
{{'common.Invalid_Credential' | translate}}
</div>
<div class="clear"></div>
<ion-item>
<ion-input formControlName="password" type="password" placeholder="{{'common.Password' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.password.invalid && (loginForm.get('password').dirty || loginForm.get('password').touched)">
{{'common.Minimum_6_characters_required' | translate}}
</div>
<div class="clear"></div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="login()" [disabled]="loginForm.invalid">{{'common.Login' | translate}}</button>
</ion-card>
<br>
<p (click)="signup()"> {{'common.Are_you_new_to_VMig?' | translate}}<strong> {{'common.Click_here' | translate}}</strong></p>
<p (click)="forgot()">{{'common.Forgot_Password?' | translate}}</p>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { LoginPage } from './login';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
LoginPage,
],
imports: [
IonicPageModule.forChild(LoginPage),
TranslateModule
],
})
export class LoginPageModule {}
page-login {
.card {
margin: 0px;
box-shadow: none;
width: 100%;
background: transparent;
padding: 15px;
.list {
.logo_div {
text-align: center;
img {
width: 250px;
margin: 0 auto;
}
}
.item {
margin-bottom: 10px !important;
.item-inner {
.input-wrapper {
.input {
.text-input {
height: 50px;
border-bottom: 2px solid #fff;
color: #fff;
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
&::placeholder {
color: #fff;
}
}
}
}
}
}
}
.login_btn {
margin-top: 20px;
width: 100%;
border: 2px solid #fff;
background: transparent !important;
height: 50px;
font-size: 30px;
font-weight: 300;
text-transform: capitalize !important;
}
}
p {
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 300;
}
}
.ion-page {
background: url("../assets/imgs/salon.gif");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, Events } from 'ionic-angular';
import { Validators, FormGroup, FormBuilder } from '@angular/forms';
import { Storage } from '@ionic/storage';
import { CommonProvider } from '../../providers/common/common';
import { user } from '../../providers/model/model';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
/**
* Generated class for the LoginPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-login',
templateUrl: 'login.html',
})
export class LoginPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
local:user;
loginForm: FormGroup;
device_id: any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
private formBuilder: FormBuilder,
private service: CommonProvider,
public storage: Storage,
public events: Events,
) {
console.log('called login');
this.device_id = '';
this.storage.get('get_deviceId').then(data => {
console.log('sadasdasdasdasd');
console.log(data);
if(data){
this.device_id = data.userId;
}
})
this.loginForm = this.formBuilder.group({
username: ['', Validators.compose([Validators.required])],
password: ['', Validators.compose([Validators.required, Validators.minLength(6)])],
device_id:[this.device_id]
})
console.log("device:"+this.device_id);
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
this.storage.get('get_deviceId').then(data => {
console.log(data);
if(data){
this.device_id = data.userId;
}
})
console.log('ionViewDidLoad LoginPage');
}
login(){
this.service.show_loader();
console.log("login_val", this.loginForm.value);
var This = this;
This.storage.get('get_deviceId').then(data => {
console.log('sadasdasdasdasd');
console.log(data);
if(data){
this.loginForm.controls['device_id'].setValue(data.userId);
setTimeout(function(){
This.service.post_data('signIn',This.loginForm.value).subscribe(response=>{
if (response.status == 'success'){
This.storage.set('token', response.token);
This.storage.set('user_data', response.profile);
This.events.publish('user:created', response.profile, Date.now());
This.service.hide_loader();
setTimeout(() => {
This.navCtrl.setRoot('HomePage')
}, 500);
}
else{
This.service.hide_loader();
This.service.presentToast("Invalid username and Password");
}
}, (err) => {
var data = JSON.parse(err);
console.log(data);
This.service.presentToast(data['message']);
This.service.hide_loader();
})
},500);
}
})
}
signup(){
this.navCtrl.push("SignupPage");
}
forgot(){
this.navCtrl.push("ForgotPage");
}
}
<ion-content padding class="theme_background">
<ion-card>
<form [formGroup]="loginForm">
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input formControlName="username" type="text" placeholder="User Credential"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.username.invalid && (loginForm.get('username').dirty || loginForm.get('username').touched)">
Invalid Credential
</div>
<div class="clear"></div>
<ion-item>
<ion-input formControlName="password" type="password" placeholder="Password"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.password.invalid && (loginForm.get('password').dirty || loginForm.get('password').touched)">
Minimum 6 characters required
</div>
<div class="clear"></div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="login()" [disabled]="loginForm.invalid">Login</button>
</ion-card>
<br>
<p (click)="signup()">Are you new to HCB? <strong>Click here</strong></p>
<p (click)="forgot()">Forgot Password ?</p>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { LoginmodalPage } from './loginmodal';
@NgModule({
declarations: [
LoginmodalPage,
],
imports: [
IonicPageModule.forChild(LoginmodalPage),
],
})
export class LoginmodalPageModule {}
page-loginmodal {
.card {
margin: 0px;
box-shadow: none;
width: 100%;
background: transparent;
padding: 15px;
.list {
.logo_div {
text-align: center;
img {
width: 250px;
margin: 0 auto;
}
}
.item {
margin-bottom: 10px !important;
.item-inner {
.input-wrapper {
.input {
.text-input {
height: 50px;
border-bottom: 2px solid #fff;
color: #fff;
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
&::placeholder {
color: #fff;
}
}
}
}
}
}
}
.login_btn {
margin-top: 20px;
width: 100%;
border: 2px solid #fff;
background: transparent !important;
height: 50px;
font-size: 30px;
font-weight: 300;
text-transform: capitalize !important;
}
}
p {
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 300;
}
}
.ion-page {
background: url("../assets/imgs/salon.gif");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the LoginmodalPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-loginmodal',
templateUrl: 'loginmodal.html',
})
export class LoginmodalPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad LoginmodalPage');
}
forgot(){
this.navCtrl.push("ForgotPage");
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>My Chats</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<div class="chat_wrapper">
<ul>
<li (click)="chat()">
<div class="chat_circle">
</div>
<div class="chat_circle_details">
<ion-row>
<ion-col col-8 class="p0">
<h5>MARCO ESTHENO</h5>
<h6>Hi, How are you?</h6>
</ion-col>
<ion-col col-4 class="p0 textRight">
<p>5:30 pm</p>
<div class="circle floatRight">2</div>
<div class="clear"></div>
</ion-col>
</ion-row>
</div>
<div class="clear"></div>
</li>
<li (click)="chat()">
<div class="chat_circle">
</div>
<div class="chat_circle_details">
<ion-row>
<ion-col col-8 class="p0">
<h5>CHRISTIANO RONALD</h5>
<h6>Hi, How are you?</h6>
</ion-col>
<ion-col col-4 class="p0 textRight">
<p>5:30 pm</p>
<div class="circle floatRight">2</div>
<div class="clear"></div>
</ion-col>
</ion-row>
</div>
<div class="clear"></div>
</li>
<li (click)="chat()">
<div class="chat_circle">
</div>
<div class="chat_circle_details">
<ion-row>
<ion-col col-8 class="p0">
<h5>MARCUS BORANDA</h5>
<h6>Hi, How are you?</h6>
</ion-col>
<ion-col col-4 class="p0 textRight">
<p>5:30 pm</p>
<div class="circle floatRight">2</div>
<div class="clear"></div>
</ion-col>
</ion-row>
</div>
<div class="clear"></div>
</li>
<li (click)="chat()">
<div class="chat_circle">
</div>
<div class="chat_circle_details">
<ion-row>
<ion-col col-8 class="p0">
<h5>CRIPS CALMAN</h5>
<h6>Hi, How are you?</h6>
</ion-col>
<ion-col col-4 class="p0 textRight">
<p>5:30 pm</p>
<div class="circle floatRight">2</div>
<div class="clear"></div>
</ion-col>
</ion-row>
</div>
<div class="clear"></div>
</li>
</ul>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { MessagePage } from './message';
@NgModule({
declarations: [
MessagePage,
],
imports: [
IonicPageModule.forChild(MessagePage),
],
})
export class MessagePageModule {}
page-message {
.letter_btn {
font-size: 18px;
font-weight: 300;
width: 60px !important;
text-transform: capitalize !important;
}
.chat_wrapper {
padding: 10px;
ul {
padding: 0px;
margin: 0px;
li {
list-style: none;
padding-top: 15px;
.chat_circle {
width: 60px;
height: 60px;
background: #e7e7e7;
float: left;
border-radius: 50%;
margin-right: 20px;
img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
}
.chat_circle_details {
width: calc(100% - 80px);
float: left;
padding-top: 5px;
padding-bottom: 20px;
border-bottom: 1px solid #bebebe;
h5 {
margin: 0px;
padding: 0px;
color: #494949;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
h6 {
margin: 0px;
padding: 0px;
color: #8b8b8b;
font-weight: 400;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
p {
margin: 0px;
padding: 0px;
color: #6f6f6f;
font-size: 16px;
padding-bottom: 8px;
}
.circle {
width: 18px;
height: 18px;
background: #05bc6d;
border-radius: 50%;
color: #caecd9;
text-align: center;
font-weight: 400;
padding: 2px;
font-size: 12px;
}
}
}
}
}
}
\ No newline at end of file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
@IonicPage()
@Component({
selector: 'page-message',
templateUrl: 'message.html',
})
export class MessagePage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad MessagePage');
}
chat(){
this.navCtrl.push("ChatPage");
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>{{'common.My_Booking' | translate}}</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<ion-segment [(ngModel)]="booking">
<ion-segment-button value="upcoming">
{{'common.Bookings' | translate}}
</ion-segment-button>
<ion-segment-button value="past">
{{'common.Completed' | translate}}
</ion-segment-button>
</ion-segment>
<div [ngSwitch]="booking" *ngIf="result">
<div class="booking_history" *ngSwitchCase="'upcoming'">
<ion-card *ngFor="let res of result.list">
<ion-card-content>
<div class="booking_head">
<h4 class="">{{res.shop_name}}</h4>
</div>
<div class="booking_detail">
<ion-row>
<ion-col col-4>
<p>{{'common.Date' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.booking_date}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Time' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.booking_time}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Services' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.services}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Total_Amount' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.total}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Status' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.status}}
</h6>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
<div class="booking_history" *ngSwitchCase="'past'">
<ion-card *ngFor="let res of result.completed">
<ion-card-content>
<div class="booking_head">
<h4 class="">{{res.shop_name}}</h4>
</div>
<div class="booking_detail">
<ion-row>
<ion-col col-4>
<p>{{'common.Date' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.booking_date}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Time' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.booking_time}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Services' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.services}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Total_Amount' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.total}}
</h6>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-4>
<p>{{'common.Status' | translate}}</p>
</ion-col>
<ion-col col-1>:</ion-col>
<ion-col col-7>
<h6 class="textRight">
{{res.status}}
</h6>
</ion-col>
</ion-row>
</div>
</ion-card-content>
</ion-card>
</div>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { MybookingPage } from './mybooking';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
MybookingPage,
],
imports: [
IonicPageModule.forChild(MybookingPage),
TranslateModule
],
})
export class MybookingPageModule {}
page-mybooking {
.booking_history {
width: 100%;
.card {
.card-content {
padding: 0px;
h4 {
background: #f0525f;
color: #fff;
padding: 10px;
font-size: 20px;
font-weight: 400;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.booking_head {}
.booking_detail {
padding: 10px;
h6 {
color: #b8b8b8;
font-size: 16px;
}
p {
font-size: 16px;
color: #000;
}
}
}
}
}
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
@IonicPage()
@Component({
selector: 'page-mybooking',
templateUrl: 'mybooking.html',
})
export class MybookingPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
shownGroup = null;
count:any;
booking:any;
result:any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public storage: Storage) {
this.count = 0;
this.shownGroup = 0;
this.booking = "upcoming";
console.log(this.shownGroup);
this.storage.get('token').then(data => {
console.log(data);
if(data){
var post_data = {'token':data};
var This = this;
this.service.show_loader();
var timer = setInterval(function(){
console.log(post_data);
if(data!=''){
clearInterval(timer)
This.service.post_data('userbookings',post_data).subscribe(data=>{
This.result = data;
This.service.hide_loader();
console.log(This.result);
})
}
},100);
}
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
// this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
isGroupShown(group) {
return this.shownGroup === group;
}
toggleGroup(group) {
if (this.isGroupShown(group)) {
this.shownGroup = null;
} else {
this.shownGroup = group;
}
}
ionViewDidLoad() {
console.log('ionViewDidLoad MybookingPage');
}
}
<ion-content>
<div #map id="map"></div>
</ion-content>
<ion-footer padding>
<button ion-button class="btn_primary">COLLECT ITEM</button>
</ion-footer>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { NavigationPage } from './navigation';
@NgModule({
declarations: [
NavigationPage,
],
imports: [
IonicPageModule.forChild(NavigationPage),
],
})
export class NavigationPageModule {}
page-navigation {
.scroll {
height: 100%
}
#map {
width: 100%;
height: 100%;
}
.btn_primary{
width:100%;
border-radius: 20px;
height: 45px;
font-size: 16px;
letter-spacing: 2px;
}
}
import { Component,ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
declare var google;
@IonicPage()
@Component({
selector: 'page-navigation',
templateUrl: 'navigation.html',
})
export class NavigationPage {
@ViewChild('map') mapElement: ElementRef;
map: any;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad NavigationPage');
this.loadMap();
}
loadMap(){
let latLng = new google.maps.LatLng(-34.9290, 138.6010);
let mapOptions = {
center: latLng,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>Notifications</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<div class="notification">
<ul *ngIf="result">
<li *ngFor="let res of result">
<ion-row>
<ion-col col-1>
<ion-icon name="ios-alert-outline"></ion-icon>
</ion-col>
<ion-col col-11>
<h5>{{res.subject}}</h5>
<p>{{res.message}} </p>
<p class="textRight">{{res.post_date}}</p>
</ion-col>
</ion-row>
</li>
</ul>
</div>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { NotificationPage } from './notification';
@NgModule({
declarations: [
NotificationPage,
],
imports: [
IonicPageModule.forChild(NotificationPage),
],
})
export class NotificationPageModule {}
page-notification {
.notification {
ul {
padding: 10px;
margin: 0px;
li {
list-style: none;
padding: 10px;
box-shadow: 0px 0px 2px 0px #888888;
border-radius: 2px;
margin-bottom: 10px;
.icon {
font-size: 20px;
}
h5 {
margin: 0px;
padding-bottom: 8px;
color: #f0525f;
}
p {
margin: 0px;
color: #888888;
}
}
}
}
}
\ No newline at end of file
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
/**
* Generated class for the NotificationPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-notification',
templateUrl: 'notification.html',
})
export class NotificationPage {
token:any;
result:any;
constructor(public navCtrl: NavController, public navParams: NavParams, public service: CommonProvider,public storage: Storage) {
//var post_data = [];
this.storage.get('token').then(data => {
if(data && data!=undefined){
var post_data = {'token':data};
var This = this;
this.service.show_loader();
var timer = setInterval(function(){
console.log(post_data);
if(data!=''){
clearInterval(timer);
This.service.post_data('notify_list',post_data).subscribe(data=>{
This.result = data.result;
This.service.hide_loader();
//console.log(data);
})
}
},100);
}
})
}
ionViewDidLoad() {
console.log('ionViewDidLoad NotificationPage');
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5> {{'common.Edit_Profile' | translate}}</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content>
<div class="edit_profile_wrapper" padding>
<!-- <div class="editprofile_banner">
<div class="edit_profile_circle" (click)="upload_img(0)">
<div class="edit_overlay">
<ion-icon name="md-create"></ion-icon>
</div>
</div>
<div class="edit_profile_circle" (click)="upload_img(1)">
<div class="edit_overlay">
<ion-icon name="md-create"></ion-icon>
</div>
</div>
</div> -->
<div class="edit_profile_content" *ngIf="result">
<form [formGroup]="profileForm">
<ion-item>
<ion-input placeholder="{{'common.First_name' | translate}}" formControlName="firstname" type="text">
</ion-input>
</ion-item>
<div class="alert error" *ngIf="profileForm.controls.firstname.invalid && (profileForm.get('firstname').dirty || profileForm.get('firstname').touched)">
{{'common.First_Name_Required' | translate}}
</div>
<div class="clear"></div>
<ion-item>
<ion-input placeholder="{{'common.Last_name' | translate}}" formControlName="lastname" type="text">
</ion-input>
</ion-item>
<div class="alert error" *ngIf="profileForm.controls.lastname.invalid && (profileForm.get('lastname').dirty || profileForm.get('lastname').touched)">
{{'common.Lastname_Name_Required' | translate}}
</div>
<div class="clear"></div>
<ion-item>
<ion-input placeholder="{{'common.Email_ID' | translate}}" formControlName="email_id" type="text">
</ion-input>
</ion-item>
<div class="alert error" *ngIf="profileForm.controls.email_id.invalid && (profileForm.get('email_id').dirty || profileForm.get('email_id').touched)">
{{'common.Please_input_valid_email_ID' | translate}}
</div>
<div class="clear"></div>
<div class="radio_div" radio-group formControlName="gender">
<ion-row>
<ion-col>
<ion-radio value="male" class="floatLeft" [checked]="get_gender('male')"></ion-radio>
<ion-label class="floatLeft">{{'common.Male' | translate}}</ion-label>
<div class="clear"></div>
</ion-col>
<ion-col>
<ion-radio value="female" class="floatLeft" [checked]="get_gender('female')"></ion-radio>
<ion-label class="floatLeft">{{'common.Female' | translate}}</ion-label>
<div class="clear"></div>
</ion-col>
</ion-row>
</div>
<ion-item>
<ion-input placeholder="{{'common.Phone_No' | translate}}" formControlName="phone_no" type="phone">
</ion-input>
</ion-item>
<div class="alert error" *ngIf="profileForm.controls.phone_no.invalid && (profileForm.get('phone_no').dirty || profileForm.get('phone_no').touched)">
{{'common.Please input valid Mobile No' | translate}}
</div>
<div class="clear"></div>
</form>
</div>
</div>
</ion-content>
<ion-footer>
<button ion-button class="login_btn" (click)="profile_update()" [disabled]="profileForm.invalid">{{'common.SAVE' | translate}}</button>
</ion-footer>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ProfilePage } from './profile';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
ProfilePage,
],
imports: [
IonicPageModule.forChild(ProfilePage),
TranslateModule
],
})
export class ProfilePageModule {}
page-profile {
.edit_profile_wrapper {
.editprofile_banner {
width: 100%;
.edit_profile_circle {
width: 110px;
height: 110px;
border-radius: 50%;
background: #a8a8a8;
position: relative;
.edit_overlay {
position: absolute;
width: 35px;
height: 35px;
padding: 7px;
color: #fff;
top: 0px;
right: 0px;
background-color: #f0525f !important;
text-align: center;
border-radius: 50%;
}
img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
object-position: center;
}
}
}
.edit_profile_content {
width: 100%;
padding-top: 30px;
.item {
margin-bottom: 15px;
.item-inner {
border-bottom: 1px solid #dedede !important;
.input-wrapper {
.input {
.text-input {
height: 100%;
font-size: 20px;
font-weight: 400;
color: #282828;
&::placeholder {
color: #282828;
}
}
}
}
}
}
.radio_div {
padding-bottom: 15px;
.label {
margin: 0px;
color: #666666;
font-size: 18px;
font-weight: 400;
padding-left: 30px;
}
.radio-icon {
border: 2px solid #f0525f;
.radio-inner {
background: #1c1e60;
}
}
}
}
}
.login_btn {
width: 100%;
height: 50px;
border-radius: 0px;
margin: 0px !important;
background: #f0525f;
color: #fff;
font-size: 16px;
}
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, Events } from 'ionic-angular';
import { Camera, CameraOptions } from '@ionic-native/camera';
import { Validators, FormGroup, FormBuilder } from '@angular/forms';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
/**
* Generated class for the ProfilePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-profile',
templateUrl: 'profile.html',
})
export class ProfilePage {
@ViewChild('language') language: ElementRef;
lang = 'en';
result:any;
profileForm: FormGroup;
token:any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
private camera: Camera,
public service: CommonProvider,
public storage: Storage,
private formBuilder: FormBuilder,
public events: Events) {
this.profileForm = this.formBuilder.group({
firstname: ['', Validators.compose([Validators.required])],
lastname: ['', Validators.compose([Validators.required])],
phone_no: ['', Validators.compose([Validators.required, this.service.checkLimit(10000000, 999999999999999)])],
email_id: ['', Validators.compose([Validators.required, Validators.pattern("[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}")])],
gender: ['Male'],
})
this.service.show_loader();
var This = this;
this.storage.get('user_data').then(data => {
if(data){
var timer = setInterval(function(){
if(data.email_id!=''){
clearInterval(timer);
This.service.hide_loader();
This.result = data;
This.profileForm.patchValue({
firstname: This.result.firstname,
lastname: This.result.lastname,
phone_no: This.result.phone_no,
email_id: This.result.email_id,
gender:This.result.gender
});
}
},100)
console.log(this.result);
}
})
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
console.log('ionViewDidLoad ProfilePage');
}
get_gender(type){
if(type==this.result.gender){
return true;
} else {
return false;
}
}
upload_img(sourceType:number){
const options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.FILE_URI,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType:sourceType
//sourceType: this.camera.PictureSourceType.PHOTOLIBRARY
}
this.camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64 (DATA_URL):
//let base64Image = 'data:image/jpeg;base64,' + imageData;
console.log(imageData);
//if(imageData) {
//this.load_post_file(imageData, {'auth_token':this.rider_data.auth_token , 'req_id' : this.data.req_id }, "delivery_photo_upload");
//}else
//this.myservice.show_alert("Error!", "Please upload an image to continue");
}, (err) => {
// Handle error
});
}
profile_update(){
var user_data = this.profileForm.value;
this.storage.get('token').then(data => {
if(data){
var This = this;
this.service.show_loader();
var timer = setInterval(function(){
if(data!=''){
clearInterval(timer)
var post_data = {'token':data,'user_data':user_data};
This.service.post_data('updateuser',post_data).subscribe(response=>{
//This.result = data;
This.storage.set('user_data', response.profile);
This.events.publish('user:created', response.profile, Date.now());
This.service.presentToast("User Profile Update successfully");
This.service.hide_loader();
console.log(data);
})
}
},100);
}
})
}
}
<!--
Generated template for the RatePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>rate</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { RatePage } from './rate';
@NgModule({
declarations: [
RatePage,
],
imports: [
IonicPageModule.forChild(RatePage),
],
})
export class RatePageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the RatePage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-rate',
templateUrl: 'rate.html',
})
export class RatePage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad RatePage');
}
}
<ion-header class="theme_background">
<button ion-button class="nav_btn floatLeft" (click)="back()">
<ion-icon name="arrow-back"></ion-icon>
</button>
<div class="nav_header_title floatLeft">
<h5>
{{'common.Bookings' | translate}}
</h5>
</div>
<div class="clear"></div>
</ion-header>
<ion-content padding>
<div class="booking">
<h5>
{{'common.Choose_your_booking_date' | translate}}
</h5>
<ion-item>
<ion-datetime min="{{current_date}}" displayFormat="DD/MM/YYYY" [(ngModel)]="myDate" placeholder="{{'common.Pick_date' | translate}}" (ionChange)="call_time()"></ion-datetime>
</ion-item>
<h5>
{{'common.Choose_your_booking_time' | translate}}
</h5>
<ion-item>
<ion-datetime hourValues="{{time_list}}" displayFormat="hh:mm A" [(ngModel)]="myTime" placeholder="{{'common.Pick_time' | translate}}" (ionChange)="check_time()"></ion-datetime>
</ion-item>
<br>
<div class="service_list">
<h5>
{{'common.Choose_your_services' | translate}}
</h5>
<ul *ngIf="result ">
<li *ngFor="let service of result.services">
<ion-item>
<ion-checkbox (ionChange)="service_choose(service,$event) "></ion-checkbox>
<ion-label>{{service.service_name}}</ion-label>
<div class="clear"></div>
</ion-item>
</li>
</ul>
</div>
</div>
<div class="footer_row">
<ion-row *ngIf="selected_service && selected_service.length>0">
<ion-col col-8 class="p0">
<p>{{'common.Total_Fare' | translate}}<br>
<strong class="amount">{{price}}</strong>
</p>
</ion-col>
<ion-col col-4 class="p0">
<button ion-button class="done_btn m0 widthFull" (click)="done()" [disabled]="check_validate()">
{{'common.Apply' | translate}}
</button>
</ion-col>
</ion-row>
</div>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ServicePage } from './service';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
ServicePage,
],
imports: [
IonicPageModule.forChild(ServicePage),
TranslateModule
],
})
export class ServicePageModule {}
page-service {
.booking {
margin-bottom:60px;
h5 {
color: #f0525f;
font-weight: 300;
padding-top: 10px;
font-size: 22px;
padding-bottom: 15px;
margin-bottom: 0px !important;
}
.datetime {
margin: 0px;
padding: 0px;
font-size: 35px;
font-weight: 300;
}
}
.item-datetime {
.item-inner {
padding-bottom: 10px !important;
}
}
.service_list {
ul {
padding: 0px;
margin: 0px;
li {
list-style: none;
position: relative;
padding-bottom: 15px;
.checkbox {
float: left;
margin-right: 15px !important;
}
.label {
margin: 0px !important;
float: left;
color: #a8a8a8;
}
}
}
}
.footer_row {
width: 100%;
background:#fff !important;
p {
padding: 10px;
margin: 0px;
color: #000;
strong {
font-size: 20px;
color: #f0525f;
}
}
}
.done_btn {
border-radius: 0px;
height: 60px;
font-size: 20px;
font-weight: 400;
}
}
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams, ModalController } from 'ionic-angular';
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
@IonicPage()
@Component({
selector: 'page-service',
templateUrl: 'service.html',
})
export class ServicePage {
@ViewChild('language') language: ElementRef;
lang = 'en';
result:any;
selected_service:any;
price:any;
user_id:any;
myDate:any;
myTime:any;
response:any;
time_list:any;
service_state:boolean = true;
user:any;
current_date = new Date().toISOString();
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public storage: Storage,
public modalCtrl: ModalController,
) {
this.result = navParams.get('shop');
//console.log(this.result);
//var work_time = this.result.shop.working_time;
//var work_time = '9:30AM-10:00PM';
this.time_list = this.get_hours(this.result.shop.working_time);
console.log(this.result);
this.selected_service = [];
//this.user_id = 1;
this.storage.get('user_data').then(data => {
console.log(data);
if(data){
this.user_id = data.id;
}
})
//this.storage.set('user_data', response.profile);
this.price = 0;
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
// this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
console.log('ionViewDidLoad ServicePage');
this.storage.get('user_data').then(data => {
console.log(data);
if(data){
this.user = data;
}
})
}
call_time(){
console.log('called');
var d1 = new Date();
var d = d1.getDate();
var m = d1.getMonth()+1;
var y = d1.getFullYear();
var sec_date = y+"-"+m+"-"+d;
console.log(this.myDate);
console.log(sec_date);
var d3 = new Date(sec_date);
console.log(d3);
var d2 = new Date(this.myDate);
this.myTime = '';
//var work_time = "9.30AM-7.00PM";
var work_time = this.result.shop.working_time;
if(+d3 === +d2){
d1.setHours(d1.getHours() + 1);
this.time_list = this.get_hours(work_time,true);
} else {
this.time_list = this.get_hours(work_time,false);
}
}
get_hours(work_time=null,state=false){
console.log(work_time);
var today = new Date();
today.setHours(today.getHours() + 1);
var h = today.getHours();
//work_time = "9.30AM-7.00PM";
var res = work_time.split("-");
var first_time;
var second_time;
var substring = "PM";
console.log(res[0]);
if(res[0].indexOf(substring)>0){
var start = res[0].split(":");
first_time = parseInt(start[0])+12;
console.log(first_time);
var first_res = start[1].replace("PM", "");
} else {
start = res[0].split(":");
console.log(start);
first_time = parseInt(start[0]);
var first_res = start[1].replace("AM", "");
console.log(first_time);
}
if(res[1].indexOf(substring)>0){
var end = res[1].split(":");
second_time = parseInt(end[0])+12;
var second_res = end[1].replace("PM", "");
console.log(second_time);
} else {
var end = res[1].split(":");
second_time = parseInt(end[0]);
var second_res = end[1].replace("AM", "");
console.log(second_time);
}
console.log(this.myDate);
var time_string = [];
if(first_time<second_time){
if(first_res!=='00'){
first_time = parseInt(first_time)+1;
}
if(state==true){
if(first_time<h){
if(second_time<h){
first_time = second_time = 0;
} else {
first_time = h;
}
}
}
for(var i = first_time;i<=second_time;i++){
time_string.push(i);
}
}
if(second_time<first_time){
if(second_res!=='00'){
second_time = parseInt(second_time)+1;
}
if(state==true){
if(second_time<h){
if(first_time<h){
second_time = first_time = 0;
} else {
second_time = h;
}
}
}
for(var i = second_time;i<=first_time;i++){
time_string.push(i);
}
}
var time_loop = time_string.join();
console.log(time_loop);
if(time_loop=='0'){
this.service_state = false;
} else {
this.service_state = true;
}
return time_loop;
}
service_choose(service,event){
if(event.checked==true){
this.selected_service.push(service.id);
this.price = parseInt(this.price)+parseInt(service.price);
} else {
var index = this.selected_service.indexOf(service.id);
this.price = parseInt(this.price)-parseInt(service.price);
this.selected_service.splice(index,1);
}
}
done(){
this.service.show_loader();
if(this.service_state==false){
this.service.presentToast("All Booking of service has been Closed today");
return false;
}
if(this.user!=null){
var myTime = this.tConvert(this.myTime);
var post_data = {
"booking_id":"VMig"+this.user.id+this.result.shop.id,
"user_id":this.user.id,
"shop_id":this.result.shop.id,
"booking_date":this.myDate,
"booking_time":myTime,
"total":this.price,
"status":"Request",
"service":this.selected_service
};
console.log(post_data);
this.service.post_data('booking',post_data).subscribe(data=>{
console.log(data);
if(data == '1'){
this.service.presentToast("Sorry, This time is not Available");
return false;
}else{
this.response = {"booking_date":this.myDate,"booking_time":myTime,"booked_id":data.result};
this.navCtrl.push('SuccessPage',{'shop':this.response});
}
//console.log(data);
})
} else {
console.log("not logged")
let profileModal = this.modalCtrl.create("SignupmodalPage");
profileModal.onDidDismiss(data => {
this.user = data;
})
profileModal.present();
}
}
back(){
this.navCtrl.pop();
}
tConvert (time) {
time = time.toString ().match (/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/) || [time];
if (time.length > 1) { // If time format correct
time = time.slice (1); // Remove full string match value
time[5] = +time[0] < 12 ? ' AM' : ' PM'; // Set AM/PM
time[0] = +time[0] % 12 || 12; // Adjust hours
}
return time.join (''); // return adjusted time or original string
}
check_time(){
if(this.myTime!=''){
var select_time = this.myTime;
var time = select_time.split(":");
if(parseInt(time[0])>12){
var df = time[0] < 12 ? ' AM' : ' PM';
time[0] = parseInt(time[0]) - 12;
this.myTime = time[0]+":"+parseInt(time[1])+df;
console.log(this.myTime);
}
}
}
check_validate(){
//console.log(this.myDate,this.myTime);
if(this.myDate!=undefined && this.myTime!=''){
return false;
} else {
return true;
}
}
}
<!--
Generated template for the ShopPage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header>
<ion-navbar>
<ion-title>shop</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
</ion-content>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ShopPage } from './shop';
@NgModule({
declarations: [
ShopPage,
],
imports: [
IonicPageModule.forChild(ShopPage),
],
})
export class ShopPageModule {}
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the ShopPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-shop',
templateUrl: 'shop.html',
})
export class ShopPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad ShopPage');
}
}
<ion-content padding class="theme_background">
<ion-card>
<form [formGroup]="signupForm">
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input type="text" placeholder="{{'common.Username' | translate}}" formControlName="username"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.username.invalid && (signupForm.get('username').dirty || signupForm.get('username').touched)">
{{'common.Username_is_required' | translate}}
</div>
<ion-item>
<ion-input type="text" placeholder="{{'common.Email_ID' | translate}}" formControlName="email_id"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.email_id.invalid && (signupForm.get('email_id').dirty || signupForm.get('email_id').touched)">
{{'common.Enter_a_valid_Email' | translate}}
</div>
<ion-item>
<ion-input type="text" placeholder="{{'common.Phone_No' | translate}}" formControlName="phone_no"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.phone_no.invalid && (signupForm.get('phone_no').dirty || signupForm.get('phone_no').touched)">
{{'common.Please_input_valid_Mobile_No' | translate}}
</div>
<ion-item>
<ion-input type="password" placeholder="{{'common.Password' | translate}}" formControlName="password"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.password.invalid && (signupForm.get('password').dirty || signupForm.get('password').touched)">
{{'common.Password_length_is_6_character' | translate}}
</div>
<ion-item>
<ion-input type="password" placeholder="{{'common.Confirm_Password' | translate}}" formControlName="confirm"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.confirm.invalid && (signupForm.get('confirm').dirty || signupForm.get('confirm').touched)">
{{'common.Password_Mismatch' | translate}}
</div>
<ion-item style="width:100% !important;">
<ion-label>
<p>{{'common.I_accept_terms_&_condition' | translate}}</p>
</ion-label>
<ion-checkbox formControlName="terms"></ion-checkbox>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.terms.invalid && (signupForm.get('terms').dirty || signupForm.get('terms').touched)">
{{'common.Please_accept_condition' | translate}}
</div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="register()" [disabled]="signupForm.invalid">{{'common.Sign_Up' | translate}}</button>
<p (click)="signin()"> {{'common.Already_had_an_account?' | translate}} <strong>{{'common.Login' | translate}}</strong></p>
</ion-card>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SignupPage } from './signup';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
SignupPage,
],
imports: [
IonicPageModule.forChild(SignupPage),
TranslateModule
],
})
export class SignupPageModule {}
page-signup {
.card {
margin: 0px;
box-shadow: none;
width: 100%;
background: transparent;
padding: 15px;
.list {
.logo_div {
text-align: center;
img {
width: 250px;
margin: 0 auto;
}
}
.item {
margin-bottom: 10px !important;
.item-inner {
.input-wrapper {
.input {
.text-input {
height: 50px;
border-bottom: 2px solid #fff;
color: #fff;
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
&::placeholder {
color: #fff;
}
}
}
}
}
}
}
.checkbox {
position: relative !important;
top: 8px !important;
margin-right: 15px !important;
}
.checkbox-icon {
border: 1px solid #fff !important;
width: 20px !important;
height: 20px !important;
background: transparent !important;
}
.checkbox-checked .checkbox-inner {
left: 6px !important;
top: 3px !important;
}
.label {
margin: 0px;
p {
color: #fff;
text-align: left;
font-size: 20px;
font-weight: 300;
}
}
.login_btn {
margin-top: 20px;
width: 100%;
border: 2px solid #fff;
background: transparent !important;
height: 50px;
font-size: 30px;
font-weight: 300;
text-transform: capitalize !important;
}
p {
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 300;
padding-top: 20px;
}
}
}
.ion-page {
background: url("../assets/imgs/salon.gif");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams,Events } from 'ionic-angular';
import { Validators, FormBuilder, FormGroup } from "@angular/forms";
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import { user } from '../../providers/model/model';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
/**
* Generated class for the SignupPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-signup',
templateUrl: 'signup.html',
})
export class SignupPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
signupForm: FormGroup;
post_data:user;
error:boolean = false;
response_msg:string;
success:boolean = false;
device_id:any;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public formBuilder: FormBuilder,
public storage: Storage,
public events: Events
) {
this.signupForm = this.formBuilder.group({
phone_no: ['', Validators.compose([Validators.required, this.service.checkLimit(10000000, 999999999999999)])],
email_id: ['', Validators.compose([Validators.required, Validators.pattern("[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}")])],
password: ['', Validators.compose([Validators.required, Validators.minLength(6)])],
confirm: ['', Validators.compose([Validators.required]), this.MatchPassword.bind(this)],
terms: [null, Validators.compose([Validators.required, Validators.pattern('true')])],
username:['', Validators.compose([Validators.required])],
device_id:['']
})
this.device_id = '';
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
// this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
this.storage.get('get_deviceId').then(data => {
console.log(data);
if(data)
this.device_id = data.userId;
})
console.log('ionViewDidLoad SignupPage');
}
register(){
console.log(this.signupForm.value);
this.service.show_loader();
this.signupForm.controls['device_id'].setValue(this.device_id);
this.post_data = { email_id:this.signupForm.value['email_id'],password:this.signupForm.value['password'],username:this.signupForm.value['username'],phone_no:this.signupForm.value['phone_no'],profile_pic:'assets/images/logo.png', device_id:this.device_id};
this.service.post_data('signUp',this.post_data).subscribe(data=>{
console.log(data);
this.response_msg = data.message;
var token = token
this.service.presentToast(this.response_msg);
this.signupForm.reset();
this.storage.set('token', data.token);
this.storage.set('user_data', data.profile);
this.events.publish('user:created', data.profile, Date.now());
var This = this;
this.service.hide_loader();
setTimeout(() => {
This.navCtrl.setRoot('HomePage')
}, 500);
//this.storage.set('UserData', this.post_data);
//this.navCtrl.push('LoginPage');
//this.service.hide_loader();
}, (err) => {
var data = JSON.parse(err);
console.log(data);
this.response_msg = data['message'].join();
this.service.presentToast(this.response_msg);
this.service.hide_loader();
})
}
MatchPassword(val) {
return new Promise(resolve => {
if (val.value == this.signupForm.value.password) {
resolve(null);
}
else {
resolve({ 'match': false });
}
})
}
signin(){
this.navCtrl.push('LoginPage');
}
}
<ion-content padding class="theme_background" *ngIf="log_status==1">
<ion-card>
<form [formGroup]="signupForm">
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input type="text" placeholder="{{'common.Username' | translate}}" formControlName="username"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.username.invalid && (signupForm.get('username').dirty || signupForm.get('username').touched)">
{{'common.Username_is_required' | translate}}
</div>
<ion-item>
<ion-input type="text" placeholder="{{'common.Email_ID' | translate}}" formControlName="email_id"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.email_id.invalid && (signupForm.get('email_id').dirty || signupForm.get('email_id').touched)">
{{'common.Enter_a_valid_Email' | translate}}
</div>
<ion-item>
<ion-input type="text" placeholder=" {{'common.Phone_No' | translate}}" formControlName="{{'common.Phone_No' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.phone_no.invalid && (signupForm.get('phone_no').dirty || signupForm.get('phone_no').touched)">
{{'common.Enter_a_valid_Phone_no' | translate}}
</div>
<ion-item>
<ion-input type="password" placeholder="{{'common.Password' | translate}}" formControlName="password"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.password.invalid && (signupForm.get('password').dirty || signupForm.get('password').touched)">
{{'common.Password_length_is_6_character' | translate}}
</div>
<ion-item>
<ion-input type="password" placeholder="{{'common.Confirm_Password' | translate}}" formControlName="confirm"></ion-input>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.confirm.invalid && (signupForm.get('confirm').dirty || signupForm.get('confirm').touched)">
{{'common.Password_Mismatch' | translate}}
</div>
<ion-item style="width:100% !important;">
<ion-label>
<p>{{'common.I_accept_terms_&_condition' | translate}}</p>
</ion-label>
<ion-checkbox formControlName="terms"></ion-checkbox>
</ion-item>
<div class="alert error" *ngIf="signupForm.controls.terms.invalid && (signupForm.get('terms').dirty || signupForm.get('terms').touched)">
{{'common.Please_accept_condition' | translate}}
</div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="register()" [disabled]="signupForm.invalid">{{'common.Sign_Up' | translate}}</button>
<p (click)="signin()">{{'common.Already_had_an_account?' | translate}} <strong>{{'common.Sign_in' | translate}}</strong></p>
</ion-card>
</ion-content>
<ion-content padding class="theme_background" *ngIf="log_status==0">
<ion-card>
<form [formGroup]="loginForm">
<ion-list>
<div class="logo_div">
<img src="assets/imgs/logo.png">
</div>
<ion-item>
<ion-input formControlName="username" type="text" placeholder="{{'common.User_Credential' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.username.invalid && (loginForm.get('username').dirty || loginForm.get('username').touched)">
{{'common.Invalid_Credential' | translate}}
</div>
<div class="clear"></div>
<ion-item>
<ion-input formControlName="password" type="password" placeholder="{{'common.Password' | translate}}"></ion-input>
</ion-item>
<div class="alert error" *ngIf="loginForm.controls.password.invalid && (loginForm.get('password').dirty || loginForm.get('password').touched)">
{{'common.Minimum_6_characters_required' | translate}}
</div>
<div class="clear"></div>
</ion-list>
</form>
<button ion-button class="login_btn" (click)="login()" [disabled]="loginForm.invalid">{{'common.Login' | translate}}</button>
<br>
<p (click)="signup()">{{'common.Are_you_new_to_VMig?' | translate}} <strong> {{'common.Click_here' | translate}}</strong></p>
<p (click)="forgot()">{{'common.Forgot_Password?' | translate}}</p>
</ion-card>
</ion-content>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SignupmodalPage } from './signupmodal';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
SignupmodalPage,
],
imports: [
IonicPageModule.forChild(SignupmodalPage),
TranslateModule
],
})
export class SignupmodalPageModule {}
page-signupmodal {
.card {
margin: 0px;
box-shadow: none;
width: 100%;
background: transparent;
padding: 15px;
.list {
.logo_div {
text-align: center;
img {
width: 250px;
margin: 0 auto;
}
}
.item {
margin-bottom: 10px !important;
.item-inner {
.input-wrapper {
.input {
.text-input {
height: 50px;
border-bottom: 2px solid #fff;
color: #fff;
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
&::placeholder {
color: #fff;
}
}
}
}
}
}
}
.checkbox {
position: relative !important;
top: 8px !important;
margin-right: 15px !important;
}
.checkbox-icon {
border: 1px solid #fff !important;
width: 20px !important;
height: 20px !important;
background: transparent !important;
}
.checkbox-checked .checkbox-inner {
left: 6px !important;
top: 3px !important;
}
.label {
margin: 0px;
p {
color: #fff;
text-align: left;
font-size: 20px;
font-weight: 300;
}
}
.login_btn {
margin-top: 20px;
width: 100%;
border: 2px solid #fff;
background: transparent !important;
height: 50px;
font-size: 30px;
font-weight: 300;
text-transform: capitalize !important;
}
p {
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 300;
padding-top: 20px;
}
}
}
.ion-page {
background: url("../assets/imgs/salon.gif");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
\ No newline at end of file
import { Component, ViewChild , ElementRef} from '@angular/core';
import { IonicPage, NavController, NavParams, Events, ViewController } from 'ionic-angular';
import { Validators, FormBuilder, FormGroup } from "@angular/forms";
import { CommonProvider } from '../../providers/common/common';
import { Storage } from '@ionic/storage';
import { user } from '../../providers/model/model';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
declare var google;
/**
* Generated class for the SignupmodalPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-signupmodal',
templateUrl: 'signupmodal.html',
})
export class SignupmodalPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
log_status:any;
signupForm: FormGroup;
post_data:user;
error:boolean = false;
response_msg:string;
success:boolean = false;
device_id:any;
local:user;
loginForm: FormGroup;
constructor(
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
public navCtrl: NavController,
public navParams: NavParams,
public service: CommonProvider,
public formBuilder: FormBuilder,
public storage: Storage,
public events: Events,
public viewCtrl: ViewController
) {
this.log_status = 0;
this.signupForm = this.formBuilder.group({
phone_no: ['', Validators.compose([Validators.required, this.service.checkLimit(10000000, 999999999999999)])],
email_id: ['', Validators.compose([Validators.required, Validators.pattern("[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}")])],
password: ['', Validators.compose([Validators.required, Validators.minLength(6)])],
confirm: ['', Validators.compose([Validators.required]), this.MatchPassword.bind(this)],
terms: [null, Validators.compose([Validators.required, Validators.pattern('true')])],
username:['', Validators.compose([Validators.required])],
device_id:['']
})
this.loginForm = this.formBuilder.group({
username: ['', Validators.compose([Validators.required])],
password: ['', Validators.compose([Validators.required, Validators.minLength(6)])],
device_id:['']
})
this.device_id = '';
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
console.log('ionViewDidLoad SignupmodalPage');
this.storage.get('get_deviceId').then(data => {
console.log(data);
if(data)
this.device_id = data.userId;
})
}
register(){
console.log(this.signupForm.value);
this.service.show_loader();
this.signupForm.controls['device_id'].setValue(this.device_id);
this.post_data = { email_id:this.signupForm.value['email_id'],password:this.signupForm.value['password'],username:this.signupForm.value['username'],phone_no:this.signupForm.value['phone_no'],profile_pic:'assets/images/logo.png', device_id:this.device_id};
this.service.post_data('signUp',this.post_data).subscribe(data=>{
console.log(data);
this.response_msg = data.message;
var token = token
this.service.presentToast(this.response_msg);
this.signupForm.reset();
this.storage.set('token', data.token);
this.storage.set('user_data', data.profile);
this.events.publish('user:created', data.profile, Date.now());
var This = this;
this.service.hide_loader();
setTimeout(() => {
This.viewCtrl.dismiss(data.profile);
//This.navCtrl.setRoot('HomePage')
}, 500);
//this.storage.set('UserData', this.post_data);
//this.navCtrl.push('LoginPage');
//this.service.hide_loader();
}, (err) => {
var data = JSON.parse(err);
console.log(data);
this.response_msg = data['message'].join();
this.service.presentToast(this.response_msg);
this.service.hide_loader();
})
}
MatchPassword(val) {
return new Promise(resolve => {
if (val.value == this.signupForm.value.password) {
resolve(null);
}
else {
resolve({ 'match': false });
}
})
}
signin(){
this.log_status = 0;
}
login(){
this.service.show_loader();
console.log(this.loginForm.value);
this.loginForm.controls['device_id'].setValue(this.device_id);
this.service.post_data('signIn',this.loginForm.value).subscribe(response=>{
if (response.status == 'success'){
this.storage.set('token', response.token);
this.storage.set('user_data', response.profile);
this.events.publish('user:created', response.profile, Date.now());
var This = this;
this.service.hide_loader();
setTimeout(() => {
This.viewCtrl.dismiss(response.profile);
//This.navCtrl.setRoot('HomePage')
}, 500);
}
else{
this.service.hide_loader();
this.service.presentToast("Invalid username and Password");
}
}, (err) => {
var data = JSON.parse(err);
console.log(data);
this.service.presentToast(data['message']);
this.service.hide_loader();
})
}
signup(){
this.log_status = 1;
}
forgot(){
this.navCtrl.push("ForgotPage");
}
}
<ion-content padding class="theme_background">
<div class="booking_success" *ngIf="result">
<ion-icon name="ios-checkmark-circle-outline"></ion-icon>
<h1>{{'common.Success!' | translate}}</h1>
<h5>{{'common.Your_booking_has_been_confirmed' | translate}}</h5>
<h5>{{'common.Booking_ID_is' | translate}}<strong>{{result.booked_id}}</strong><br> {{'common.on' | translate}} {{result.booking_date}} {{'common.at' | translate}} {{result.booking_time}}
</h5>
</div>
</ion-content>
<ion-footer>
<ion-row>
<ion-col col-6>
<button ion-button class="done_btn" (click)="mybooking()"> {{'common.My_Booking' | translate}}</button>
</ion-col>
<ion-col col-6>
<button ion-button class="done_btn" (click)="home()">{{'common.Go_to_Home' | translate}}</button>
</ion-col>
</ion-row>
</ion-footer>
\ No newline at end of file
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SuccessPage } from './success';
import { TranslateModule} from '@ngx-translate/core';
@NgModule({
declarations: [
SuccessPage,
],
imports: [
IonicPageModule.forChild(SuccessPage),
TranslateModule
],
})
export class SuccessPageModule {}
page-success {
.booking_success {
align-content: center;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
overflow-y: hidden;
height: 100%;
.icon {
color: #fff;
font-size: 120px;
}
h1 {
color: #fff;
font-size: 56px;
font-weight: 300;
}
h5 {
color: #fff;
font-weight: 200;
letter-spacing: 1px;
margin: 0px;
line-height: 30px;
}
}
.done_btn {
width: 100%;
border: none;
color: #fff;
background: transparent !important;
font-weight: 300;
text-transform: capitalize !important;
}
}
\ No newline at end of file
import { Component, ViewChild, ElementRef } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {TranslateService} from '@ngx-translate/core';
import { SubjectService } from '../../providers/subject.service';
import { WebService_lang } from '../../providers/web.service';
import * as $ from 'jquery';
/**
* Generated class for the SuccessPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-success',
templateUrl: 'success.html',
})
export class SuccessPage {
@ViewChild('language') language: ElementRef;
lang = 'en';
result:any;
constructor(
public navCtrl: NavController,
public navParams: NavParams,
public translate: TranslateService,
public subjectService: SubjectService,
public service_lang: WebService_lang,
) {
this.result = navParams.get('shop');
console.log(this.result);
this.subjectService.getLangData().subscribe(langData => {
console.log(langData);
this.lang = this.service_lang.getLocalStorageItem('lang');
console.log(this.lang);
if (this.lang) {
translate.setDefaultLang(this.lang);
translate.use(this.lang);
}
});
const lang = this.service_lang.getLocalStorageItem('lang');
console.log(lang);
if(lang !== undefined){
this.lang = lang;
}
if(this.lang === 'ru') {
$('body').addClass('ru');
} else {
$('body').removeClass('ru');
}
//this.lang = 'en';
translate.setDefaultLang(this.lang);
// the lang to use, if the lang isn't available, it will use the current loader to get them
translate.use(this.lang);
}
ionViewDidLoad() {
console.log('ionViewDidLoad SuccessPage');
}
home(){
this.navCtrl.push("HomePage");
}
mybooking(){
this.navCtrl.push("MybookingPage");
}
}
import { Http } from '@angular/http';
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { Observable} from 'rxjs/Rx';
import { LoadingController, ToastController } from 'ionic-angular';
import { AbstractControl, ValidatorFn } from '@angular/forms'
@Injectable()
export class CommonProvider {
site_url:string;
webservice_url:string;
loader:any;
headers:any;
constructor(
public http: Http,
public loadingCtrl: LoadingController,
public toastCtrl: ToastController
) {
this.headers = { 'X-API-KEY': 'mykey' };
this.site_url = 'http://vmig.kz/vmig/';
//this.site_url = 'https://techlabz.in/client/vmig_demo/';//my_key
this.webservice_url = this.site_url+'admin/index.php/Webservice_App/';
}
post_data(url,data){
//this.http.setHeader('*', 'accept', 'application-json');
return this.http.post(this.webservice_url+url, data,{headers:this.headers}).map(res=>res.json()).catch(initialError => {
return Observable.throw(initialError._body);
});
}
get_data(url){
return new Promise(resolve => {
this.show_loader();
this.http.get(this.webservice_url+url).map(res=>{
console.log(res);
resolve(res);
}).subscribe(data => {
console.log(data);
}, err => {
console.log(err);
});
})
}
show_loader() {
this.loader = this.loadingCtrl.create({
content: ""
});
this.loader.present();
setTimeout(() => {
this.loader.dismiss();
//this.presentToast("Something went wrong");
}, 10000);
}
hide_loader() {
this.loader.dismissAll();
}
presentToast(message) {
let toast = this.toastCtrl.create({
message: message,
duration: 3000,
position: 'bottom'
});
toast.onDidDismiss(() => {
console.log('Dismissed toast');
});
toast.present();
}
checkLimit(min: number, max: number): ValidatorFn {
return (c: AbstractControl): { [key: string]: boolean } | null => {
if (c.value && (isNaN(c.value) || c.value < min || c.value > max)) {
return { 'range': true };
}
return null;
};
}
}
export class user{
email_id:string
password: string
phone_no: string
username: string
profile_pic: string;
device_id:any;
}
\ No newline at end of file
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { BehaviorSubject } from 'rxjs';
@Injectable()
export class SubjectService {
private isLang = new BehaviorSubject<any>(null);
changeLang(langData: any) {
this.isLang.next(langData);
}
getLangData(): Observable<any> {
return this.isLang.asObservable();
}
}
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { map, catchError } from 'rxjs/operators';
import { SubjectService } from './subject.service';
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
'Auth': 'my_key'
})
};
const httplive = {
headers: new HttpHeaders({
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization'
})
};
@Injectable()
export class WebService_lang {
constructor(private http: HttpClient, public subjectService: SubjectService) {
}
setLocalStorageItem(id: string, data: string) {
localStorage.setItem(id, data);
}
getLocalStorageItem(data: string): string {
return localStorage.getItem(data);
}
removeLocalStorageItem(data) {
localStorage.removeItem(data);
localStorage.clear();
}
}
/**
* Check out https://googlechromelabs.github.io/sw-toolbox/ for
* more info on how to use sw-toolbox to custom configure your service worker.
*/
'use strict';
importScripts('./build/sw-toolbox.js');
self.toolbox.options.cache = {
name: 'ionic-cache'
};
// pre-cache our key assets
self.toolbox.precache(
[
'./build/main.js',
'./build/vendor.js',
'./build/main.css',
'./build/polyfills.js',
'index.html',
'manifest.json'
]
);
// dynamically cache any other local assets
self.toolbox.router.any('/*', self.toolbox.fastest);
// for any other requests go to the network, cache,
// and then only use that cached resource if your user goes offline
self.toolbox.router.default = self.toolbox.networkFirst;
// Ionic Variables and Theming. For more info, please see:
// http://ionicframework.com/docs/theming/
// Font path is used to include ionicons,
// roboto, and noto sans fonts
$font-path: "../assets/fonts";
// The app direction is used to include
// rtl styles in your app. For more info, please see:
// http://ionicframework.com/docs/theming/rtl-support/
$app-direction: ltr;
@import "ionic.globals";
// Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass variables found in Ionic's source scss files.
// To view all the possible Ionic variables, see:
// http://ionicframework.com/docs/theming/overriding-ionic-variables/
// Named Color Variables
// --------------------------------------------------
// Named colors makes it easy to reuse colors on various components.
// It's highly recommended to change the default colors
// to match your app's branding. Ionic uses a Sass map of
// colors so you can add, rename and remove colors as needed.
// The "primary" color is the only required color in the map.
$colors: ( primary : #f0525f, secondary : #fff, danger : #f53d3d, light : #f4f4f4, dark : #222);
// App iOS Variables
// --------------------------------------------------
// iOS only Sass variables can go here
// App Material Design Variables
// --------------------------------------------------
// Material Design only Sass variables can go here
// App Windows Variables
// --------------------------------------------------
// Windows only Sass variables can go here
// App Theme
// --------------------------------------------------
// Ionic apps can have different themes applied, which can
// then be future customized. This import comes last
// so that the above variables are used and Ionic's
// default are overridden.
@import "ionic.theme.default";
// Ionicons
// --------------------------------------------------
// The premium icon font for Ionic. For more info, please see:
// http://ionicframework.com/docs/ionicons/
@import "ionic.ionicons";
// Fonts
// --------------------------------------------------
@import "roboto";
@import "noto-sans";
\ No newline at end of file
{
"compilerOptions": {
"noUnusedLocals": false,
"noUnusedParameters": false,
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
\ No newline at end of file
{
"rules": {
"no-duplicate-variable": true,
"no-unused-variable": [
true
]
},
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules"
]
}
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