Commit a06fa29c by Etienne Freiss

Merge branch 'dev_cooperatic' into 2209-see-old-envelops

parents 5b449b09 073ef1f7
Pipeline #1771 passed with stage
in 1 minute 38 seconds
......@@ -48,7 +48,7 @@
border-bottom: 1px solid #d9534f;
position: absolute;
content: "";
width: 95%;
width: 100%;
height: 50%;
display: none;
}
......
......@@ -130,7 +130,6 @@ function set_envelop_dom(envelop, envelop_name, envelop_content_id, envelop_inde
envelop_panel.append(`<button class="btn--danger delete_envelop_button item-fluid" id="update_envelop_${envelop.type}_${envelop_index}">Supprimer l'enveloppe</button>`);
envelop_panel.append(`<button class="btn--primary update_envelop_button item-fluid" id="update_envelop_${envelop.type}_${envelop_index}">Modifier</button>`);
$(".update_envelop_button").off("click");
$(".update_envelop_button").on("click", function() {
let el_id = $(this).attr("id")
......@@ -403,7 +402,7 @@ function delete_envelop(envelop) {
* @param {String} index
*/
function archive_envelop(type, index) {
if (is_time_to('archive_envelop', 1000)) {
if (is_time_to('archive_envelop', 5000)) {
$('#envelop_cashing_error').hide();
$('#envelop_cashing_success').hide();
// Loading on
......@@ -460,6 +459,8 @@ function archive_envelop(type, index) {
alert('Erreur serveur. Merci de ne pas ré-encaisser l\'enveloppe qui a causé l\'erreur.');
}
});
} else {
alert("Par sécurité, il faut attendre 5s entre l'encaissement de deux enveloppes.");
}
}
......
......@@ -52,7 +52,7 @@ def archive_envelop(request):
# Immediately save a token than this payment has been saved
# If an error occurs, this payment won't be saved again
envelop['envelop_content'][partner_id]['payment_id'] = res['payment_id']
updated_envelop = m.c_db.updateDoc(envelop);
updated_envelop = m.c_db.updateDoc(envelop)
envelop['_rev'] = updated_envelop['_rev']
else:
# Handling error when saving payment, return data to display error message
......
......@@ -766,7 +766,7 @@ class CagetteMember(models.Model):
# member = CagetteMember(m['id'], m['email'])
# m['next_shifts'] = member.get_next_shift()
if not m['parent_name'] is False:
m['name'] += ' / ' + m['parent_name']
m['name'] += ' (en binôme avec ' + m['parent_name'] + ')'
del m['parent_name']
members.append(m)
......@@ -1206,7 +1206,7 @@ class CagetteServices(models.Model):
for m in s['members']:
for a in associated:
if int(a['parent_id'][0]) == int(m['partner_id'][0]):
m['partner_id'][1] += ' / ' + a['name']
m['partner_id'][1] += ' en binôme avec ' + a['name']
return services
......
......@@ -72,3 +72,6 @@ h1 .member_name {font-weight: bold;}
#member_advice {background: #FFF; color: red;}
.easy_shift_validate {text-align: center; margin-top: 3em;}
.button_is_member {background-color: #439D44; color: #fff;}
.button_is_associated_people {background: #0275D8; color: #fff;}
......@@ -93,8 +93,9 @@ function fill_member_slide(member) {
html_elts.image_medium.html('<img src="'+img_src+'" width="128" />');
html_elts.cooperative_state.html(member.cooperative_state);
if (member.cooperative_state == 'Rattrapage') {
var explanation = "Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre."
html_elts.status_explanation.html(explanation)
var explanation = "Tu as dû manquer un service! Pour pouvoir faire tes courses aujourd'hui, tu dois d'abord sélectionner un rattrapage sur ton espace membre.";
html_elts.status_explanation.html(explanation);
}
if (member.cooperative_state == 'Désinscrit(e)') coop_info.addClass('b_red');
else if (member.cooperative_state == 'En alerte' || member.cooperative_state == 'Délai accordé' || member.cooperative_state == 'Rattrapage') coop_info.addClass('b_orange');
......@@ -147,14 +148,16 @@ function preview_results() {
for (i in results) {
if (results[i].is_member != false) {
var m = $('<button style="background-color: #00A573;">').attr('data-i', i)
.text(results[i].name);
var m = $('<button class="button_is_member">').attr('data-i', i)
.text(results[i].barcode_base + ' - ' + results[i].name);
html_elts.multi_results.append(m);
}
if (results[i].is_associated_people != false) {
var m = $('<button style="background: #0275D8;">').attr('data-i', i)
.text(results[i].name);
m = $('<button class="button_is_associated_people"></button_is_member>').attr('data-i', i)
.text('B ' + results[i].barcode_base + ' - ' + results[i].name);
html_elts.multi_results.append(m);
}
......
......@@ -197,7 +197,7 @@
min-width: 200px;
}
#date_planned_input, #coverage_days_input, #stats_date_period_select {
#date_planned_input, #coverage_days_input, #targeted_amount_input, #percent_adjust_input, #stats_date_period_select {
border-radius: 3px;
}
......@@ -210,11 +210,11 @@
margin-right: 3px;
}
#coverage_days_input, #percent_adjust_input {
#coverage_days_input, #targeted_amount_input, #percent_adjust_input {
display: block;
}
#coverage_days_input {
#coverage_days_input, #targeted_amount_input {
margin-bottom: 3px;
}
......@@ -321,7 +321,7 @@
justify-content: center;
align-items: center;
flex-wrap: wrap;
margin: 30px 0 20px 0;
margin: 15px 0;
position: -webkit-sticky;
position: sticky;
top: 140px;
......@@ -329,8 +329,8 @@
}
.supplier_pill {
background-color: #a0daff;
border: 1px solid #6ea8cc;
background-color: #ffebcd;
border: 2px solid black;
}
.pill_supplier_name {
......
......@@ -52,7 +52,7 @@
<div class="row-1 grid-2">
<div class="col-1">
<div class="label">
Biper le badge, ou saisissez le n° de coop. ou le nom
Biper le badge, ou saisir le n° de coop. ou le nom
</div>
Recherche :
<input type="text" name="search_string" autocomplete="off" />
......@@ -112,7 +112,7 @@
<div id="next_shifts">
</div>
</div>
<a class="btn" data-next="first_page">Coopérateur suivant</a>
<a class="btn" data-next="first_page">Coopérateur.rice suivant.e</a>
</div>
<div class="col-1">
<section id="member_advice">
......@@ -208,7 +208,7 @@
{% endif %}
</section>
<div class="col-2"></div>
<a class="btn col-2" data-next="first_page">Coopérateur suivant</a>
<a class="btn col-2" data-next="first_page">Coopérateur.ice suivant.e</a>
<div class="col-2"></div>
</section>
<section class="grid-6 has-gutter" id="rattrapage_1">
......
......@@ -95,6 +95,7 @@
<form action="javascript:;" id="coverage_form" class="order_form_item">
<div class="input-wrapper">
<input type="number" name="coverage_days" id="coverage_days_input" placeholder="Nb jours de couverture" min="1">
<input type="number" name="targeted_amount" id="targeted_amount_input" placeholder="Montant en €" min="1">
<input type="number" name="percent_adjustement" id="percent_adjust_input" placeholder="ajustement en %">
</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