Commit ada4b8a0 by Damien Moulard

linting

parent 1b3bbae9
...@@ -30,7 +30,7 @@ function request_delay() { ...@@ -30,7 +30,7 @@ function request_delay() {
verif_token: partner_data.verif_token, verif_token: partner_data.verif_token,
idPartner: partner_data.partner_id, idPartner: partner_data.partner_id,
start_date: delay_start, start_date: delay_start,
duration: diff_days, duration: diff_days
}, },
success: function() { success: function() {
partner_data.cooperative_state = 'delay'; partner_data.cooperative_state = 'delay';
...@@ -45,6 +45,7 @@ function request_delay() { ...@@ -45,6 +45,7 @@ function request_delay() {
closeModal(); closeModal();
let msg_template = $("#cant_have_delay_msg_template"); let msg_template = $("#cant_have_delay_msg_template");
openModal( openModal(
msg_template.html(), msg_template.html(),
() => { () => {
...@@ -53,7 +54,7 @@ function request_delay() { ...@@ -53,7 +54,7 @@ function request_delay() {
"J'accède au formulaire", "J'accède au formulaire",
true, true,
false false
) );
} else { } else {
err = {msg: "erreur serveur lors de la création du délai", ctx: 'request_delay'}; err = {msg: "erreur serveur lors de la création du délai", ctx: 'request_delay'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') { if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
......
...@@ -187,8 +187,8 @@ function init_calendar_page() { ...@@ -187,8 +187,8 @@ function init_calendar_page() {
template_explanations.html(), template_explanations.html(),
closeModal, closeModal,
"J'ai compris" "J'ai compris"
) );
}) });
} else { } else {
$("#calendar_explaination_button").hide(); $("#calendar_explaination_button").hide();
$("#calendar_explaination_area").html(template_explanations.html()); $("#calendar_explaination_area").html(template_explanations.html());
...@@ -288,10 +288,12 @@ function init_calendar_page() { ...@@ -288,10 +288,12 @@ function init_calendar_page() {
// Check if selected new shift is in less than 6 months // Check if selected new shift is in less than 6 months
if (partner_data.date_delay_stop !== 'False') { if (partner_data.date_delay_stop !== 'False') {
date_partner_delay_stop = new Date(partner_data.date_delay_stop); date_partner_delay_stop = new Date(partner_data.date_delay_stop);
if ( datetime_new_shift > date_partner_delay_stop ) { if (datetime_new_shift > date_partner_delay_stop) {
let msg = `Vous avez jusqu'au ${date_partner_delay_stop.toLocaleDateString("fr-fr", date_options)} ` + let msg = `Vous avez jusqu'au ${date_partner_delay_stop.toLocaleDateString("fr-fr", date_options)} ` +
`pour sélectionner un rattrapage (soit une période de 6 mois depuis votre absence).`; `pour sélectionner un rattrapage (soit une période de 6 mois depuis votre absence).`;
alert(msg); alert(msg);
return; return;
} }
} }
...@@ -341,11 +343,11 @@ function init_shifts_exchange() { ...@@ -341,11 +343,11 @@ function init_shifts_exchange() {
}); });
} else if ( } else if (
partner_data.cooperative_state === 'suspended' partner_data.cooperative_state === 'suspended'
&& partner_data.can_have_delay === 'False') && partner_data.can_have_delay === 'False') {
{
let msg_template = $("#cant_have_delay_msg_template"); let msg_template = $("#cant_have_delay_msg_template");
$(".suspended_cant_have_delay_msg").html(msg_template.html())
$("#suspended_cant_have_delay_content").show() $(".suspended_cant_have_delay_msg").html(msg_template.html());
$("#suspended_cant_have_delay_content").show();
$(".cant_have_delay_form_link") $(".cant_have_delay_form_link")
.show() .show()
......
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