Commit 8dddab8e by Damien Moulard

add button to refresh order in the order screen

parent 56ef5527
Pipeline #1469 passed with stage
in 1 minute 29 seconds
...@@ -155,6 +155,14 @@ ...@@ -155,6 +155,14 @@
min-height: 45px; min-height: 45px;
} }
#do_inventory {
border-top: 1px solid #004aa6;
}
#refresh_order {
border-top: 1px solid #004aa6;
border-bottom: 1px solid #004aa6;
}
/* -- Order data */ /* -- Order data */
#order_data_container { #order_data_container {
font-size: 1.8rem; font-size: 1.8rem;
......
...@@ -2153,6 +2153,19 @@ $(document).ready(function() { ...@@ -2153,6 +2153,19 @@ $(document).ready(function() {
} }
}); });
$("#refresh_order").on("click", function() {
if (is_time_to('refresh_order', 1000)) {
openModal();
check_products_data()
.then(() => {
update_cdb_order();
update_main_screen();
$("#toggle_action_buttons").click();
closeModal();
});
}
});
$("#delete_order_button").on("click", function() { $("#delete_order_button").on("click", function() {
if (is_time_to('press_delete_order_button', 1000)) { if (is_time_to('press_delete_order_button', 1000)) {
let modal_remove_order = $('#templates #modal_remove_order'); let modal_remove_order = $('#templates #modal_remove_order');
......
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
<button type="button" class='btn--primary action_button' id="do_inventory" style="display:none;"> <button type="button" class='btn--primary action_button' id="do_inventory" style="display:none;">
Faire un inventaire Faire un inventaire
</button> </button>
<button type="button" class='btn--primary action_button' id="refresh_order">
Rafraîchir la commande
</button>
<button type="button" class='btn--danger action_button' id="delete_order_button"> <button type="button" class='btn--danger action_button' id="delete_order_button">
Supprimer la commande Supprimer la commande
</button> </button>
......
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