forked from s3lph/matemat
fix: missing error message when scanning an unassociated barcode
This commit is contained in:
parent
418cff7348
commit
4cf563ce62
4 changed files with 18 additions and 6 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
|
||||
__version__ = '0.3.17'
|
||||
__version__ = '0.3.18'
|
||||
|
|
|
@ -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('/')
|
||||
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue