Commit 3ecb4014 by Damien Moulard

Merge branch '2496-create-connection-for-shift-registration-station' into 'dev_cooperatic'

2496 create connection for shift registration station

See merge request !146
parents 18b87a0d 298c4ee4
Pipeline #1933 passed with stage
in 1 minute 28 seconds
...@@ -45,6 +45,7 @@ h1 .member_name {font-weight: bold;} ...@@ -45,6 +45,7 @@ h1 .member_name {font-weight: bold;}
.members_list li {display:block;margin-bottom:5px;} .members_list li {display:block;margin-bottom:5px;}
.members_list li.btn--inverse {background: #449d44; color: #FFF; } .members_list li.btn--inverse {background: #449d44; color: #FFF; }
.members_list li.btn--inverse.not_connected {cursor:not-allowed}
.members_list li.btn--inverse.late {background-color: #de9b00; color: white} .members_list li.btn--inverse.late {background-color: #de9b00; color: white}
.members_list li.btn--inverse.both {background-color: #0275d8 ; color: white} .members_list li.btn--inverse.both {background-color: #0275d8 ; color: white}
......
...@@ -286,7 +286,7 @@ function fill_service_entry(s) { ...@@ -286,7 +286,7 @@ function fill_service_entry(s) {
var li_class = "btn"; var li_class = "btn";
var li_data = ""; var li_data = "";
if (e.state == "done") { if (e.state == "done" && coop_is_connected()) {
li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"'; li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"';
li_class += "--inverse"; li_class += "--inverse";
if (e.is_late == true) { if (e.is_late == true) {
...@@ -295,6 +295,12 @@ function fill_service_entry(s) { ...@@ -295,6 +295,12 @@ function fill_service_entry(s) {
if (e.associate_registered=='both') { if (e.associate_registered=='both') {
li_class += " both"; li_class += " both";
} }
} else if (e.state == "done" && !coop_is_connected()) {
li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"';
li_class += "--inverse not_connected";
if (e.is_late == true) {
li_class += " late";
}
} else { } else {
li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"'; li_data = ' data-rid="'+e.id+'" data-mid="'+e.partner_id[0]+'"';
} }
...@@ -698,11 +704,13 @@ shift_members.on("click", '.btn[data-rid]', function() { ...@@ -698,11 +704,13 @@ shift_members.on("click", '.btn[data-rid]', function() {
}); });
shift_members.on("click", '.btn--inverse', function() { shift_members.on("click", '.btn--inverse', function() {
if (coop_is_connected()) {
var clicked = $(this); var clicked = $(this);
var rid = clicked.data('rid'); var rid = clicked.data('rid');
var mid = clicked.data('mid'); var mid = clicked.data('mid');
cancel_service_presence(mid, rid); cancel_service_presence(mid, rid);
}
}); });
pages.shopping_entry.on('css', function() { pages.shopping_entry.on('css', function() {
......
...@@ -138,9 +138,13 @@ ...@@ -138,9 +138,13 @@
</section> </section>
</section> </section>
<section class="grid-6 has-gutter" id="service_entry"> <section class="grid-6 has-gutter" id="service_entry">
<div class="col-6 row-2"> <div class="col-2 row-2">
<a class="btn btn--primary" data-next="first_page" >Retour accueil</a> <a class="btn btn--primary" data-next="first_page" >Retour accueil</a>
</div> </div>
<div class="col-2 row-2"></div>
<div class="col-2 row-2 login_area">
{% include "common/conn_admin.html" %}
</div>
<div class="col-1"></div> <div class="col-1"></div>
<div class="col-4"> <div class="col-4">
<h1 class="col-4 txtcenter">Qui es-tu ?</h1> <h1 class="col-4 txtcenter">Qui es-tu ?</h1>
......
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