Commit 9305e1ab by Damien Moulard

Merge branch 'ticket_1680' into 'evolution_bdm'

Ticket 1680 & 1695 - retirer clemenceau au calendrier et ajuster le calendrier à la bonne taille de service

See merge request !60
parents 6013862c 10420b89
Pipeline #1478 passed with stage
in 1 minute 28 seconds
......@@ -18,3 +18,4 @@ shop/shop_admin_settings.json
shop/errors.log
.idea
members/settings.json
.DS_Store
\ No newline at end of file
......@@ -119,14 +119,20 @@ def get_list_shift_calendar(request, partner_id):
event["id"] = value['id']
smax = int(value['seats_available']) + int(value['seats_reserved'])
company_code = getattr(settings, 'COMPANY_CODE', '')
title_prefix = ''
if len(value['address_id']) == 2 and ',' in value['address_id'][1]:
title_prefix = str(value['address_id'][1]).split(",")[1] + " -- "
if company_code != "lacagette" and len(value['address_id']) == 2 and ',' in value['address_id'][1]:
title_prefix = str(value['address_id'][1]).split(",")[1] + " --"
elif company_code == "lacagette":
title_prefix = " -- "
event["title"] = title_prefix + str(value['seats_reserved']) + "/" + str(smax)
event["start"] = dateIsoUTC(value['date_begin_tz'])
event["end"] = dateIsoUTC(value['date_begin_tz'])
datetime_object = datetime.datetime.strptime(value['date_end_tz'], "%Y-%m-%d %H:%M:%S") - datetime.timedelta(minutes=15)
event["end"] = dateIsoUTC(datetime_object.strftime("%Y-%m-%d %H:%M:%S"))
if len(l) > 0:
if use_new_members_space is True:
......
......@@ -57,9 +57,9 @@
<div id="calendar_explaination_template">
<h4>Légende du calendrier</h4>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_booked"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">06:00</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky"> Clemenceau -- 9/12</div></div></div></div></a>
<p>Un service colorié en noir : je suis déjà inscrit à ce service.</p>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_less_alf"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">10:45</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky"> Clemenceau -- 3/12</div></div></div></div></a>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_booked"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">06:00</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky">&nbsp;-- 9/12</div></div></div></div></a>
<p>Un service colorié en noir : je suis déjà inscrit.e à ce service.</p>
<a class="example-event fc-daygrid-event fc-daygrid-block-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future shift_less_alf"><div class="fc-event-main"><div class="fc-event-main-frame"><div class="fc-event-time">10:45</div><div class="fc-event-title-container"><div class="fc-event-title fc-sticky">&nbsp;-- 3/12</div></div></div></div></a>
<p>Un service colorié en bleu : je peux m'inscrire à ce service.</p>
<p>3/12 <i class="arrow_explanation_numbers fas fa-arrow-right"></i> il y a déjà 3 places réservées à ce service sur 12 disponibles.
<b>Plus le chiffre de gauche est petit, plus on a besoin de coopérateurs.rices à ce service !</b></p>
......
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