fix: missing error message when scanning an unassociated barcode
All checks were successful
/ build_wheel (push) Successful in 1m58s
/ build_debian (push) Successful in 2m23s
/ test (push) Successful in 1m23s
/ codestyle (push) Successful in 4m52s

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

View file

@ -1,5 +1,18 @@
# Matemat Changelog # 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 --> <!-- BEGIN RELEASE v0.3.17 -->
## Version 0.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('/') redirect('/')
except AuthenticationError: except AuthenticationError:
# Redirect to main page on token login error # 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) Notification.error(f'EAN code {request.params.ean} is not associated with any product.', decay=True)
redirect('/') redirect('/')

View file

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