Commit 6f07fd23 by Damien Moulard Committed by Alexis Aoun

add loading for inventory

parent 1346a110
......@@ -585,6 +585,7 @@ function generate_inventory() {
openModal(
modal_create_inventory.html(),
() => {
$('#do_inventory').empty().append(`<i class="fas fa-spinner fa-spin"></i>`);
$.ajax({
type: "POST",
url: "/inventory/generate_inventory_list",
......@@ -597,6 +598,7 @@ function generate_inventory() {
// Give time for modal to fade
setTimeout(function() {
$('#do_inventory').empty().append(`Faire un inventaire`);
$('#do_inventory').notify(
"Inventaire créé !",
{
......@@ -604,9 +606,10 @@ function generate_inventory() {
className: "success"
}
);
}, 500);
}, 200);
},
error: function(data) {
$('#do_inventory').empty().append(`Faire un inventaire`);
let msg = "erreur serveur lors de la création de l'inventaire".
err = {msg: msg, ctx: 'generate_inventory'};
......@@ -1477,6 +1480,7 @@ function update_main_screen(params) {
return 0;
});
}
$("#select_all_products_cb").prop("checked", false);
if (order_doc.coverage_days !== null) {
$("#coverage_days_input").val(order_doc.coverage_days);
......
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