Commit 4ceedb8c by Damien Moulard

Merge branch '4809-shelf-value-triggered-on-btn-click' into 'dev_cooperatic'

add btn and trigger visibility and computation of shelf_value on click

See merge request !243
parents 48148aa3 2e716e45
Pipeline #3004 failed with stage
in 1 minute 6 seconds
...@@ -82,6 +82,8 @@ function init_datatable() { ...@@ -82,6 +82,8 @@ function init_datatable() {
{ {
data:"shelf_value", data:"shelf_value",
title:"Valeur théorique du rayon", title:"Valeur théorique du rayon",
visible: false,
name: "shelf_value",
render: function (data, type) { render: function (data, type) {
if (type == "sort" || type == 'type') if (type == "sort" || type == 'type')
return data; return data;
...@@ -324,7 +326,6 @@ $(document).ready(function() { ...@@ -324,7 +326,6 @@ $(document).ready(function() {
} }
shelfs_table = init_datatable(); shelfs_table = init_datatable();
get_shelfs_extra_data();
$(document).on('click', 'button.do_shelf_inventory', go_to_shelf_inventory); $(document).on('click', 'button.do_shelf_inventory', go_to_shelf_inventory);
$(document).on('click', 'tbody td .delete_ongoing_inv_icon', pre_delete_ongoing_inventory); $(document).on('click', 'tbody td .delete_ongoing_inv_icon', pre_delete_ongoing_inventory);
...@@ -337,4 +338,8 @@ $(document).ready(function() { ...@@ -337,4 +338,8 @@ $(document).ready(function() {
.draw(); .draw();
}); });
$(document).on('click', '#show_and_compute_shelf_value', function () {
shelfs_table.column('shelf_value:name').visible(true);
get_shelfs_extra_data();
});
}); });
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
</div> </div>
</div> </div>
<div id="footer_btn">
<button id='show_and_compute_shelf_value' class='btn--primary'>Afficher et calculer la valeur théorique des rayons</button>
</div>
<div id="templates" style="display:none;"> <div id="templates" style="display:none;">
<div id="modal_delete_ongoing_inv"> <div id="modal_delete_ongoing_inv">
<h4>Attention !</h4> <h4>Attention !</h4>
......
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