Commit 888a3e23 by Damien Moulard

Merge branch '2463-go-to-normal-validation-for-associated-member' into 'dev_cooperatic'

fix bug

See merge request !144
parents c7b3bf64 730e964d
Pipeline #1941 passed with stage
in 1 minute 28 seconds
...@@ -92,12 +92,18 @@ function new_coop_validation() { ...@@ -92,12 +92,18 @@ function new_coop_validation() {
coop_registration_details.find('.shift_template').text(st); coop_registration_details.find('.shift_template').text(st);
process_state.html(current_coop.firstname + ' ' +current_coop.lastname); process_state.html(current_coop.firstname + ' ' +current_coop.lastname);
get_next_shift(current_coop.shift_template.data.id, function(data) { if (current_coop.shift_template.data && current_coop.shift_template.data.id != ASSOCIATE_MEMBER_SHIFT) {
if (data != null) get_next_shift(current_coop.shift_template.data.id, function(data) {
coop_registration_details.find('.next_shift').text(data.date_begin); 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(); coop_registration_details.show();
}); }
} }
function reset_sex_radios() { function reset_sex_radios() {
...@@ -210,6 +216,7 @@ function _really_save_new_coop(email, fname, lname, cap, pm, cn, bc, msex) { ...@@ -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) { } else if (coop.is_associated_people && typeof coop.shift_template != "undefined" && coop.shift_template.data.id == ASSOCIATE_MEMBER_SHIFT) {
ncoop_view.hide(); ncoop_view.hide();
new_coop_validation();
} else { } else {
swipe_to_shift_choice(); swipe_to_shift_choice();
} }
......
...@@ -132,7 +132,7 @@ ...@@ -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>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>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> <button class="btn--primary" id="next_coop">Coopérateur.rice suivant.e !</button>
</div> </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