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
9910c111
Commit
9910c111
authored
Jun 28, 2023
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc change for production use
parent
c18fc4b6
Pipeline
#2811
failed with stage
in 1 minute 19 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
8 deletions
+26
-8
members.js
members/static/js/members.js
+2
-3
views.py
members/views.py
+10
-1
views.py
members_space/views.py
+8
-0
shift_choice.html
templates/members/shift_choice.html
+2
-0
shift_template_choice.html
templates/members/shift_template_choice.html
+2
-0
home.html
templates/members_space/home.html
+2
-1
index.html
templates/members_space/index.html
+0
-3
No files found.
members/static/js/members.js
View file @
9910c111
...
...
@@ -106,13 +106,12 @@ function fill_member_slide(member) {
html_elts
.
status_explanation
.
html
(
explanation
);
}
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
||
member
.
cooperative_state
==
'Parti(e)'
)
{
if
(
member
.
cooperative_state
==
'Désinscrit(e)'
||
member
.
cooperative_state
==
'Parti(e)'
||
member
.
cooperative_state
==
'Rattrapage'
||
member
.
cooperative_state
==
'Suspendu(e)'
)
{
coop_info
.
addClass
(
'b_red'
);
}
else
if
(
member
.
cooperative_state
==
'En alerte'
||
member
.
cooperative_state
==
'Délai accordé'
)
{
coop_info
.
addClass
(
'b_yellow'
)
}
else
if
(
member
.
cooperative_state
==
'Suspendu(e)'
)
{
coop_info
.
addClass
(
'b_orange'
);
}
if
(
member
.
shifts
.
length
>
0
)
{
...
...
members/views.py
View file @
9910c111
...
...
@@ -48,12 +48,15 @@ def index(request):
return
HttpResponse
(
"Le créneau des comités n'est pas configuré dans Odoo !"
)
else
:
context
[
'committees_shift_id'
]
=
committees_shift_id
if
getattr
(
settings
,
'USE_EXEMPTIONS_SHIFT_TEMPLATE'
,
False
)
is
True
:
exemptions_shift_id
=
CagetteServices
.
get_exemptions_shift_id
()
if
exemptions_shift_id
is
None
:
return
HttpResponse
(
"Le créneau des exemptions n'est pas configuré dans Odoo !"
)
else
:
context
[
'exemptions_shift_id'
]
=
exemptions_shift_id
else
:
context
[
'exemptions_shift_id'
]
=
0
if
'no_picture_member_advice'
in
msettings
:
if
len
(
msettings
[
'no_picture_member_advice'
][
'value'
])
>
0
:
...
...
@@ -94,7 +97,10 @@ def inscriptions(request, type=1):
template
=
loader
.
get_template
(
'members/inscriptions.html'
)
committees_shift_id
=
CagetteServices
.
get_committees_shift_id
()
if
getattr
(
settings
,
'USE_EXEMPTIONS_SHIFT_TEMPLATE'
,
False
)
is
True
:
exemptions_shift_id
=
CagetteServices
.
get_exemptions_shift_id
()
else
:
exemptions_shift_id
=
0
context
=
{
'type'
:
type
,
'title'
:
'Inscriptions'
,
'couchdb_server'
:
settings
.
COUCHDB
[
'url'
],
...
...
@@ -133,7 +139,10 @@ def prepa_odoo(request):
"""Generate coop subscription form, to be fill by BDM."""
template
=
loader
.
get_template
(
'members/prepa_odoo.html'
)
committees_shift_id
=
CagetteServices
.
get_committees_shift_id
()
if
getattr
(
settings
,
'USE_EXEMPTIONS_SHIFT_TEMPLATE'
,
False
)
is
True
:
exemptions_shift_id
=
CagetteServices
.
get_exemptions_shift_id
()
else
:
exemptions_shift_id
=
0
context
=
{
'title'
:
'Préparation Odoo Inscriptions'
,
'warning_placeholder'
:
'Par exemple, il manque un chèque'
,
...
...
members_space/views.py
View file @
9910c111
...
...
@@ -162,6 +162,14 @@ def index(request, exception=None):
context
[
'helper_unsubscribe_form_link'
]
=
msettings
[
'helper_unsubscribe_form_link'
][
'value'
]
if
'helper_unsubscribe_form_link'
in
msettings
else
''
context
[
'covid_form_link'
]
=
msettings
[
'covid_form_link'
][
'value'
]
if
'covid_form_link'
in
msettings
else
''
context
[
'covid_end_form_link'
]
=
msettings
[
'covid_end_form_link'
][
'value'
]
if
'covid_end_form_link'
in
msettings
else
''
if
getattr
(
settings
,
'USE_EXEMPTIONS_SHIFT_TEMPLATE'
,
False
)
is
True
:
exemptions_shift_id
=
CagetteServices
.
get_exemptions_shift_id
()
if
exemptions_shift_id
is
None
:
return
HttpResponse
(
"Le créneau des exemptions n'est pas configuré dans Odoo !"
)
else
:
context
[
'exemptions_shift_id'
]
=
exemptions_shift_id
else
:
context
[
'exemptions_shift_id'
]
=
0
else
:
# may arrive when switching database without cleaning cookie
return
redirect
(
'/website/deconnect'
)
...
...
templates/members/shift_choice.html
View file @
9910c111
...
...
@@ -7,9 +7,11 @@
ou ...
<br
/>
<button
class=
"flex-container--column"
data-select=
"Volant"
>
Volant
</button>
{% if exemptions_shift_id != 0 %}
ou ...
<br
/>
<button
class=
"flex-container--column"
data-select=
"Exemption"
>
Exempté
</button>
{% endif %}
<div
class=
"info"
></div>
</div>
<div
class=
"col-5 main_content"
>
...
...
templates/members/shift_template_choice.html
View file @
9910c111
...
...
@@ -9,9 +9,11 @@
<br
/>
<button
class=
"flex-container--column"
data-select=
"Volant"
>
Volant
</button>
{% endif %}
{% if exemptions_shift_id != 0 %}
ou ...
<br
/>
<button
class=
"flex-container--column"
data-select=
"Exemption"
>
Exempté
</button>
{% endif %}
<div
class=
"info"
></div>
</div>
<div
class=
"col-5 main_content"
>
...
...
templates/members_space/home.html
View file @
9910c111
...
...
@@ -132,7 +132,8 @@
</div>
<script>
var
max_begin_hour
=
"{{max_begin_hour}}"
,
type
=
2
;
type
=
2
,
exemptions_shift_id
=
'{{exemptions_shift_id}}'
;
</script>
{% endif %}
</div>
templates/members_space/index.html
View file @
9910c111
...
...
@@ -108,9 +108,6 @@
<p
data-type=
"next_ftop_shift"
>
Le système informatique viendra prélever un service sur votre compteur le
<span
data-type=
"next_ftop_shift_date"
></span>
.
</p>
<p>
Veillez à faire au moins 1 service d'ici là !
</p>
</div>
</div>
</div>
...
...
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