Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allo-app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nabil Sadki
allo-app
Commits
595c9876
Commit
595c9876
authored
Oct 11, 2019
by
Nabil Sadki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quests
parent
8a6d2099
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
11 deletions
+129
-11
app.component.ts
src/app/app.component.ts
+1
-0
app.scss
src/app/app.scss
+37
-5
offres-carte-filters.page.html
...odals/offres-carte-filters/offres-carte-filters.page.html
+2
-1
dashboard.page.html
src/app/pages/offres/dashboard/dashboard.page.html
+2
-2
dashboard.page.ts
src/app/pages/offres/dashboard/dashboard.page.ts
+3
-1
offres-tlm.page.html
src/app/pages/offres/offres-tlm/offres-tlm.page.html
+49
-0
quests.service.ts
src/app/services/quests.service.ts
+25
-2
trip-service.ts
src/app/services/trip-service.ts
+10
-0
No files found.
src/app/app.component.ts
View file @
595c9876
...
@@ -114,6 +114,7 @@ export class AppComponent {
...
@@ -114,6 +114,7 @@ export class AppComponent {
PARAM_notifnbr
:
'all'
,
PARAM_notifnbr
:
'all'
,
NOTIF_shownpartners
:
[],
NOTIF_shownpartners
:
[],
});
});
this
.
storage
.
set
(
'APP_QUESTS'
,
{});
}
}
});
});
this
.
storage
.
get
(
'WISHLIST'
).
then
((
val
)
=>
{
this
.
storage
.
get
(
'WISHLIST'
).
then
((
val
)
=>
{
...
...
src/app/app.scss
View file @
595c9876
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
}
}
}
}
h2
{
h2
{
white-space
:
initial
!
important
;
white-space
:
initial
!
important
;
}
}
}
}
.leaflet-popup-close-button
{
.leaflet-popup-close-button
{
...
@@ -37,7 +37,7 @@ div.start {
...
@@ -37,7 +37,7 @@ div.start {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
transition
:
.5s
;
transition
:
0
.5s
;
ion-img
{
ion-img
{
width
:
20vw
;
width
:
20vw
;
}
}
...
@@ -45,9 +45,11 @@ div.start {
...
@@ -45,9 +45,11 @@ div.start {
transform
:
scale
(
3
);
transform
:
scale
(
3
);
}
}
}
}
ion-alert
{
ion-alert
{
--width
:
90vw
!
important
;
--width
:
90vw
!
important
;
--max-width
:
90vw
!
important
;
--max-width
:
90vw
!
important
;
transition
:
1s
box-shadow
;
box-shadow
:
0
5px
35px
0px
rgba
(
0
,
0
,
0
,
0
.1
);
}
}
div
.hide
{
div
.hide
{
display
:
none
!
important
;
display
:
none
!
important
;
...
@@ -69,4 +71,35 @@ ion-modal .modal-wrapper {
...
@@ -69,4 +71,35 @@ ion-modal .modal-wrapper {
width
:
90vw
!
important
;
width
:
90vw
!
important
;
max-height
:
90vh
!
important
;
max-height
:
90vh
!
important
;
border-radius
:
10px
!
important
;
border-radius
:
10px
!
important
;
}
}
\ No newline at end of file
ion-alert
.alert-wrapper
{
box-shadow
:
0
0
0
rgba
(
249
,
49
,
41
,
0
.8
);
animation
:
pulse
2s
infinite
;
}
@-webkit-keyframes
pulse
{
0
%
{
-webkit-box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
.8
);
}
70
%
{
-webkit-box-shadow
:
0
0
0
30px
rgba
(
249
,
49
,
41
,
0
);
}
100
%
{
-webkit-box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
);
}
}
@keyframes
pulse
{
0
%
{
-moz-box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
.8
);
box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
.8
);
}
70
%
{
-moz-box-shadow
:
0
0
0
30px
rgba
(
249
,
49
,
41
,
0
);
box-shadow
:
0
0
0
30px
rgba
(
249
,
49
,
41
,
0
);
}
100
%
{
-moz-box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
);
box-shadow
:
0
0
0
0
rgba
(
249
,
49
,
41
,
0
);
}
}
src/app/modals/offres-carte-filters/offres-carte-filters.page.html
View file @
595c9876
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</ion-content>
</ion-content>
<ion-footer>
<ion-footer>
<ion-toolbar>
<ion-toolbar>
<ion-button
slot=
"end"
color=
"dark"
size=
"small"
(
click
)="
_TRIP
.
re
setData
();
modalController
.
dismiss
();"
>
<ion-button
slot=
"end"
color=
"dark"
size=
"small"
(
click
)="
_TRIP
.
re
initialiserFiltres
();
modalController
.
dismiss
();"
>
Réinitialiser
</ion-button>
Réinitialiser
</ion-button>
</ion-toolbar>
</ion-toolbar>
</ion-footer>
</ion-footer>
\ No newline at end of file
src/app/pages/offres/dashboard/dashboard.page.html
View file @
595c9876
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
</ion-grid> -->
</ion-grid> -->
<ion-chip
slot=
"end"
>
<ion-chip
slot=
"end"
>
<ion-icon
name=
"trending-up"
color=
"blue"
></ion-icon>
<ion-icon
name=
"trending-up"
color=
"blue"
></ion-icon>
<ion-label
color=
"dark"
class=
"ion-padding-end"
>
10 542
</ion-label>
<ion-label
color=
"dark"
class=
"ion-padding-end"
>
{{ _QST.pointsExp }}
</ion-label>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label
color=
"dark"
>
10 542
</ion-label>
<ion-label
color=
"dark"
>
{{ _QST.pointsMerites }}
</ion-label>
</ion-chip>
</ion-chip>
<!-- <ion-buttons slot="end">
<!-- <ion-buttons slot="end">
<ion-button (click)="showHideMoreFilters()">
<ion-button (click)="showHideMoreFilters()">
...
...
src/app/pages/offres/dashboard/dashboard.page.ts
View file @
595c9876
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
TripService
}
from
'../../../services/trip-service'
;
import
{
TripService
}
from
'../../../services/trip-service'
;
import
{
QuestsService
}
from
"../../../services/quests.service"
;
@
Component
({
@
Component
({
selector
:
'app-dashboard'
,
selector
:
'app-dashboard'
,
...
@@ -14,7 +15,8 @@ export class DashboardPage implements OnInit {
...
@@ -14,7 +15,8 @@ export class DashboardPage implements OnInit {
public
show_more_filters
=
false
;
public
show_more_filters
=
false
;
constructor
(
constructor
(
public
_TRIP
:
TripService
public
_TRIP
:
TripService
,
public
_QST
:
QuestsService
)
{
)
{
}
}
...
...
src/app/pages/offres/offres-tlm/offres-tlm.page.html
View file @
595c9876
...
@@ -67,6 +67,55 @@
...
@@ -67,6 +67,55 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<ion-list-header>
Nouvelles offres
</ion-list-header>
<div
class=
"app"
*
ngIf=
"_TRIP.products.length > 0"
>
<ul
class=
"hs"
>
<li
class=
"item"
*
ngFor=
"let trip of _TRIP.products"
>
<div
class=
"badges ion-text-right"
>
<div
class=
"bookmark"
*
ngIf=
"!_AUTH.isAnonymous"
>
<ion-button
color=
"light"
fill=
"solid"
class=
"bookmark"
(
click
)="
_TRIP
.
wishList
(
trip
,
'
add
')"
*
ngIf=
"!trip.bookmarked"
no-padding
>
<ion-icon
name=
"heart-empty"
></ion-icon>
</ion-button>
<ion-button
color=
"light"
fill=
"solid"
class=
"bookmark"
(
click
)="
_TRIP
.
wishList
(
trip
,
'
remove
')"
*
ngIf=
"trip.bookmarked"
no-padding
>
<ion-icon
name=
"heart"
color=
"danger"
></ion-icon>
</ion-button>
</div>
<ion-badge
color=
"blue"
>
<ion-icon
name=
"trending-up"
></ion-icon>
400
</ion-badge>
<ion-badge
color=
"secondary"
margin-left
>
<ion-text
color=
"light"
>
<ion-icon
name=
"ribbon"
></ion-icon>
200
</ion-text>
</ion-badge>
</div>
<div
(
click
)="
viewDetail
(
trip
.
id
)"
[
ngStyle
]="{'
background-image
'
:
'
url
('
+
trip
.
thumb
+
')',
'
background-repeat
'
:
'
no-repeat
',
'
background-size
'
:
'
cover
',
'
width
'
:
'
100
%',
'
height
'
:
'
100
%',
'
border-radius
'
:
'
8px
'}"
>
<div
class=
"mask"
>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
>
{{trip.name}}
</ion-col>
</ion-row>
<ion-row>
<ion-col
no-padding
>
<ion-badge
color=
"light"
>
<ion-text
color=
"primary"
>
<ion-label>
<ion-icon
name=
"pin"
></ion-icon>
{{ trip.location }}
</ion-label>
</ion-text>
</ion-badge>
</ion-col>
</ion-row>
</ion-grid>
</div>
</div>
<!-- <ion-img src="../../../../assets/img/avatar.jpeg"></ion-img> -->
</li>
</ul>
</div>
<div
padding
>
<div
padding
>
<div
*
ngIf=
"_TRIP.filtredProducts.length <= 0"
>
<div
*
ngIf=
"_TRIP.filtredProducts.length <= 0"
>
<ion-card
class=
"skeleton"
tappable
no-margin
margin-bottom
>
<ion-card
class=
"skeleton"
tappable
no-margin
margin-bottom
>
...
...
src/app/services/quests.service.ts
View file @
595c9876
import
{
AlertController
}
from
'@ionic/angular'
;
import
{
AlertController
}
from
'@ionic/angular'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Injectable
}
from
'@angular/core'
;
import
{
Storage
}
from
'@ionic/storage'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'root'
providedIn
:
'root'
})
})
export
class
QuestsService
{
export
class
QuestsService
{
public
pointsMerites
=
0
;
public
pointsExp
=
0
;
constructor
(
constructor
(
private
alertCtrl
:
AlertController
private
alertCtrl
:
AlertController
,
)
{
}
private
storage
:
Storage
)
{
// setTimeout(() => {
// this.presentAlert('Congrats!', 'You are now ranked as a legendary tester!');
// }, 4000);
this
.
_questFirstConnection
();
}
async
presentAlert
(
title
,
message
)
{
async
presentAlert
(
title
,
message
)
{
const
alert
=
await
this
.
alertCtrl
.
create
({
const
alert
=
await
this
.
alertCtrl
.
create
({
...
@@ -24,4 +34,17 @@ export class QuestsService {
...
@@ -24,4 +34,17 @@ export class QuestsService {
showMsg
()
{
showMsg
()
{
setInterval
(()
=>
{
console
.
log
(
'Still here!'
);
},
2000
);
setInterval
(()
=>
{
console
.
log
(
'Still here!'
);
},
2000
);
}
}
_questFirstConnection
()
{
this
.
pointsExp
=
this
.
pointsExp
+
200
;
this
.
storage
.
get
(
'APP_QUESTS'
).
then
((
appQuests
)
=>
{
console
.
log
(
appQuests
);
if
(
null
===
appQuests
)
{
appQuests
=
{
firstConnection
:
true
};
this
.
storage
.
set
(
'APP_QUESTS'
,
appQuests
).
then
(()
=>
{
this
.
presentAlert
(
'Première connection'
,
'+200 points d
\'
experience pour votre première connection'
);
});
}
});
}
}
}
src/app/services/trip-service.ts
View file @
595c9876
...
@@ -160,6 +160,16 @@ export class TripService {
...
@@ -160,6 +160,16 @@ export class TripService {
this
.
offersCardList
=
this
.
filtredProducts
.
slice
(
0
,
2
);
this
.
offersCardList
=
this
.
filtredProducts
.
slice
(
0
,
2
);
}
}
reinitialiserFiltres
()
{
this
.
filters
=
{
cat
:
'all'
,
type
:
'all'
,
brand
:
'all'
};
this
.
filterOffers
();
}
filterList
(
categoryId
)
{
filterList
(
categoryId
)
{
const
category
=
this
.
getItemById
(
'cats'
,
categoryId
);
const
category
=
this
.
getItemById
(
'cats'
,
categoryId
);
this
.
ga
.
trackEvent
(
'Filtres'
,
'Tapped button'
,
'Catégorie : ['
+
categoryId
+
'] '
+
category
.
label
);
this
.
ga
.
trackEvent
(
'Filtres'
,
'Tapped button'
,
'Catégorie : ['
+
categoryId
+
'] '
+
category
.
label
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment