Commit f4e20155 by François C.

Quelques modifications manuelles sur fichiers JS (warnings ESLint)

parent 8d008341
Pipeline #728 failed with stage
in 10 seconds
...@@ -12,7 +12,7 @@ function init_datatable() { ...@@ -12,7 +12,7 @@ function init_datatable() {
{ {
data:"datetime_created", data:"datetime_created",
title:"Liste", title:"Liste",
render: function (data, type, full, meta) { render: function (data) {
return "Liste du " + data; return "Liste du " + data;
} }
}, },
...@@ -31,7 +31,7 @@ function init_datatable() { ...@@ -31,7 +31,7 @@ function init_datatable() {
title:"Inventaire à faire", title:"Inventaire à faire",
className:"dt-body-center", className:"dt-body-center",
width: "15%", width: "15%",
render: function (data, type, full, meta) { render: function (data) {
if (data == '') if (data == '')
return "<button class='btn--primary do_inventory'>Inventaire en rayon</button>"; return "<button class='btn--primary do_inventory'>Inventaire en rayon</button>";
else else
......
...@@ -276,10 +276,8 @@ function get_stored_product_with_bc(barcode) { ...@@ -276,10 +276,8 @@ function get_stored_product_with_bc(barcode) {
/* /*
* Fetch a product when barcode is read * Fetch a product when barcode is read
* On dynamic_search mode, we try to read barcode as it is written,
* so the process is slightly different
*/ */
function fetch_product_from_bc(barcode, dynamic_search = false) { function fetch_product_from_bc(barcode) {
//console.log(barcode) //console.log(barcode)
if (barcode == '') { if (barcode == '') {
...@@ -293,9 +291,6 @@ function fetch_product_from_bc(barcode, dynamic_search = false) { ...@@ -293,9 +291,6 @@ function fetch_product_from_bc(barcode, dynamic_search = false) {
if (p == null) { if (p == null) {
$('#icon_product_not_found').show(); $('#icon_product_not_found').show();
alert("Le code-barre " + barcode + " ne correspond à aucun article connu."); alert("Le code-barre " + barcode + " ne correspond à aucun article connu.");
// if (!dynamic_search) {
// reset_focus();
// }
return -1; return -1;
} }
...@@ -761,7 +756,7 @@ $(document).ready(function() { ...@@ -761,7 +756,7 @@ $(document).ready(function() {
barcode = barcode_input.val(); barcode = barcode_input.val();
} }
fetch_product_from_bc(barcode, true); fetch_product_from_bc(barcode);
} }
}); });
......
...@@ -11,7 +11,7 @@ var dateFormat = "yy-mm-dd", ...@@ -11,7 +11,7 @@ var dateFormat = "yy-mm-dd",
// Return a date from a string if valid, else return null // Return a date from a string if valid, else return null
function getDate(element) { function getDate(element) {
var date; var date = null;
try { try {
date = $.datepicker.parseDate(dateFormat, element); date = $.datepicker.parseDate(dateFormat, element);
...@@ -61,7 +61,7 @@ function display_movements(movements) { ...@@ -61,7 +61,7 @@ function display_movements(movements) {
data:"inventory_value", data:"inventory_value",
title: "Valeur", title: "Valeur",
className:"dt-body-center", className:"dt-body-center",
render: function (data, type, full) { render: function (data) {
return parseFloat(data).toFixed(2) + ' €'; return parseFloat(data).toFixed(2) + ' €';
} }
}, },
...@@ -69,7 +69,7 @@ function display_movements(movements) { ...@@ -69,7 +69,7 @@ function display_movements(movements) {
data:"date_done", data:"date_done",
title:"Trier par Date", title:"Trier par Date",
className:"dt-body-center", className:"dt-body-center",
render: function (data, type, full) { render: function (data) {
return '<i>' + data + '</i>'; return '<i>' + data + '</i>';
} }
} }
......
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