Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
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
2
Merge Requests
2
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
cooperatic-foodcoops
third-party
Commits
edafd2a3
Commit
edafd2a3
authored
Sep 29, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block extension if member can't have it
parent
24013b6b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
members-space-home.js
members_space/static/js/members-space-home.js
+1
-1
members-space.js
members_space/static/js/members-space.js
+5
-1
views.py
shifts/views.py
+6
-7
No files found.
members_space/static/js/members-space-home.js
View file @
edafd2a3
...
...
@@ -44,7 +44,7 @@ function request_delay() {
&&
data
.
responseJSON
.
message
===
"delays limit reached"
)
{
closeModal
();
alert
(
"Vous avez mis plus de 6 mois pour rattraper un service, "
+
"vous ne pouvez plus
sélectionner de rattrapag
e depuis l'espace membre. "
+
"vous ne pouvez plus
rien fair
e depuis l'espace membre. "
+
"Merci de contacter le BDM."
);
}
else
{
err
=
{
msg
:
"erreur serveur lors de la création du délai"
,
ctx
:
'request_delay'
};
...
...
members_space/static/js/members-space.js
View file @
edafd2a3
...
...
@@ -165,7 +165,11 @@ function init_my_info_data() {
});
}
if
(
partner_data
.
makeups_to_do
>
0
&&
partner_data
.
is_associated_people
===
"False"
)
{
if
(
partner_data
.
makeups_to_do
>
0
&&
partner_data
.
is_associated_people
===
"False"
&&
partner_data
.
cooperative_state
!==
'unsubscribed'
)
{
$
(
".choose_makeups"
).
show
();
if
(
...
...
shifts/views.py
View file @
edafd2a3
...
...
@@ -267,13 +267,12 @@ def request_delay(request):
if
Verification
.
verif_token
(
request
.
POST
.
get
(
'verif_token'
),
int
(
request
.
POST
.
get
(
'idPartner'
)))
is
True
:
cs
=
CagetteShift
()
# TODO do we need this?
# use_new_members_space = getattr(settings, 'USE_NEW_MEMBERS_SPACE', False)
# if use_new_members_space is True:
# member_can_have_delay = cs.member_can_have_delay(int(request.POST.get('idPartner')))
# if member_can_have_delay is False:
# res = { 'message' : 'delays limit reached'}
# return JsonResponse(res, status=403)
use_new_members_space
=
getattr
(
settings
,
'USE_NEW_MEMBERS_SPACE'
,
False
)
if
use_new_members_space
is
True
:
member_can_have_delay
=
cs
.
member_can_have_delay
(
int
(
request
.
POST
.
get
(
'idPartner'
)))
if
member_can_have_delay
is
False
:
res
=
{
'message'
:
'delays limit reached'
}
return
JsonResponse
(
res
,
status
=
403
)
data
=
{
"idPartner"
:
int
(
request
.
POST
[
'idPartner'
]),
...
...
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