From 8a8feb316590beb0ca39335ab577636f30aded0c Mon Sep 17 00:00:00 2001 From: Nadeu Date: Fri, 23 Dec 2022 13:53:22 +0100 Subject: [PATCH 1/4] Update iso 2022.12.1-beta --- ereuse_devicehub/workbench/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/workbench/__init__.py b/ereuse_devicehub/workbench/__init__.py index 7a54c4a2..8f9bf153 100644 --- a/ereuse_devicehub/workbench/__init__.py +++ b/ereuse_devicehub/workbench/__init__.py @@ -4,7 +4,7 @@ isos = { 'url': 'https://releases.usody.com/demo/', }, "register": { - 'iso': "USODY_2022.8.0-beta.iso", + 'iso': "USODY_2022.12.1-beta.iso", 'url': 'https://releases.usody.com/2022/', }, "erease": { From 350aad19c4ebc352f62498ccc847e673b7970997 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 10 Jan 2023 14:10:49 +0100 Subject: [PATCH 2/4] get all lots not only temporary --- ereuse_devicehub/static/js/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/static/js/api.js b/ereuse_devicehub/static/js/api.js index 552544d2..4baa1d78 100644 --- a/ereuse_devicehub/static/js/api.js +++ b/ereuse_devicehub/static/js/api.js @@ -4,7 +4,7 @@ const Api = { * @returns get lots */ async get_lots() { - const request = await this.doRequest(`${API_URLS.lots}?type=temporary`, "GET", null); + const request = await this.doRequest(`${API_URLS.lots}`, "GET", null); if (request != undefined) return request.items; throw request; }, From f929283f4fffd8098ecb50de7a17a2293647721b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 10 Jan 2023 14:11:42 +0100 Subject: [PATCH 3/4] fix trades in temporary list --- ereuse_devicehub/static/js/main_inventory.build.js | 2 +- ereuse_devicehub/static/js/main_inventory.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.build.js b/ereuse_devicehub/static/js/main_inventory.build.js index 546f398c..0032f649 100644 --- a/ereuse_devicehub/static/js/main_inventory.build.js +++ b/ereuse_devicehub/static/js/main_inventory.build.js @@ -665,7 +665,7 @@ async function processSelectedDevices() { }); listHTML.html(""); - const lot_temporary = lots.filter(lot => !lot.transfer); + const lot_temporary = lots.filter(lot => !lot.transfer && !lot.trade); appendMenu(lot_temporary, listHTML, templateLot, selectedDevices, actions, "Temporary"); const lot_incoming = lots.filter(lot => lot.transfer && lot.transfer == "Incoming"); diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index dc0a09a7..f5c50241 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -627,7 +627,7 @@ async function processSelectedDevices() { }) listHTML.html(""); - const lot_temporary = lots.filter(lot => !lot.transfer); + const lot_temporary = lots.filter(lot => !lot.transfer && !lot.trade); appendMenu(lot_temporary, listHTML, templateLot, selectedDevices, actions, "Temporary"); const lot_incoming = lots.filter(lot => lot.transfer && lot.transfer == "Incoming"); From a265af88644b313044c4419ead4a09aca0735e6d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 11 Jan 2023 10:18:22 +0100 Subject: [PATCH 4/4] fix remove placeholder from trade --- ereuse_devicehub/resources/device/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 6fa60182..566d7d85 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -778,6 +778,8 @@ class Device(Thing): def change_owner(self, new_user): """util for change the owner one device""" + if not new_user: + return self.owner = new_user if hasattr(self, 'components'): for c in self.components: