js unique identifiers fix

This commit is contained in:
Cayo Puigdefabregas 2022-08-30 13:17:58 +02:00
parent bdf04061dc
commit 4dfbb4a0dc
2 changed files with 0 additions and 62 deletions

View File

@ -178,8 +178,6 @@ function deviceSelect() {
$("#addingLotModal .btn-primary").hide(); $("#addingLotModal .btn-primary").hide();
$("#removeLotModal .pol").show(); $("#removeLotModal .pol").show();
$("#removeLotModal .btn-primary").hide(); $("#removeLotModal .btn-primary").hide();
$("#addingTagModal .pol").show();
$("#addingTagModal .btn-primary").hide();
$("#actionModal .pol").show(); $("#actionModal .pol").show();
$("#actionModal .btn-primary").hide(); $("#actionModal .btn-primary").hide();
$("#allocateModal .pol").show(); $("#allocateModal .pol").show();
@ -197,8 +195,6 @@ function deviceSelect() {
$("#allocateModal .btn-primary").show(); $("#allocateModal .btn-primary").show();
$("#datawipeModal .pol").hide(); $("#datawipeModal .pol").hide();
$("#datawipeModal .btn-primary").show(); $("#datawipeModal .btn-primary").show();
$("#addingTagModal .pol").hide();
$("#addingTagModal .btn-primary").show();
} }
} }
@ -214,33 +210,6 @@ function removeLot() {
$("#activeRemoveLotModal").click(); $("#activeRemoveLotModal").click();
} }
function removeTag() {
const devices = TableController.getSelectedDevices();
const devices_id = devices.map(dev => $(dev).attr('data'));
if (devices_id.length == 1) {
const url = "/inventory/tag/devices/".concat(devices_id[0], "/del/");
window.location.href = url;
} else {
$("#unlinkTagAlertModal").click();
}
}
function addTag() {
const devices = TableController.getSelectedDevices();
const devices_id = devices.map(dev => $(dev).attr('data'));
if (devices_id.length == 1) {
$("#addingTagModal .pol").hide();
$("#addingTagModal .btn-primary").show();
} else {
$("#addingTagModal .pol").show();
$("#addingTagModal .btn-primary").hide();
}
$("#addTagAlertModal").click();
}
function select_shift() { function select_shift() {
const chkboxes = $('.deviceSelect'); const chkboxes = $('.deviceSelect');
var lastChecked = null; var lastChecked = null;

View File

@ -163,9 +163,6 @@ function deviceSelect() {
$("#removeLotModal .pol").show(); $("#removeLotModal .pol").show();
$("#removeLotModal .btn-primary").hide(); $("#removeLotModal .btn-primary").hide();
$("#addingTagModal .pol").show();
$("#addingTagModal .btn-primary").hide();
$("#actionModal .pol").show(); $("#actionModal .pol").show();
$("#actionModal .btn-primary").hide(); $("#actionModal .btn-primary").hide();
@ -189,9 +186,6 @@ function deviceSelect() {
$("#datawipeModal .pol").hide(); $("#datawipeModal .pol").hide();
$("#datawipeModal .btn-primary").show(); $("#datawipeModal .btn-primary").show();
$("#addingTagModal .pol").hide();
$("#addingTagModal .btn-primary").show();
} }
} }
@ -205,31 +199,6 @@ function removeLot() {
$("#activeRemoveLotModal").click(); $("#activeRemoveLotModal").click();
} }
function removeTag() {
const devices = TableController.getSelectedDevices();
const devices_id = devices.map(dev => $(dev).attr("data"));
if (devices_id.length == 1) {
const url = `/inventory/tag/devices/${devices_id[0]}/del/`;
window.location.href = url;
} else {
$("#unlinkTagAlertModal").click();
}
}
function addTag() {
const devices = TableController.getSelectedDevices();
const devices_id = devices.map(dev => $(dev).attr("data"));
if (devices_id.length == 1) {
$("#addingTagModal .pol").hide();
$("#addingTagModal .btn-primary").show();
} else {
$("#addingTagModal .pol").show();
$("#addingTagModal .btn-primary").hide();
}
$("#addTagAlertModal").click();
}
function select_shift() { function select_shift() {
const chkboxes = $(".deviceSelect"); const chkboxes = $(".deviceSelect");
let lastChecked = null; let lastChecked = null;