Commit 6fdd55b7 by Damien Moulard

display Rattrapage instead of Suspendu

parent 4983a101
Pipeline #1436 failed with stage
in 1 minute 36 seconds
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
MAG_NAME = 'Cleme' MAG_NAME = 'Cleme'
OFFICE_NAME = '' OFFICE_NAME = ''
MAX_BEGIN_HOUR = '19:00' MAX_BEGIN_HOUR = '19:00'
COMPANY_CODE = 'lacagette'
COMPANY_NAME = 'La Cagette' COMPANY_NAME = 'La Cagette'
WELCOME_ENTRANCE_MSG = 'Bienvenue à La Cagette !' WELCOME_ENTRANCE_MSG = 'Bienvenue à La Cagette !'
WELCOME_MAIL_SUBJECT = 'Dernière étape de votre inscription à la Cagette.' WELCOME_MAIL_SUBJECT = 'Dernière étape de votre inscription à la Cagette.'
......
...@@ -6,6 +6,7 @@ OPEN_ON_SUNDAY = True ...@@ -6,6 +6,7 @@ OPEN_ON_SUNDAY = True
MAG_NAME = '' MAG_NAME = ''
OFFICE_NAME = '' OFFICE_NAME = ''
COMPANY_CODE = 'lgds'
COMPANY_NAME = 'Les Grains de Sel' COMPANY_NAME = 'Les Grains de Sel'
MAX_BEGIN_HOUR = '19:00' MAX_BEGIN_HOUR = '19:00'
WELCOME_ENTRANCE_MSG = 'Bienvenue aux Grains de Sel!' WELCOME_ENTRANCE_MSG = 'Bienvenue aux Grains de Sel!'
......
"""Company specific data values.""" """Company specific data values."""
COMPANY_CODE = 'supercafoutch'
"""Odoo coop specific constants .""" """Odoo coop specific constants ."""
EMAIL_DOMAIN = 'supercafoutch.fr' EMAIL_DOMAIN = 'supercafoutch.fr'
......
...@@ -617,12 +617,17 @@ class CagetteMember(models.Model): ...@@ -617,12 +617,17 @@ class CagetteMember(models.Model):
@staticmethod @staticmethod
def get_state_fr(coop_state): def get_state_fr(coop_state):
"""Return french version of given coop_state.""" """Return french version of given coop_state."""
company = getattr(settings, 'COMPANY_CODE', '')
if coop_state == 'alert': if coop_state == 'alert':
fr_state = 'En alerte' fr_state = 'En alerte'
elif coop_state == 'delay': elif coop_state == 'delay':
fr_state = 'Délai accordé' fr_state = 'Délai accordé'
elif coop_state == 'suspended': elif coop_state == 'suspended':
fr_state = 'Suspendu(e)' if company == 'lacagette':
fr_state = 'Rattrapage'
else:
fr_state = 'Suspendu(e)'
elif coop_state == 'not_concerned': elif coop_state == 'not_concerned':
fr_state = 'Non concerné(e)' fr_state = 'Non concerné(e)'
elif coop_state == 'blocked': elif coop_state == 'blocked':
......
const possible_cooperative_state = { const possible_cooperative_state = {
suspended: "Suspendu.e", suspended: "Rattrapage",
exempted: "Exempté.e", exempted: "Exempté.e",
alert: "En alerte", alert: "En alerte",
up_to_date: "À jour", up_to_date: "À jour",
......
...@@ -359,6 +359,8 @@ function init_shifts_exchange() { ...@@ -359,6 +359,8 @@ function init_shifts_exchange() {
}); });
} else if (partner_data.cooperative_state === 'suspended' } else if (partner_data.cooperative_state === 'suspended'
&& partner_data.date_delay_stop === 'False') { && partner_data.date_delay_stop === 'False') {
$("#suspended_content .makeups_nb").text(partner_data.makeups_to_do);
$("#suspended_content").show(); $("#suspended_content").show();
$(".select_makeups").on('click', () => { $(".select_makeups").on('click', () => {
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
Used to draw weeks planning Used to draw weeks planning
- COMPANY_NAME = 'lgds'
Used for company spesific code
- COMPANY_NAME = 'Les Grains de Sel' - COMPANY_NAME = 'Les Grains de Sel'
- ADMIN_IDS = [13] - ADMIN_IDS = [13]
......
...@@ -12,7 +12,13 @@ ...@@ -12,7 +12,13 @@
</a> </a>
</div> </div>
<div id="suspended_content" class="shifts_exchange_page_content"> <div id="suspended_content" class="shifts_exchange_page_content">
<h3>Je suis suspendu.e, je dois sélectionner mes rattrapages pour pouvoir refaire mes courses.</h3> <h3>
J'ai <span class="makeups_nb"></span> rattrapages à effectuer, je dois les sélectionner pour pouvoir refaire mes courses.
J'ai 6 mois de délai pour les rattraper.
</h3>
<h3>
Si besoin, je peux contacter le Bureau des membres via la rubrique "J'ai une demande" pour expliquer ma situation.
</h3>
<button type="button" class="btn--danger select_makeups"> <button type="button" class="btn--danger select_makeups">
Je sélectionne mes rattrapages Je sélectionne mes rattrapages
</button> </button>
......
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