Commit cd027b99 by Nabil Sadki

Merge branch 'v1.0.8.1'

# Conflicts:
#	.gitignore
#	config.xml
#	package.json
#	src/app/app-routing.module.ts
#	src/app/app.component.ts
#	src/app/pages/dashboard/dashboard.page.html
#	src/app/pages/dashboard/dashboard.page.ts
#	src/app/pages/mainslider/mainslider.page.html
#	src/app/pages/mainslider/mainslider.page.scss
#	src/app/pages/mainslider/mainslider.page.ts
#	src/app/pages/menu/menu.module.ts
#	src/app/pages/menu/menu.page.html
#	src/app/pages/menu/menu.page.ts
#	src/app/pages/params/params.page.html
#	src/app/pages/partenaires-list/partenaires-list.page.ts
#	src/app/pages/start/start.page.ts
#	src/app/services/location-service.ts
#	src/app/services/trip-service.ts
parents 02cedb83 6a2c8e49
...@@ -32,3 +32,6 @@ $RECYCLE.BIN/ ...@@ -32,3 +32,6 @@ $RECYCLE.BIN/
.DS_Store .DS_Store
Thumbs.db Thumbs.db
UserInterfaceState.xcuserstate UserInterfaceState.xcuserstate
.history
.gradle
v1.0.8.1
- Add CHANGELOG.md
- Set geolocation param default to true
- Add more values to notiftime parameter
- Set notiftime param default to 1 day
- Add Allo Testeurs logo to menu
- Add presentation to menu
- Add skip presentation!
v1.0.8.0
- Presentation
- Deals list
- Partners list
- Partners geolocation
- Partners geonotification
- General params
- About us
- Contact us
\ No newline at end of file
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.allotesteurs.app" version="1.0.8.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget android-versionCode="10810" id="com.allotesteurs.app" version="1.0.8.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Allo Testeurs</name> <name>Allo Testeurs</name>
<description>Découvrir les bon plans à Kénitra et ailleurs!</description> <description>Découvrir les bon plans à Kénitra et ailleurs!</description>
<author email="contact@allo-testeurs.com" href="https://www.allo-testeurs.com">Allo Testeurs Agency</author> <author email="contact@allo-testeurs.com" href="https://www.allo-testeurs.com">Allo Testeurs Agency</author>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<preference name="DisallowOverscroll" value="true" /> <preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="19" /> <preference name="android-minSdkVersion" value="19" />
<preference name="BackupWebStorage" value="none" /> <preference name="BackupWebStorage" value="none" />
<preference name="SplashScreenDelay" value="6000" /> <preference name="SplashScreenDelay" value="10000" />
<preference name="FadeSplashScreen" value="true" /> <preference name="FadeSplashScreen" value="true" />
<preference name="ShowSplashScreen" value="true" /> <preference name="ShowSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="false" /> <preference name="ShowSplashScreenSpinner" value="false" />
......
{ {
"name": "atapp", "name": "atapp",
"version": "0.0.1", "version": "1.0.8.1",
"author": "Allo Testeurs", "author": "Allo Testeurs",
"homepage": "http://www.allo-testeurs.com/", "homepage": "http://www.allo-testeurs.com/",
"scripts": { "scripts": {
......
...@@ -6,17 +6,6 @@ const routes: Routes = [ ...@@ -6,17 +6,6 @@ const routes: Routes = [
{ path: 'start', loadChildren: './pages/start/start.module#StartPageModule' }, { path: 'start', loadChildren: './pages/start/start.module#StartPageModule' },
{ path: 'mainslider', loadChildren: './pages/mainslider/mainslider.module#MainsliderPageModule' }, { path: 'mainslider', loadChildren: './pages/mainslider/mainslider.module#MainsliderPageModule' },
{ path: 'app', loadChildren: './pages/menu/menu.module#MenuPageModule' }, { path: 'app', loadChildren: './pages/menu/menu.module#MenuPageModule' },
// { path: 'etablissement', loadChildren: './pages/etablissement/etablissement.module#EtablissementPageModule' },
// { path: 'login', loadChildren: './pages/login/login.module#LoginPageModule' },
// { path: 'dashboard', loadChildren: './pages/dashboard/dashboard.module#DashboardPageModule' },
// { path: 'contact', loadChildren: './pages/contact/contact.module#ContactPageModule' },
// { path: 'a-propos', loadChildren: './pages/a-propos/a-propos.module#AProposPageModule' },
// { path: 'params', loadChildren: './pages/params/params.module#ParamsPageModule' },
// { path: 'gagner-points', loadChildren: './pages/gagner-points/gagner-points.module#GagnerPointsPageModule' },
// { path: 'lots-a-gagner', loadChildren: './pages/lots-a-gagner/lots-a-gagner.module#LotsAGagnerPageModule' },
// { path: 'partenaires', loadChildren: './pages/partenaires/partenaires.module#PartenairesPageModule' },
// { path: 'partenaires-list', loadChildren: './pages/partenaires-list/partenaires-list.module#PartenairesListPageModule' },
// { path: 'partenaires-map', loadChildren: './pages/partenaires-map/partenaires-map.module#PartenairesMapPageModule' },
]; ];
@NgModule({ @NgModule({
......
...@@ -52,7 +52,7 @@ export class AppComponent { ...@@ -52,7 +52,7 @@ export class AppComponent {
setDefaultParams() { setDefaultParams() {
this._STOR.get('PARAM_geolocate').then((val) => { this._STOR.get('PARAM_geolocate').then((val) => {
if (val === null) { if (val === null) {
this._STOR.set('PARAM_geolocate', false); this._STOR.set('PARAM_geolocate', true);
} }
}); });
this._STOR.get('PARAM_geoarea').then((val) => { this._STOR.get('PARAM_geoarea').then((val) => {
...@@ -62,7 +62,7 @@ export class AppComponent { ...@@ -62,7 +62,7 @@ export class AppComponent {
}); });
this._STOR.get('PARAM_notiftime').then((val) => { this._STOR.get('PARAM_notiftime').then((val) => {
if (val === null) { if (val === null) {
this._STOR.set('PARAM_notiftime', 15); this._STOR.set('PARAM_notiftime', 2880);
} }
}); });
this._STOR.get('PARAM_trackdelay').then((val) => { this._STOR.get('PARAM_trackdelay').then((val) => {
......
<ion-header *ngIf="_ALLO.showPage"> <ion-header>
<ion-toolbar color="primary"> <ion-toolbar color="primary">
<ion-buttons slot="start"> <ion-buttons slot="start">
<!-- <ion-button menuToggle> <!-- <ion-button menuToggle>
......
...@@ -32,7 +32,7 @@ export class DashboardPage implements OnInit { ...@@ -32,7 +32,7 @@ export class DashboardPage implements OnInit {
ngOnInit() { ngOnInit() {
console.log('ngOnInit Dashboard'); console.log('ngOnInit Dashboard');
this._ALLO.presentLoading(); // this._ALLO.presentLoading();
} }
setImgVisible(trip) { setImgVisible(trip) {
......
<ion-content> <ion-content>
<ion-slides pager="true"> <ion-slides #mainSlider pager="true">
<ion-slide color="primary" padding> <ion-slide color="primary" padding>
<ion-item lines="none" color="primary" class="skip">
<ion-button fill="outline" color="light" (click)="skipPresentation($event)">
Passer <ion-icon name="arrow-dropright-circle" slot="end"></ion-icon>
</ion-button>
</ion-item>
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
...@@ -54,6 +59,11 @@ ...@@ -54,6 +59,11 @@
<button ion-button class="round" color="light" margin-top full tappable (click)="getNotifs()">Notifs!</button>--> <button ion-button class="round" color="light" margin-top full tappable (click)="getNotifs()">Notifs!</button>-->
</ion-slide> </ion-slide>
<ion-slide padding> <ion-slide padding>
<ion-item lines="none" color="primary" class="skip">
<ion-button fill="outline" color="light" (click)="skipPresentation($event)">
Passer <ion-icon name="arrow-dropright-circle" slot="end"></ion-icon>
</ion-button>
</ion-item>
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
...@@ -82,6 +92,11 @@ ...@@ -82,6 +92,11 @@
</ion-grid> </ion-grid>
</ion-slide> </ion-slide>
<ion-slide padding> <ion-slide padding>
<ion-item lines="none" color="primary" class="skip">
<ion-button fill="outline" color="light" (click)="skipPresentation($event)">
Passer <ion-icon name="arrow-dropright-circle" slot="end"></ion-icon>
</ion-button>
</ion-item>
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
...@@ -110,6 +125,11 @@ ...@@ -110,6 +125,11 @@
</ion-grid> </ion-grid>
</ion-slide> </ion-slide>
<ion-slide padding> <ion-slide padding>
<ion-item lines="none" color="primary" class="skip">
<ion-button fill="outline" color="light" (click)="skipPresentation($event)">
Passer <ion-icon name="arrow-dropright-circle" slot="end"></ion-icon>
</ion-button>
</ion-item>
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
...@@ -192,7 +212,8 @@ ...@@ -192,7 +212,8 @@
<ion-grid no-margin no-padding> <ion-grid no-margin no-padding>
<ion-row> <ion-row>
<ion-col> <ion-col>
<ion-button class="round" color="light" margin-top full tappable href="/app/dashboard"> <ion-button class="round" color="light" margin-top full tappable
href="/app/dashboard">
Continuer sans &nbsp;<ion-icon name="arrow-dropright-circle"></ion-icon> Continuer sans &nbsp;<ion-icon name="arrow-dropright-circle"></ion-icon>
</ion-button> </ion-button>
</ion-col> </ion-col>
......
...@@ -9,8 +9,12 @@ ion-slides { ...@@ -9,8 +9,12 @@ ion-slides {
font-family: "Open Sans Light" !important; font-family: "Open Sans Light" !important;
text-align: justify; text-align: justify;
} }
.skip {
position: absolute;
top: 20px;
right: 20px;
}
} }
.swiper-pagination-bullet-active {
background-color: var(--ion-color-light, #ffffff); --bullet-background-active: var(--ion-color-light, #ffffff) !important;
}
} }
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { Platform, NavController } from '@ionic/angular'; import { Platform, NavController, IonSlides } from '@ionic/angular';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
// import { DashboardPage } from "../dashboard/dashboard"; // import { DashboardPage } from "../dashboard/dashboard";
import { PermService } from "../../services/perm-service"; import { PermService } from '../../services/perm-service';
import { LocationService } from "../../services/location-service"; import { LocationService } from '../../services/location-service';
// import { AlloService } from "../../services/allo-service"; // import { AlloService } from "../../services/allo-service";
// import { LocalNotifications } from '@ionic-native/local-notifications/ngx'; // import { LocalNotifications } from '@ionic-native/local-notifications/ngx';
@Component({ @Component({
selector: 'page-mainslider', selector: 'page-mainslider',
templateUrl: './mainslider.page.html', templateUrl: './mainslider.page.html',
styleUrls: ['./mainslider.page.scss'], styleUrls: ['./mainslider.page.scss'],
}) })
export class MainsliderPage { export class MainsliderPage {
// @ViewChild(Nav) nav: NavController; // @ViewChild(Nav) nav: NavController;
@ViewChild(IonSlides) mainSlider: IonSlides;
slideOpts = {
effect: 'flip' slideOpts = {
}; effect: 'flip'
public prmMainslider: boolean; };
public prmMainslider: boolean;
constructor(
public platform: Platform, constructor(
public navCtrl: NavController, public platform: Platform,
// public navParams: NavParams, public navCtrl: NavController,
// public LN: LocalNotifications, // public navParams: NavParams,
private _PERM: PermService, // public LN: LocalNotifications,
private _LOCATE: LocationService, private _PERM: PermService,
// private _ALLO: AlloService, private _LOCATE: LocationService,
private _STOR: Storage, // private _ALLO: AlloService,
private router: Router private _STOR: Storage,
) { private router: Router
this.prmMainslider = false; ) {
} this.prmMainslider = false;
}
// gpsStart() {
// this._LOCATE.startTracking(); // gpsStart() {
// } // this._LOCATE.startTracking();
// }
// gpsStop() {
// this._LOCATE.stopTracking(); // gpsStop() {
// } // this._LOCATE.stopTracking();
// }
// gpsStatus() {
// this._LOCATE.checkStatus(); // gpsStatus() {
// } // this._LOCATE.checkStatus();
// }
// gpsLocations() {
// this._LOCATE.getLocations(); // gpsLocations() {
// } // this._LOCATE.getLocations();
// }
// gpsLogEntries() {
// this._LOCATE.getLogEntries(); // gpsLogEntries() {
// } // this._LOCATE.getLogEntries();
// }
// setParam() {
// console.log(this.prmMainslider); // setParam() {
// this._STOR.set('PARAM_mainslider', this.prmMainslider); // console.log(this.prmMainslider);
// } // this._STOR.set('PARAM_mainslider', this.prmMainslider);
// }
getGps() {
if (this.platform.is('cordova')) { skipPresentation($event) {
console.log('cord'); this.mainSlider.getActiveIndex().then(index => {
this._PERM.checkGps(); this.mainSlider.slideTo(4);
this._LOCATE.initLocator(); });
} }
this._STOR.set('PARAM_geolocate', true);
this.goToDashboard(); getGps() {
} if (this.platform.is('cordova')) {
console.log('cord');
getDashboard() { this._PERM.checkGps();
this._STOR.set('PARAM_geolocate', false); this._LOCATE.initLocator();
this.goToDashboard(); }
} this._STOR.set('PARAM_geolocate', true);
this.goToDashboard();
goToDashboard() { }
this.router.navigateByUrl('/app/dashboard');
} getDashboard() {
this._STOR.set('PARAM_geolocate', false);
ionViewDidEnter() { this.goToDashboard();
console.log('ionViewDidEnter Mainslider'); }
// this._ALLO.presentLoading();
} goToDashboard() {
this.router.navigateByUrl('/app/dashboard');
ionViewDidLoad() { }
console.log('ionViewDidLoad Mainslider');
// this._ALLO.dismissLoading(); ionViewDidEnter() {
} console.log('ionViewDidEnter Mainslider');
// this._ALLO.presentLoading();
// getNearby() { }
// this._STOR.get('REST_services').then((services) => {
// if ('object' === typeof services && services.hasOwnProperty('brands')) { ionViewDidLoad() {
// let brands = this._ALLO.jsonToArray(services.brands); console.log('ionViewDidLoad Mainslider');
// this._ALLO.dismissLoading();
// this._STOR.get('PARAM_geoarea').then((area) => { }
// if (area === null) {
// area = 400; // getNearby() {
// } // this._STOR.get('REST_services').then((services) => {
// if ('object' === typeof services && services.hasOwnProperty('brands')) {
// this._STOR.get('NOTIF_shownpartners').then((shown) => { // let brands = this._ALLO.jsonToArray(services.brands);
// let shown_notifs = [];
// if (shown !== null) { // this._STOR.get('PARAM_geoarea').then((area) => {
// shown_notifs = shown; // if (area === null) {
// } // area = 400;
// }
// let notifs = [];
// brands.forEach(partner => { // this._STOR.get('NOTIF_shownpartners').then((shown) => {
// if (this.checkNotifTime(partner.id, shown_notifs)) { // let shown_notifs = [];
// let lat1 = partner.latitude; // if (shown !== null) {
// let lon1 = partner.longitude; // shown_notifs = shown;
// let lat2 = 34.253968; // }
// let lon2 = -6.580888;
// let distance = this._LOCATE.calculateDistance(lat1, lon1, lat2, lon2); // let notifs = [];
// brands.forEach(partner => {
// if (distance <= (area / 1000)) { // if (this.checkNotifTime(partner.id, shown_notifs)) {
// notifs.push({ // let lat1 = partner.latitude;
// id: partner.id, // let lon1 = partner.longitude;
// title: 'Spotted ! ' + partner.label, // let lat2 = 34.253968;
// text: 'Vous êtes tout prêt de ce partenaire!', // let lon2 = -6.580888;
// led: 'FFFFFF', // let distance = this._LOCATE.calculateDistance(lat1, lon1, lat2, lon2);
// attachments: [partner.thumb],
// sound: null // if (distance <= (area / 1000)) {
// }); // notifs.push({
// let current_date = new Date(); // id: partner.id,
// shown_notifs.push({ // title: 'Spotted ! ' + partner.label,
// id: partner.id, // text: 'Vous êtes tout prêt de ce partenaire!',
// time: current_date.getTime() // led: 'FFFFFF',
// }); // attachments: [partner.thumb],
// } // sound: null
// } // });
// }); // let current_date = new Date();
// shown_notifs = this.makeUnique(shown_notifs); // shown_notifs.push({
// this._STOR.set('NOTIF_shownpartners', shown_notifs); // id: partner.id,
// if (notifs) { // time: current_date.getTime()
// this.showMultipleNotification(notifs); // });
// } // }
// }); // }
// }); // });
// } // shown_notifs = this.makeUnique(shown_notifs);
// }); // this._STOR.set('NOTIF_shownpartners', shown_notifs);
// } // if (notifs) {
// this.showMultipleNotification(notifs);
// makeUnique(shown) { // }
// let filtred = []; // });
// shown.forEach(notif => { // });
// let exist = filtred.filter(obj => { // }
// return obj.id === notif.id; // });
// }); // }
// if (exist.length == 0) { // makeUnique(shown) {
// filtred.push(notif); // let filtred = [];
// } else { // shown.forEach(notif => {
// filtred = filtred.filter(function (obj) { // let exist = filtred.filter(obj => {
// return obj.id !== notif.id; // return obj.id === notif.id;
// }); // });
// filtred.push(notif);
// } // if (exist.length == 0) {
// }); // filtred.push(notif);
// } else {
// return filtred; // filtred = filtred.filter(function (obj) {
// } // return obj.id !== notif.id;
// });
// checkNotifTime(id, shown) { // filtred.push(notif);
// let valid = true; // }
// let notifs_count = shown.length; // });
// let i = 0;
// for (i = 0; i < notifs_count; i++) { // return filtred;
// let notif = shown[i]; // }
// let notif_date = new Date(notif.time);
// let current_date = new Date(); // checkNotifTime(id, shown) {
// if (notif.id == id && ((current_date.getTime() - notif_date.getTime()) / 1000) <= 3600) { // let valid = true;
// valid = false; // let notifs_count = shown.length;
// break; // let i = 0;
// } // for (i = 0; i < notifs_count; i++) {
// } // let notif = shown[i];
// let notif_date = new Date(notif.time);
// return valid; // let current_date = new Date();
// } // if (notif.id == id && ((current_date.getTime() - notif_date.getTime()) / 1000) <= 3600) {
// valid = false;
// showNotification(title, text) { // break;
// this.LN.requestPermission().then((granted) => { // }
// console.log(granted); // }
// if (granted) {
// this.LN.schedule({ // return valid;
// title: title, // }
// text: text,
// led: 'FFFFFF', // showNotification(title, text) {
// sound: null // this.LN.requestPermission().then((granted) => {
// }); // console.log(granted);
// } // if (granted) {
// }); // this.LN.schedule({
// } // title: title,
// text: text,
// showMultipleNotification(notifs) { // led: 'FFFFFF',
// this.LN.requestPermission().then((granted) => { // sound: null
// if (granted) { // });
// this.LN.schedule(notifs); // }
// } // });
// }); // }
// }
// showMultipleNotification(notifs) {
// this.LN.requestPermission().then((granted) => {
// if (granted) {
// this.LN.schedule(notifs);
// }
// });
// }
} }
...@@ -5,8 +5,6 @@ import { Routes, RouterModule } from '@angular/router'; ...@@ -5,8 +5,6 @@ import { Routes, RouterModule } from '@angular/router';
import { IonicModule } from '@ionic/angular'; import { IonicModule } from '@ionic/angular';
// import { NoBorderDirective } from '../../directives/no-border.directive';
import { MenuPage } from './menu.page'; import { MenuPage } from './menu.page';
const routes: Routes = [ const routes: Routes = [
...@@ -24,10 +22,6 @@ const routes: Routes = [ ...@@ -24,10 +22,6 @@ const routes: Routes = [
loadChildren: '../dashboard/dashboard.module#DashboardPageModule' loadChildren: '../dashboard/dashboard.module#DashboardPageModule'
}, },
{ {
path: 'etablissement',
loadChildren: '../etablissement/etablissement.module#EtablissementPageModule'
},
{
path: 'partenaires', path: 'partenaires',
loadChildren: '../partenaires/partenaires.module#PartenairesPageModule' loadChildren: '../partenaires/partenaires.module#PartenairesPageModule'
}, },
...@@ -42,18 +36,6 @@ const routes: Routes = [ ...@@ -42,18 +36,6 @@ const routes: Routes = [
{ {
path: 'a-propos', path: 'a-propos',
loadChildren: '../a-propos/a-propos.module#AProposPageModule' loadChildren: '../a-propos/a-propos.module#AProposPageModule'
},
{
path: 'gagner-points',
loadChildren: '../gagner-points/gagner-points.module#GagnerPointsPageModule'
},
{
path: 'lots-a-gagner',
loadChildren: '../lots-a-gagner/lots-a-gagner.module#LotsAGagnerPageModule'
},
{
path: 'login',
loadChildren: '../login/login.module#LoginPageModule'
} }
] ]
} }
......
<ion-menu contentId="content"> <ion-menu contentId="content">
<ion-header>
<ion-header> <ion-toolbar color="primary">
<ion-toolbar color="primary"> <!-- <ion-title>Menu</ion-title> -->
<!-- <ion-title>Menu</ion-title> --> <!-- <ion-thumbnail size="large" slot="start" class="ion-margin-start"> -->
<ion-avatar size="large" slot="start" class="ion-margin-start"> <ion-grid>
<img src="../../../assets/img/avatar.jpeg"> <ion-row>
</ion-avatar> <ion-col size="2"></ion-col>
<ion-item color="primary" lines="none"> <ion-col size="8">
<ion-label> <img src="../../../assets/logo-full-white.png">
<h2>Nabil Sadki</h2> </ion-col>
<h3>Premium</h3> <ion-col size="2"></ion-col>
<p> </ion-row>
<ion-badge color="light">1000 points</ion-badge> </ion-grid>
</p> <!-- </ion-thumbnail> -->
</ion-label> </ion-toolbar>
<ion-button fill="outline" slot="end" color="light">Modifier</ion-button> </ion-header>
</ion-item> <ion-content>
</ion-toolbar>
</ion-header> <div *ngFor="let p of pages">
<ion-content> <!-- Standard Menu Item -->
<ion-menu-toggle *ngIf="p.url">
<div *ngFor="let p of pages"> <ion-item [routerLink]="p.url" routerDirection="root" routerLinkActive="active">
<ion-icon [name]="p.icon" slot="start"></ion-icon>
<!-- Standard Menu Item --> <ion-label>
<ion-menu-toggle *ngIf="p.url"> {{ p.title }}
<ion-item [routerLink]="p.url" routerDirection="root" routerLinkActive="active"> </ion-label>
<ion-icon [name]="p.icon" slot="start"></ion-icon> </ion-item>
<ion-label> </ion-menu-toggle>
{{ p.title }} <!-- Item with Children -->
</ion-label>
</ion-item> <ion-item button *ngIf="p.children?.length > 0" (click)="p.open = !p.open" [class.parent-active]="p.open"
</ion-menu-toggle> detail="false">
<!-- Item with Children --> <ion-icon slot="start" name="arrow-forward" *ngIf="!p.open"></ion-icon>
<ion-icon slot="start" name="arrow-down" *ngIf="p.open"></ion-icon>
<ion-item button *ngIf="p.children?.length > 0" (click)="p.open = !p.open" [class.parent-active]="p.open" <ion-label>{{ p.title }}</ion-label>
detail="false"> </ion-item>
<ion-icon slot="start" name="arrow-forward" *ngIf="!p.open"></ion-icon>
<ion-icon slot="start" name="arrow-down" *ngIf="p.open"></ion-icon> <!-- Children List for clicked Item -->
<ion-label>{{ p.title }}</ion-label> <ion-list *ngIf="p.open">
</ion-item> <ion-menu-toggle>
<ion-item *ngFor="let sub of p.children" class="sub-item" [routerLink]="sub.url"
<!-- Children List for clicked Item --> routerDirection="root" routerLinkActive="active">
<ion-list *ngIf="p.open"> <ion-icon [name]="sub.icon" slot="start"></ion-icon>
<ion-menu-toggle> <ion-label>
<ion-item *ngFor="let sub of p.children" class="sub-item" [routerLink]="sub.url" routerDirection="root" {{ sub.title }}
routerLinkActive="active"> </ion-label>
<ion-icon [name]="sub.icon" slot="start"></ion-icon> </ion-item>
<ion-label> </ion-menu-toggle>
{{ sub.title }} </ion-list>
</ion-label>
</ion-item> </div>
</ion-menu-toggle> </ion-content>
</ion-list>
</div>
</ion-content>
</ion-menu> </ion-menu>
......
...@@ -34,29 +34,9 @@ export class MenuPage implements OnInit { ...@@ -34,29 +34,9 @@ export class MenuPage implements OnInit {
icon: 'alert' icon: 'alert'
}, },
{ {
title: 'Experimental', title: 'Présentation',
children: [ url: '/mainslider',
{ icon: 'albums'
title: 'Etablissement',
url: '/app/etablissement',
icon: 'business'
},
{
title: 'Gagner des points',
url: '/app/gagner-points',
icon: 'gift'
},
{
title: 'Lots à gagner',
url: '/app/lots-a-gagner',
icon: 'gift'
},
{
title: 'Login',
url: '/app/login',
icon: 'key'
},
]
} }
]; ];
......
...@@ -56,9 +56,11 @@ ...@@ -56,9 +56,11 @@
<ion-select-option value="15">15 min</ion-select-option> <ion-select-option value="15">15 min</ion-select-option>
<ion-select-option value="30">30 min</ion-select-option> <ion-select-option value="30">30 min</ion-select-option>
<ion-select-option value="45">45 min</ion-select-option> <ion-select-option value="45">45 min</ion-select-option>
<ion-select-option value="60">1h</ion-select-option> <ion-select-option value="60">1 h</ion-select-option>
<ion-select-option value="120">2h</ion-select-option> <ion-select-option value="120">2 h</ion-select-option>
<ion-select-option value="480">4h</ion-select-option> <ion-select-option value="480">4 h</ion-select-option>
<ion-select-option value="960">8 h</ion-select-option>
<ion-select-option value="2880">1 j</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>
<ion-item> <ion-item>
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { LoadingController } from '@ionic/angular'; import { LoadingController } from '@ionic/angular';
// import { ActivatedRoute } from '@angular/router';
import { TripService } from '../../services/trip-service'; import { TripService } from '../../services/trip-service';
import { AlloService } from '../../services/allo-service'; import { AlloService } from '../../services/allo-service';
...@@ -14,8 +15,10 @@ export class PartenairesListPage implements OnInit { ...@@ -14,8 +15,10 @@ export class PartenairesListPage implements OnInit {
public partenairesList: Array<any> = []; public partenairesList: Array<any> = [];
public offresList: Array<any> = []; public offresList: Array<any> = [];
private loading: any; private loading: any;
// private partnerId: any = null;
constructor( constructor(
// private activatedRoute: ActivatedRoute,
public loadingController: LoadingController, public loadingController: LoadingController,
public _ALLO: AlloService, public _ALLO: AlloService,
public _TRIP: TripService public _TRIP: TripService
...@@ -56,7 +59,8 @@ export class PartenairesListPage implements OnInit { ...@@ -56,7 +59,8 @@ export class PartenairesListPage implements OnInit {
ngOnInit() { ngOnInit() {
console.log('ngOnInit'); console.log('ngOnInit');
this._ALLO.presentLoading(); // this.partnerId = this.activatedRoute.snapshot.paramMap.get('partnerid');
// this._ALLO.presentLoading();
} }
ionViewDidEnter() { ionViewDidEnter() {
......
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { TripService } from '../../services/trip-service';
@Component({ @Component({
selector: 'app-start', selector: 'app-start',
...@@ -7,10 +8,14 @@ import { Component, OnInit } from '@angular/core'; ...@@ -7,10 +8,14 @@ import { Component, OnInit } from '@angular/core';
}) })
export class StartPage implements OnInit { export class StartPage implements OnInit {
constructor() { } constructor(
public _TRIP: TripService
) {
this._TRIP.fetchData(true);
}
ngOnInit() { ngOnInit() {
console.log('ngOnInit Start page'); // console.log('ngOnInit Start page');
} }
} }
...@@ -213,11 +213,11 @@ export class LocationService { ...@@ -213,11 +213,11 @@ export class LocationService {
text: 'Vous êtes tout prêt de ce partenaire!', text: 'Vous êtes tout prêt de ce partenaire!',
led: 'FFFFFF', led: 'FFFFFF',
attachments: [partner.thumb], attachments: [partner.thumb],
vibrate: true, vibrate: true
actions: [ // actions: [
{ id: 'offres', partner: partner.id, title: 'Toutes les offres' }, // { id: 'offres', partner: partner.id, title: 'Toutes les offres' },
{ id: 'fiche', partner: partner.id, title: 'Fiche du partenaire' } // { id: 'fiche', partner: partner.id, title: 'Fiche du partenaire' }
] // ]
}); });
this.notificationsToSave.push({ this.notificationsToSave.push({
id: partner.id, id: partner.id,
......
...@@ -35,7 +35,6 @@ export class TripService { ...@@ -35,7 +35,6 @@ export class TripService {
this.setData(json); this.setData(json);
}); });
} else { } else {
console.log('hhh');
this.http.get('https://www.allo-testeurs.com/services.json?' + Math.random()) this.http.get('https://www.allo-testeurs.com/services.json?' + Math.random())
.subscribe((data) => { .subscribe((data) => {
this.storage.set('REST_services', data); this.storage.set('REST_services', data);
......
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