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
|
# 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
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
|
||||||
__version__ = '0.3.17'
|
__version__ = '0.3.18'
|
||||||
|
|
|
@ -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('/')
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
Loading…
Reference in a new issue