Commit 47ad69a7 by Etienne Freiss

fix bug

parent 6aa05fdd
Pipeline #1920 passed with stage
in 1 minute 30 seconds
......@@ -92,12 +92,18 @@ function new_coop_validation() {
coop_registration_details.find('.shift_template').text(st);
process_state.html(current_coop.firstname + ' ' +current_coop.lastname);
get_next_shift(current_coop.shift_template.data.id, function(data) {
if (data != null)
coop_registration_details.find('.next_shift').text(data.date_begin);
if (coop.shift_template.data && coop.shift_template.data.id != ASSOCIATE_MEMBER_SHIFT) {
get_next_shift(current_coop.shift_template.data.id, function(data) {
if (data != null) {
coop_registration_details.find('#next_shift_registration_detail').show();
coop_registration_details.find('.next_shift').text(data.date_begin);
}
coop_registration_details.show();
});
} else {
coop_registration_details.find('#next_shift_registration_detail').hide();
coop_registration_details.show();
});
}
}
function reset_sex_radios() {
......@@ -210,6 +216,7 @@ function _really_save_new_coop(email, fname, lname, cap, pm, cn, bc, msex) {
);
} else if (coop.is_associated_people && typeof coop.shift_template != "undefined" && coop.shift_template.data.id == ASSOCIATE_MEMBER_SHIFT) {
ncoop_view.hide();
new_coop_validation();
} else {
swipe_to_shift_choice();
}
......
......@@ -132,7 +132,7 @@
<p>Pensez à inscrire ce numéro temporaire de coopérateur au crayon de papier sur les deux formulaires papier.</p>
-->
<p>Créneau choisi : <span class="shift_template"></span></p>
<p>Prochain service : <span class="next_shift"></span></p>
<p id="next_shift_registration_detail">Prochain service : <span class="next_shift"></span></p>
<button class="btn--primary" id="next_coop">Coopérateur.rice suivant.e !</button>
</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