From 538541cd4dd815895e0a087212f25a4c91687abd Mon Sep 17 00:00:00 2001 From: RubenPX Date: Mon, 25 Apr 2022 11:49:11 +0200 Subject: [PATCH] filter in out trades from lots selector --- ereuse_devicehub/static/js/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/static/js/api.js b/ereuse_devicehub/static/js/api.js index 190e5d42..8163e293 100644 --- a/ereuse_devicehub/static/js/api.js +++ b/ereuse_devicehub/static/js/api.js @@ -5,7 +5,10 @@ const Api = { */ async get_lots() { const request = await this.doRequest(API_URLS.lots, "GET", null); - if (request != undefined) return request.items; + if (request != undefined) { + request.items = request.items.filter(itm => !itm.trade) // Avoid show outgoing or incomming trades + return request.items; + } throw request; },