Commit 9910c111 by François C.

Misc change for production use

parent c18fc4b6
Pipeline #2811 failed with stage
in 1 minute 19 seconds
......@@ -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) {
......
......@@ -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',
......
......@@ -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')
......
......@@ -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">
......
......@@ -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">
......
......@@ -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>
......@@ -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>
......
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