From d10bb70da867a90b88586e002c8a01325e8b7a07 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Wed, 11 May 2022 19:07:52 +0200 Subject: [PATCH 1/3] ESLint ignore builded JS files --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index 416c47b1..8d09e126 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,5 @@ ereuse_devicehub/static/vendor ereuse_devicehub/static/js/print.pdf.js ereuse_devicehub/static/js/qrcode.js +*.build.js *.min.js \ No newline at end of file From fee1d6787ce0b7d82750f81fc41db6fb4f08545e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 12 May 2022 11:03:48 +0200 Subject: [PATCH 2/3] add column created and put order descendent from created field --- ereuse_devicehub/labels/views.py | 4 +++- ereuse_devicehub/templates/labels/label_list.html | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/labels/views.py b/ereuse_devicehub/labels/views.py index e7fc3b0d..421effcb 100644 --- a/ereuse_devicehub/labels/views.py +++ b/ereuse_devicehub/labels/views.py @@ -23,7 +23,9 @@ class TagListView(View): def dispatch_request(self): lots = Lot.query.filter(Lot.owner_id == current_user.id) - tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by(Tag.id) + tags = Tag.query.filter(Tag.owner_id == current_user.id).order_by( + Tag.created.desc() + ) context = { 'lots': lots, 'tags': tags, diff --git a/ereuse_devicehub/templates/labels/label_list.html b/ereuse_devicehub/templates/labels/label_list.html index 7d184477..4f843ea0 100644 --- a/ereuse_devicehub/templates/labels/label_list.html +++ b/ereuse_devicehub/templates/labels/label_list.html @@ -47,6 +47,7 @@ Type Provider Device + Created @@ -62,6 +63,7 @@ {% endif %} + {{ tag.created.strftime('%H:%M %d-%m-%Y') }} {% endfor %} From 0e974c0e928d5356a6bcf164d2c0deb4c38ea6f9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 12 May 2022 11:33:28 +0200 Subject: [PATCH 3/3] add tags in device list --- ereuse_devicehub/templates/inventory/device_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/templates/inventory/device_list.html b/ereuse_devicehub/templates/inventory/device_list.html index a3c13576..0f022fd6 100644 --- a/ereuse_devicehub/templates/inventory/device_list.html +++ b/ereuse_devicehub/templates/inventory/device_list.html @@ -213,7 +213,7 @@