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
28a03469
Commit
28a03469
authored
Nov 05, 2019
by
Nabil Sadki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quests
parent
d220fc1c
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
157 additions
and
174 deletions
+157
-174
constants.ts
src/app/constants.ts
+2
-2
menu.page.html
src/app/pages/menu/menu.page.html
+1
-1
menu.page.ts
src/app/pages/menu/menu.page.ts
+3
-1
dashboard.page.ts
src/app/pages/offres/dashboard/dashboard.page.ts
+1
-1
hauts-faits.page.html
src/app/pages/progres/hauts-faits/hauts-faits.page.html
+1
-1
hauts-faits.page.ts
src/app/pages/progres/hauts-faits/hauts-faits.page.ts
+4
-1
progress-exp.page.html
src/app/pages/progres/progress-exp/progress-exp.page.html
+1
-1
progress-merites.page.html
...pages/progres/progress-merites/progress-merites.page.html
+17
-163
progress-merites.page.ts
...p/pages/progres/progress-merites/progress-merites.page.ts
+4
-1
merites.service.spec.ts
src/app/services/data/merites.service.spec.ts
+12
-0
merites.service.ts
src/app/services/data/merites.service.ts
+110
-0
quests.service.ts
src/app/services/quests.service.ts
+1
-2
No files found.
src/app/constants.ts
View file @
28a03469
export
const
WORDPRESS_URL
=
'http://allo-testeurs.test/'
;
//
export const WORDPRESS_URL = 'http://allo-testeurs.test/';
//
export const WORDPRESS_URL = 'http://www.allo-testeurs.com/';
export
const
WORDPRESS_URL
=
'http://www.allo-testeurs.com/'
;
export
const
WORDPRESS_REST_API_URL
=
WORDPRESS_URL
+
'wp-json/wp/v2/'
;
export
const
WORDPRESS_REST_API_URL
=
WORDPRESS_URL
+
'wp-json/wp/v2/'
;
export
const
GA_TRACKID
=
'UA-129706772-2'
;
export
const
GA_TRACKID
=
'UA-129706772-2'
;
export
const
WORDPRESS_REST_API_ACF_USER_URL
=
WORDPRESS_URL
+
'wp-json/acf/v3/users/'
;
export
const
WORDPRESS_REST_API_ACF_USER_URL
=
WORDPRESS_URL
+
'wp-json/acf/v3/users/'
;
src/app/pages/menu/menu.page.html
View file @
28a03469
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<ion-chip
routerLink=
"/app/hauts-faits"
routerDirection=
"root"
<ion-chip
routerLink=
"/app/hauts-faits"
routerDirection=
"root"
routerLinkActive=
"active"
>
routerLinkActive=
"active"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label
color=
"light"
>
10 542
</ion-label>
<ion-label
color=
"light"
>
{{ _QST.pointsMerites }}
</ion-label>
</ion-chip>
</ion-chip>
</ion-menu-toggle>
</ion-menu-toggle>
</ion-col>
</ion-col>
...
...
src/app/pages/menu/menu.page.ts
View file @
28a03469
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
'@angular/router'
;
import
{
Router
}
from
'@angular/router'
;
import
{
AuthService
}
from
'../../services/auth.service'
;
import
{
AuthService
}
from
'../../services/auth.service'
;
import
{
QuestsService
}
from
'../../services/quests.service'
;
@
Component
({
@
Component
({
selector
:
'app-menu'
,
selector
:
'app-menu'
,
...
@@ -61,7 +62,8 @@ export class MenuPage implements OnInit {
...
@@ -61,7 +62,8 @@ export class MenuPage implements OnInit {
constructor
(
constructor
(
public
router
:
Router
,
public
router
:
Router
,
public
_AUTH
:
AuthService
public
_AUTH
:
AuthService
,
public
_QST
:
QuestsService
)
{
}
)
{
}
logout
()
{
logout
()
{
...
...
src/app/pages/offres/dashboard/dashboard.page.ts
View file @
28a03469
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"
;
import
{
QuestsService
}
from
'../../../services/quests.service'
;
@
Component
({
@
Component
({
selector
:
'app-dashboard'
,
selector
:
'app-dashboard'
,
...
...
src/app/pages/progres/hauts-faits/hauts-faits.page.html
View file @
28a03469
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</ion-chip>
</ion-chip>
<ion-chip
slot=
"end"
>
<ion-chip
slot=
"end"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label
color=
"light"
>
60
</ion-label>
<ion-label
color=
"light"
>
{{ _QST.pointsMerites }}
</ion-label>
</ion-chip>
</ion-chip>
</ion-toolbar>
</ion-toolbar>
</ion-header>
</ion-header>
...
...
src/app/pages/progres/hauts-faits/hauts-faits.page.ts
View file @
28a03469
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
QuestsService
}
from
'../../../services/quests.service'
;
@
Component
({
@
Component
({
selector
:
'app-hauts-faits'
,
selector
:
'app-hauts-faits'
,
...
@@ -7,7 +8,9 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,7 +8,9 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
HautsFaitsPage
implements
OnInit
{
export
class
HautsFaitsPage
implements
OnInit
{
constructor
()
{
}
constructor
(
public
_QST
:
QuestsService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
}
}
...
...
src/app/pages/progres/progress-exp/progress-exp.page.html
View file @
28a03469
<ion-content>
<ion-content>
<ion-text
class=
"ion-text-center"
>
<ion-text
class=
"ion-text-center"
>
<h1>
Progr
ès
</h1>
<h1>
Succ
ès
</h1>
</ion-text>
</ion-text>
<ion-grid>
<ion-grid>
<ion-row>
<ion-row>
...
...
src/app/pages/progres/progress-merites/progress-merites.page.html
View file @
28a03469
<ion-content>
<ion-content>
<ion-text
class=
"ion-text-center"
>
<ion-text
class=
"ion-text-center"
>
<h1>
Progr
ès
</h1>
<h1>
Succ
ès
</h1>
</ion-text>
</ion-text>
<ion-grid>
<ion-grid>
<ion-row>
<ion-row>
...
@@ -11,183 +11,36 @@
...
@@ -11,183 +11,36 @@
<ion-col
size=
"2"
></ion-col>
<ion-col
size=
"2"
></ion-col>
</ion-row>
</ion-row>
</ion-grid>
</ion-grid>
<
!-- <ion-card no-margin margin-horizontal margin-bottom padding-bottom> --
>
<
ion-card
no-margin
margin-horizontal
margin-bottom
*
ngFor=
"let category of meritesSVC.merites"
>
<ion-list>
<ion-list>
<ion-list-header
color=
"light"
>
Connexion
</ion-list-header>
<ion-list-header
color=
"light"
>
<ion-item
lines=
"none"
margin-top
>
{{ category.category_name }}
<ion-icon
class=
"ach-icon"
name=
"checkmark-circle-outline"
color=
"success"
slot=
"start"
></ion-icon>
<ion-badge
color=
"warning"
>
Bientôt!
</ion-badge>
</ion-list-header>
<ion-item
lines=
"none"
class=
"ion-margin-top"
*
ngFor=
"let item of category.items"
>
<ion-icon
class=
"ach-icon"
[
name
]="
item
.
done
?
'
checkmark-circle-outline
'
:
item
.
icon_name
"
[
color
]="
item
.
done
?
'
success
'
:
'
medium
'"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<ion-label
no-margin
>
<h2>
Marhba!
</h2>
<h2>
{{ item.title }}
</h2>
<p>
Se connecter une seul fois à l'application.
</p>
<p>
{{ item.description }}
</p>
<ion-grid
no-padding
>
<ion-grid
no-padding
>
<ion-row>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
20
</ion-label>
<ion-label>
{{ item.merites }}
</ion-label>
</ion-chip>
</ion-chip>
</ion-col>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
1/1
{{ item.progress_text }}
<ion-progress-bar
color=
"success"
value=
"1"
>
1/1
</ion-progress-bar>
<ion-progress-bar
[
color
]="
item
.
done
?
'
success
'
:
'
warning
'"
[
value
]="
item
.
progress
"
>
</ion-col>
</ion-progress-bar>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-top
>
<ion-icon
class=
"ach-icon"
name=
"power"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
On s'habitue
</h2>
<p>
Se connecter 7 fois successives à l'application.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
50
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
1/7
<ion-progress-bar
color=
"primary"
value=
"0.143"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-vertical
>
<ion-icon
class=
"ach-icon"
name=
"power"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
Toujours en ligne!
</h2>
<p>
Se connecter 30 fois successives à l'application.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
200
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
1/30
<ion-progress-bar
color=
"primary"
value=
"0.033"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
</ion-list>
<!-- </ion-card> -->
<!-- <ion-card no-margin margin-horizontal margin-bottom padding-bottom> -->
<ion-list>
<ion-list-header
color=
"light"
>
Parrainage
</ion-list-header>
<ion-item
lines=
"none"
margin-top
>
<ion-icon
class=
"ach-icon"
name=
"checkmark-circle-outline"
color=
"success"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
Viens, je te montre un truc
</h2>
<p>
Parrainer un(e) ami(e).
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
40
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
1/1
<ion-progress-bar
color=
"success"
value=
"1"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-top
>
<ion-icon
class=
"ach-icon"
name=
"contacts"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
C'est super à 5!
</h2>
<p>
Parrainer 5 ami(e)s.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
200
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
4/5
<ion-progress-bar
color=
"primary"
value=
"0.8"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-vertical
>
<ion-icon
class=
"ach-icon"
name=
"contacts"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
A 10, c'est encore mieux!!
</h2>
<p>
Parrainer 10 ami(e)s.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
500
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
4/10
<ion-progress-bar
color=
"primary"
value=
"0.4"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-vertical
>
<ion-icon
class=
"ach-icon"
name=
"contacts"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
Father
</h2>
<p>
Parrainer 30 ami(e)s.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
1700
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
4/30
<ion-progress-bar
color=
"primary"
value=
"0.133"
></ion-progress-bar>
</ion-col>
</ion-row>
</ion-grid>
</ion-label>
</ion-item>
<ion-item
lines=
"none"
margin-vertical
>
<ion-icon
class=
"ach-icon"
name=
"contacts"
slot=
"start"
></ion-icon>
<ion-label
no-margin
>
<h2>
Godfather
</h2>
<p>
Parrainer 50 ami(e)s.
</p>
<ion-grid
no-padding
>
<ion-row>
<ion-col
no-padding
class=
"ion-text-start"
size=
"5"
>
<ion-chip
outline=
"true"
>
<ion-icon
name=
"ribbon"
color=
"secondary"
></ion-icon>
<ion-label>
3000
</ion-label>
</ion-chip>
</ion-col>
<ion-col
no-padding
class=
"ion-text-end"
size=
"7"
>
4/50
<ion-progress-bar
color=
"primary"
value=
"0.08"
></ion-progress-bar>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
</ion-grid>
</ion-grid>
</ion-label>
</ion-label>
</ion-item>
</ion-item>
</ion-list>
</ion-list>
<
!-- </ion-card> --
>
<
/ion-card
>
</ion-content>
</ion-content>
\ No newline at end of file
src/app/pages/progres/progress-merites/progress-merites.page.ts
View file @
28a03469
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
MeritesService
}
from
'../../../services/data/merites.service'
;
@
Component
({
@
Component
({
selector
:
'app-progress-merites'
,
selector
:
'app-progress-merites'
,
...
@@ -7,7 +8,9 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,7 +8,9 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
ProgressMeritesPage
implements
OnInit
{
export
class
ProgressMeritesPage
implements
OnInit
{
constructor
()
{
}
constructor
(
public
meritesSVC
:
MeritesService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
}
}
...
...
src/app/services/data/merites.service.spec.ts
0 → 100644
View file @
28a03469
import
{
TestBed
}
from
'@angular/core/testing'
;
import
{
MeritesService
}
from
'./merites.service'
;
describe
(
'MeritesService'
,
()
=>
{
beforeEach
(()
=>
TestBed
.
configureTestingModule
({}));
it
(
'should be created'
,
()
=>
{
const
service
:
MeritesService
=
TestBed
.
get
(
MeritesService
);
expect
(
service
).
toBeTruthy
();
});
});
src/app/services/data/merites.service.ts
0 → 100644
View file @
28a03469
import
{
Injectable
}
from
'@angular/core'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
MeritesService
{
public
merites
:
Array
<
any
>
;
constructor
()
{
this
.
merites
=
this
.
getMerites
();
}
getMerites
()
{
return
[
{
category_id
:
1
,
category_name
:
'Connexion'
,
items
:
[
{
type
:
'merite'
,
icon_name
:
'power'
,
title
:
'Marhba!'
,
description
:
'Se connecter une seul fois à l
\'
application.'
,
merites
:
20
,
progress
:
1
,
progress_text
:
'1/1'
,
done
:
true
},
{
type
:
'merite'
,
icon_name
:
'power'
,
title
:
'On s
\'
habitue'
,
description
:
'Se connecter 7 jours successifs à l
\'
application.'
,
merites
:
50
,
progress
:
0.143
,
progress_text
:
'1/7'
,
done
:
false
},
{
type
:
'merite'
,
icon_name
:
'power'
,
title
:
'Toujours en ligne!'
,
description
:
'Se connecter 30 fois successives à l
\'
application.'
,
merites
:
200
,
progress
:
0.033
,
progress_text
:
'1/30'
,
done
:
false
},
]
},
{
category_id
:
2
,
category_name
:
'Parrainage'
,
items
:
[
{
type
:
'merite'
,
icon_name
:
'contacts'
,
title
:
'Viens, je te montre un truc'
,
description
:
'Parrainer un(e) ami(e).'
,
merites
:
40
,
progress
:
0
,
progress_text
:
'0/1'
,
done
:
false
},
{
type
:
'merite'
,
icon_name
:
'contacts'
,
title
:
'C
\'
est super à 5!'
,
description
:
'Parrainer 5 ami(e)s.'
,
merites
:
200
,
progress
:
0
,
progress_text
:
'0/5'
,
done
:
false
},
{
type
:
'merite'
,
icon_name
:
'contacts'
,
title
:
'A 10, c
\'
est encore mieux!!'
,
description
:
'Parrainer 10 ami(e)s.'
,
merites
:
500
,
progress
:
0
,
progress_text
:
'0/10'
,
done
:
false
},
{
type
:
'merite'
,
icon_name
:
'contacts'
,
title
:
'Father'
,
description
:
'Parrainer 30 ami(e)s.'
,
merites
:
1700
,
progress
:
0
,
progress_text
:
'0/30'
,
done
:
false
},
{
type
:
'merite'
,
icon_name
:
'contacts'
,
title
:
'GodFather'
,
description
:
'Parrainer 50 ami(e)s.'
,
merites
:
3000
,
progress
:
0
,
progress_text
:
'0/50'
,
done
:
false
},
]
},
];
}
}
src/app/services/quests.service.ts
View file @
28a03469
...
@@ -38,8 +38,7 @@ export class QuestsService {
...
@@ -38,8 +38,7 @@ export class QuestsService {
_questFirstConnection
()
{
_questFirstConnection
()
{
this
.
pointsExp
=
this
.
pointsExp
+
200
;
this
.
pointsExp
=
this
.
pointsExp
+
200
;
this
.
storage
.
get
(
'APP_QUESTS'
).
then
((
appQuests
)
=>
{
this
.
storage
.
get
(
'APP_QUESTS'
).
then
((
appQuests
)
=>
{
console
.
log
(
appQuests
);
if
(
null
===
appQuests
||
'undefined'
===
typeof
appQuests
.
firstConnection
)
{
if
(
null
===
appQuests
)
{
appQuests
=
{
firstConnection
:
true
};
appQuests
=
{
firstConnection
:
true
};
this
.
storage
.
set
(
'APP_QUESTS'
,
appQuests
).
then
(()
=>
{
this
.
storage
.
set
(
'APP_QUESTS'
,
appQuests
).
then
(()
=>
{
this
.
presentAlert
(
'Première connection'
,
'+200 points d
\'
experience pour votre première connection'
);
this
.
presentAlert
(
'Première connection'
,
'+200 points d
\'
experience pour votre première connection'
);
...
...
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