From a7e1daca79777b416eb9fa2d3872c85be96e65ee Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 21 Jul 2022 16:30:35 +0200 Subject: [PATCH 1/3] fix get id from js --- ereuse_devicehub/static/js/main_inventory.build.js | 4 ++-- ereuse_devicehub/static/js/main_inventory.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.build.js b/ereuse_devicehub/static/js/main_inventory.build.js index 1e1b21fd..7737a44c 100644 --- a/ereuse_devicehub/static/js/main_inventory.build.js +++ b/ereuse_devicehub/static/js/main_inventory.build.js @@ -216,7 +216,7 @@ function removeLot() { function removeTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => dev.data); + const devices_id = devices.map(dev => $(dev).attr('data')); if (devices_id.length == 1) { const url = "/inventory/tag/devices/".concat(devices_id[0], "/del/"); @@ -228,7 +228,7 @@ function removeTag() { function addTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => dev.data); + const devices_id = devices.map(dev => $(dev).attr('data')); if (devices_id.length == 1) { $("#addingTagModal .pol").hide(); diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 9c9b8d0a..3c67f0c3 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -207,7 +207,7 @@ function removeLot() { function removeTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => dev.data); + 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; @@ -218,7 +218,7 @@ function removeTag() { function addTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => dev.data); + const devices_id = devices.map(dev => $(dev).attr('data')); if (devices_id.length == 1) { $("#addingTagModal .pol").hide(); $("#addingTagModal .btn-primary").show(); From 0d2edef437582bb459d3464e565903896f1798dd Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 21 Jul 2022 14:49:02 +0000 Subject: [PATCH 2/3] Fix code style issues with ESLint --- ereuse_devicehub/static/js/main_inventory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 3c67f0c3..d80d6c66 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -207,7 +207,7 @@ function removeLot() { function removeTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr('data')); + 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; @@ -218,7 +218,7 @@ function removeTag() { function addTag() { const devices = TableController.getSelectedDevices(); - const devices_id = devices.map(dev => $(dev).attr('data')); + const devices_id = devices.map(dev => $(dev).attr("data")); if (devices_id.length == 1) { $("#addingTagModal .pol").hide(); $("#addingTagModal .btn-primary").show(); From 9f0edf5bd8db6043e2ce03e8e71443fe984ab18d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 21 Jul 2022 16:46:01 +0200 Subject: [PATCH 3/3] CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12c7fc8e..a306f99f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ml). - [fixed] #313 Bump numpy from 1.21.6 to 1.22.0. - [fixed] #314 bugs create placeholder from lot. - [fixed] #317 bugs about exports placeholders. +- [fixed] #318 bugs about unlink tag of device. ## [2.3.0] - 2022-07-12 - [added] #281 Add selenium test.