Commit ada4b8a0 by Damien Moulard

linting

parent 1b3bbae9
......@@ -30,7 +30,7 @@ function request_delay() {
verif_token: partner_data.verif_token,
idPartner: partner_data.partner_id,
start_date: delay_start,
duration: diff_days,
duration: diff_days
},
success: function() {
partner_data.cooperative_state = 'delay';
......@@ -45,6 +45,7 @@ function request_delay() {
closeModal();
let msg_template = $("#cant_have_delay_msg_template");
openModal(
msg_template.html(),
() => {
......@@ -53,7 +54,7 @@ function request_delay() {
"J'accède au formulaire",
true,
false
)
);
} else {
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') {
......
......@@ -187,8 +187,8 @@ function init_calendar_page() {
template_explanations.html(),
closeModal,
"J'ai compris"
)
})
);
});
} else {
$("#calendar_explaination_button").hide();
$("#calendar_explaination_area").html(template_explanations.html());
......@@ -288,10 +288,12 @@ function init_calendar_page() {
// Check if selected new shift is in less than 6 months
if (partner_data.date_delay_stop !== 'False') {
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)} ` +
`pour sélectionner un rattrapage (soit une période de 6 mois depuis votre absence).`;
alert(msg);
return;
}
}
......@@ -341,11 +343,11 @@ function init_shifts_exchange() {
});
} else if (
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");
$(".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")
.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