1
0
Fork 0
forked from s3lph/matemat

fix: missing error message when scanning an unassociated barcode

This commit is contained in:
s3lph 2024-12-01 23:37:22 +01:00
parent 418cff7348
commit 4cf563ce62
Signed by untrusted user: s3lph
GPG key ID: 0AA29A52FB33CFB5
4 changed files with 18 additions and 6 deletions

View file

@ -1,5 +1,18 @@
# Matemat Changelog
<!-- BEGIN RELEASE v0.3.18 -->
## Version 0.3.18
Fix barcode error message
### Changes
<!-- BEGIN CHANGES 0.3.18 -->
- fix: missing error message when scanning an unassociated barcode
<!-- END CHANGES 0.3.18 -->
<!-- END RELEASE v0.3.18 -->
<!-- BEGIN RELEASE v0.3.17 -->
## Version 0.3.17

View file

@ -1,2 +1,2 @@
__version__ = '0.3.17'
__version__ = '0.3.18'

View file

@ -39,7 +39,7 @@ def main_page():
redirect('/')
except AuthenticationError:
# Redirect to main page on token login error
redirect('/')
pass
Notification.error(f'EAN code {request.params.ean} is not associated with any product.', decay=True)
redirect('/')

View file

@ -25,15 +25,14 @@
{% endblock %}
{% block eanwebsocket %}
let tokeninput = document.getElementById("admin-newtoken-token");
tokeninput.value = e.data;
tokeninput.select();
{% if authuser.is_admin %}
let eaninput = document.getElementById("admin-newproduct-ean");
eaninput.value = e.data;
eaninput.select();
eaninput.scrollIntoView();
{% else %}
let tokeninput = document.getElementById("admin-newtoken-token");
tokeninput.value = e.data;
tokeninput.select();
tokeninput.scrollIntoView();
{% endif %}
{% endblock %}