Fix: Manufacturing Purchase Order page view, filter, and save.
This commit is contained in:
140
app.log.1
140
app.log.1
@@ -1,9 +1,10 @@
|
||||
Request: 127.0.0.1 GET http /store/stock_items? Host: 127.0.0.1:5000
|
||||
Server Error: 'order' is undefined
|
||||
Request: 127.0.0.1 GET http /store/manufacturing_purchase_orders?active=true&date_from=&date_to= Host: 127.0.0.1:5000
|
||||
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
|
||||
|
||||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8
|
||||
|
||||
|
||||
Accept-Language: en-GB,en;q=0.5
|
||||
|
||||
Accept-Encoding: gzip, deflate, br, zstd
|
||||
@@ -18,86 +19,75 @@ Priority: u=0, i
|
||||
|
||||
Upgrade-Insecure-Requests: 1
|
||||
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
res = self._query(mogrified_query)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
|
||||
db.query(q)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\connections.py", line 261, in query
|
||||
_mysql.connection.query(self, query)
|
||||
MySQLdb.OperationalError: (1054, "Unknown column 'SL.id_storage_location' in 'field list'")
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items
|
||||
model = Model_View_Store_Stock_Item(form_filters)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\manufacturing_purchase_order.py", line 43, in manufacturing_purchase_orders
|
||||
return render_template('pages/store/_manufacturing_purchase_orders.html', model = model, datetime = datetime)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template
|
||||
return _render(app, template, context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render
|
||||
rv = template.render(context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render
|
||||
self.environment.handle_exception()
|
||||
self.storage_locations = self.get_many_storage_location(False)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store.py", line 499, in get_many_storage_location
|
||||
storage_locations = DataStore_Store_Base().get_many_storage_location(get_inactive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_base.py", line 236, in get_many_storage_location
|
||||
result = self.db_procedure_execute(_m_db_storage_location, argument_dict_list_storage_location)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 95, in db_procedure_execute
|
||||
result = db.session.execute(proc_string, argument_dict_list)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\scoping.py", line 778, in execute
|
||||
return self._proxied.execute(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
|
||||
return self._execute_internal(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2245, in _execute_internal
|
||||
result = conn.execute(
|
||||
^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute
|
||||
return meth(
|
||||
^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection
|
||||
return connection._execute_clauseelement(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement
|
||||
ret = self._execute_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
|
||||
return self._exec_single_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
|
||||
self._handle_dbapi_exception(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception
|
||||
raise rewrite_traceback_stack(source=source)
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_manufacturing_purchase_orders.html", line 1, in top-level template code
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
{% extends 'layouts/layout.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 354, in top-level template code
|
||||
{% block page_body %}{% endblock %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_manufacturing_purchase_orders.html", line 62, in block 'page_body'
|
||||
{% include 'components/store/_row_manufacturing_purchase_order.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_manufacturing_purchase_order.html", line 40, in top-level template code
|
||||
<tr class="{{ model.FLAG_MANUFACTURING_PURCHASE_ORDER }}" {{ model.ATTR_ID_MANUFACTURING_PURCHASE_ORDER }}="{{ order.id_order }}">
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr
|
||||
return getattr(obj, attribute)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
jinja2.exceptions.UndefinedError: 'order' is undefined
|
||||
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: production
|
||||
config_env: production
|
||||
Server Error: (MySQLdb.OperationalError) (1054, "Unknown column 'v_id_permission_manufacturing' in 'where clause'")
|
||||
[SQL: CALL p_shop_get_many_manufacturing_purchase_order(%s, %s, %s, %s, %s, %s, %s, %s)]
|
||||
[parameters: (0, True, True, '', '', None, None, 0)]
|
||||
(Background on this error at: https://sqlalche.me/e/20/e3q8)
|
||||
|
||||
187
app.log.2
187
app.log.2
@@ -1,4 +1,3 @@
|
||||
Server Error: 'NoneType' object has no attribute 'to_json'
|
||||
Request: 127.0.0.1 GET http /store/stock_items? Host: 127.0.0.1:5000
|
||||
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
|
||||
@@ -19,51 +18,159 @@ Priority: u=0, i
|
||||
|
||||
Upgrade-Insecure-Requests: 1
|
||||
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
cursor.execute(statement, parameters)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 179, in execute
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 45, in stock_items
|
||||
return render_template('pages/store/_stock_items.html', model = model, datetime = datetime)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template
|
||||
return _render(app, template, context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render
|
||||
rv = template.render(context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render
|
||||
self.environment.handle_exception()
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception
|
||||
raise rewrite_traceback_stack(source=source)
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code
|
||||
{% extends 'layouts/layout.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 354, in top-level template code
|
||||
{% block page_body %}{% endblock %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 119, in block 'page_body'
|
||||
var plants = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.plants) | tojson | safe }};
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
res = self._query(mogrified_query)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
|
||||
db.query(q)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\connections.py", line 261, in query
|
||||
_mysql.connection.query(self, query)
|
||||
MySQLdb.OperationalError: (1054, "Unknown column 'SL.id_storage_location' in 'field list'")
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items
|
||||
model = Model_View_Store_Stock_Item(form_filters)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 93, in __init__
|
||||
self.storage_locations = self.get_many_storage_location(False)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store.py", line 499, in get_many_storage_location
|
||||
storage_locations = DataStore_Store_Base().get_many_storage_location(get_inactive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_base.py", line 236, in get_many_storage_location
|
||||
result = self.db_procedure_execute(_m_db_storage_location, argument_dict_list_storage_location)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 95, in db_procedure_execute
|
||||
result = db.session.execute(proc_string, argument_dict_list)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\scoping.py", line 778, in execute
|
||||
return self._proxied.execute(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
|
||||
return self._execute_internal(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2245, in _execute_internal
|
||||
result = conn.execute(
|
||||
^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute
|
||||
return meth(
|
||||
^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection
|
||||
return connection._execute_clauseelement(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement
|
||||
ret = self._execute_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
|
||||
return self._exec_single_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
|
||||
self._handle_dbapi_exception(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 2353, in _handle_dbapi_exception
|
||||
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
cursor.execute(statement, parameters)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 179, in execute
|
||||
res = self._query(mogrified_query)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
|
||||
db.query(q)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\connections.py", line 261, in query
|
||||
_mysql.connection.query(self, query)
|
||||
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1054, "Unknown column 'SL.id_storage_location' in 'field list'")
|
||||
[SQL: CALL p_shop_get_many_storage_location(%s)]
|
||||
[parameters: (0,)]
|
||||
(Background on this error at: https://sqlalche.me/e/20/e3q8)
|
||||
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
|
||||
156
app.log.3
156
app.log.3
@@ -1,52 +1,3 @@
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\product_permutation.py", line 47, in permutations
|
||||
return render_template('pages/store/_product_permutations.html', model = model)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template
|
||||
return _render(app, template, context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render
|
||||
rv = template.render(context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render
|
||||
self.environment.handle_exception()
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception
|
||||
raise rewrite_traceback_stack(source=source)
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_product_permutations.html", line 1, in top-level template code
|
||||
{% extends 'layouts/layout.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 354, in top-level template code
|
||||
{% block page_body %}{% endblock %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_product_permutations.html", line 134, in block 'page_body'
|
||||
{% include 'components/store/_row_product_permutation.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_product_permutation.html", line 168, in top-level template code
|
||||
{% set active = variation_type.active %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr
|
||||
return getattr(obj, attribute)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
jinja2.exceptions.UndefinedError: 'variation_type' is undefined
|
||||
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
Server Error: 'NoneType' object has no attribute 'to_json'
|
||||
Request: 127.0.0.1 GET http /store/stock_items? Host: 127.0.0.1:5000
|
||||
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
|
||||
@@ -67,43 +18,86 @@ Priority: u=0, i
|
||||
|
||||
Upgrade-Insecure-Requests: 1
|
||||
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
cursor.execute(statement, parameters)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 179, in execute
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 45, in stock_items
|
||||
return render_template('pages/store/_stock_items.html', model = model, datetime = datetime)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template
|
||||
return _render(app, template, context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render
|
||||
rv = template.render(context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render
|
||||
self.environment.handle_exception()
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception
|
||||
raise rewrite_traceback_stack(source=source)
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_stock_items.html", line 1, in top-level template code
|
||||
{% extends 'layouts/layout.html' %}
|
||||
res = self._query(mogrified_query)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
|
||||
db.query(q)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\connections.py", line 261, in query
|
||||
_mysql.connection.query(self, query)
|
||||
MySQLdb.OperationalError: (1054, "Unknown column 'SL.id_storage_location' in 'field list'")
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items
|
||||
model = Model_View_Store_Stock_Item(form_filters)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_stock_item.py", line 93, in __init__
|
||||
self.storage_locations = self.get_many_storage_location(False)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store.py", line 499, in get_many_storage_location
|
||||
storage_locations = DataStore_Store_Base().get_many_storage_location(get_inactive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_base.py", line 236, in get_many_storage_location
|
||||
result = self.db_procedure_execute(_m_db_storage_location, argument_dict_list_storage_location)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 95, in db_procedure_execute
|
||||
result = db.session.execute(proc_string, argument_dict_list)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\scoping.py", line 778, in execute
|
||||
return self._proxied.execute(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
|
||||
return self._execute_internal(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2245, in _execute_internal
|
||||
result = conn.execute(
|
||||
^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute
|
||||
return meth(
|
||||
^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection
|
||||
return connection._execute_clauseelement(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement
|
||||
ret = self._execute_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
|
||||
return self._exec_single_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
|
||||
self._handle_dbapi_exception(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 2353, in _handle_dbapi_exception
|
||||
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
cursor.execute(statement, parameters)
|
||||
|
||||
@@ -228,8 +228,8 @@ class Manufacturing_Purchase_Order_Product_Link(db.Model, Store_Base):
|
||||
link.id_unit_latency_manufacture = json[cls.ATTR_ID_UNIT_MEASUREMENT_LATENCY_MANUFACTURE]
|
||||
link.latency_manufacture = json[cls.FLAG_LATENCY_MANUFACTURE]
|
||||
link.display_order = json[cls.FLAG_DISPLAY_ORDER]
|
||||
link.cost_unit_local_VAT_excl = json[cls.FLAG_COST_UNIT_LOCAL_VAT_EXCL]
|
||||
link.cost_unit_local_VAT_incl = json[cls.FLAG_COST_UNIT_LOCAL_VAT_INCL]
|
||||
link.cost_unit_local_VAT_excl = json.get(cls.FLAG_COST_UNIT_LOCAL_VAT_EXCL, None)
|
||||
link.cost_unit_local_VAT_incl = json.get(cls.FLAG_COST_UNIT_LOCAL_VAT_INCL, None)
|
||||
link.active = json[cls.FLAG_ACTIVE]
|
||||
return link
|
||||
|
||||
@@ -292,7 +292,7 @@ class Manufacturing_Purchase_Order_Product_Link_Temp(db.Model, Store_Base):
|
||||
id_temp: int = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
id_link: int = db.Column(db.Integer)
|
||||
id_order: int = db.Column(db.Integer)
|
||||
id_category: int = db.Column(db.Integer)
|
||||
# id_category: int = db.Column(db.Integer)
|
||||
id_product: int = db.Column(db.Integer)
|
||||
id_permutation: int = db.Column(db.Integer)
|
||||
csv_list_variations: str = db.Column(db.String)
|
||||
@@ -318,7 +318,7 @@ class Manufacturing_Purchase_Order_Product_Link_Temp(db.Model, Store_Base):
|
||||
row = cls()
|
||||
row.id_link = manufacturing_purchase_order_product_link.id_link
|
||||
row.id_order = manufacturing_purchase_order_product_link.id_order
|
||||
row.id_category = manufacturing_purchase_order_product_link.id_category
|
||||
# row.id_category = manufacturing_purchase_order_product_link.id_category
|
||||
row.id_product = manufacturing_purchase_order_product_link.id_product
|
||||
row.id_permutation = manufacturing_purchase_order_product_link.id_permutation
|
||||
row.csv_list_variations = manufacturing_purchase_order_product_link.csv_id_pairs_variation
|
||||
@@ -340,7 +340,6 @@ class Manufacturing_Purchase_Order_Product_Link_Temp(db.Model, Store_Base):
|
||||
return f'''
|
||||
id_link: {self.id_link}
|
||||
id_order: {self.id_order}
|
||||
id_category: {self.id_category}
|
||||
id_product: {self.id_product}
|
||||
id_permutation: {self.id_permutation}
|
||||
csv_list_variations: {self.csv_list_variations}
|
||||
|
||||
Binary file not shown.
@@ -100,6 +100,7 @@ class Model_View_Base(BaseModel, ABC):
|
||||
FLAG_NAME_ATTR_OPTION_TEXT: ClassVar[str] = Base.FLAG_NAME_ATTR_OPTION_TEXT
|
||||
FLAG_NAME_ATTR_OPTION_VALUE: ClassVar[str] = Base.FLAG_NAME_ATTR_OPTION_VALUE
|
||||
FLAG_NAME_PLURAL: ClassVar[str] = Base.FLAG_NAME_PLURAL
|
||||
# FLAG_NAME_SINGULAR: ClassVar[str] = Base.FLAG_NAME_SINGULAR
|
||||
FLAG_NAV_ADMIN_HOME: ClassVar[str] = 'navAdminHome'
|
||||
FLAG_NAV_ADMIN_STORE_STRIPE_PRICES: ClassVar[str] = 'navAdminStoreStripePrices'
|
||||
FLAG_NAV_ADMIN_STORE_STRIPE_PRODUCTS: ClassVar[str] = 'navAdminStoreStripeProducts'
|
||||
|
||||
@@ -114,7 +114,7 @@ BEGIN
|
||||
, price_total_local_VAT_incl FLOAT NULL
|
||||
, has_order BIT NULL
|
||||
, is_new BIT NOT NULL
|
||||
, name_error VARCHAR(1000) NOT NULL
|
||||
, name_error VARCHAR(1000) NULL
|
||||
);
|
||||
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_Msg_Error (
|
||||
@@ -170,7 +170,6 @@ BEGIN
|
||||
, price_unit_local_VAT_incl
|
||||
, has_order
|
||||
, is_new
|
||||
, name_error
|
||||
)
|
||||
SELECT
|
||||
IFNULL(MPOPL_T.id_link, 0) AS id_link
|
||||
|
||||
@@ -282,13 +282,13 @@ BEGIN
|
||||
VALUES (
|
||||
v_id_type_error_no_permission
|
||||
, v_code_type_error_no_permission
|
||||
, CONCAT('You do not have view permissions for ', (SELECT name FROM partsltd_prod.Shop_Permission WHERE id_permission = v_id_permission_manufacturing LIMIT 1))
|
||||
, CONCAT('You do not have view permissions for ', IFNULL((SELECT IFNULL(name, '(No Permission Name)') FROM partsltd_prod.Shop_Permission WHERE id_permission LIKE CONCAT('%', v_ids_permission_manufacturing_purchase_order, '%') LIMIT 1), '(No Permissions Found)'))
|
||||
)
|
||||
;
|
||||
END IF;
|
||||
|
||||
IF EXISTS ( SELECT * FROM tmp_Msg_Error LIMIT 1 ) THEN
|
||||
DELETE FROM tmp_Manufacturing_Purchase_Order_Product_Link;
|
||||
-- DELETE FROM tmp_Manufacturing_Purchase_Order_Product_Link;
|
||||
DELETE FROM tmp_Manufacturing_Purchase_Order;
|
||||
END IF;
|
||||
|
||||
@@ -339,6 +339,8 @@ BEGIN
|
||||
SELECT
|
||||
MPOPL.id_link
|
||||
, MPOPL.id_order
|
||||
, P.id_category
|
||||
, P.id_product
|
||||
, MPOPL.id_permutation
|
||||
, fn_shop_get_product_permutation_name(MPOPL.id_permutation) AS name_permutation
|
||||
, fn_shop_get_product_permutation_variations_csv(MPOPL.id_permutation) AS csv_id_pairs_variation
|
||||
@@ -354,7 +356,9 @@ BEGIN
|
||||
, MPOPL.price_unit_local_VAT_incl
|
||||
, MPOPL.active
|
||||
FROM tmp_Manufacturing_Purchase_Order t_MPO
|
||||
INNER JOIN partsltd_prod.Shop_Manufacturing_Purchase_Order_Product_Link MPOPL ON t_MPO.id_order = MPOPL.id_order
|
||||
INNER JOIN partsltd_prod.Shop_Manufacturing_Purchase_Order_Product_Link MPOPL ON t_MPO.id_order = MPOPL.id_order
|
||||
LEFT JOIN partsltd_prod.Shop_Product_Permutation PP ON MPOPL.id_permutation = PP.id_permutation
|
||||
LEFT JOIN partsltd_prod.Shop_Product P ON PP.id_product = P.id_product
|
||||
;
|
||||
|
||||
# Errors
|
||||
@@ -384,9 +388,9 @@ DELIMITER ;;
|
||||
/*
|
||||
|
||||
CALL p_shop_get_many_manufacturing_purchase_order (
|
||||
1 # a_id_user
|
||||
0 # a_id_user
|
||||
, 1 # a_get_all_order
|
||||
, 0 # a_get_inactive_order
|
||||
, 1 # a_get_inactive_order
|
||||
, '' # a_ids_order
|
||||
, '' # a_ids_permutation
|
||||
, NULL # a_date_from
|
||||
|
||||
264
static/dist/js/main.bundle.js
vendored
264
static/dist/js/main.bundle.js
vendored
@@ -2211,6 +2211,73 @@ var BusinessObjects = /*#__PURE__*/function () {
|
||||
}]);
|
||||
}();
|
||||
|
||||
;// CONCATENATED MODULE: ./static/js/lib/business_objects/store/product_permutation.js
|
||||
function product_permutation_typeof(o) { "@babel/helpers - typeof"; return product_permutation_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, product_permutation_typeof(o); }
|
||||
function product_permutation_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
function product_permutation_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, product_permutation_toPropertyKey(o.key), o); } }
|
||||
function product_permutation_createClass(e, r, t) { return r && product_permutation_defineProperties(e.prototype, r), t && product_permutation_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||||
function product_permutation_toPropertyKey(t) { var i = product_permutation_toPrimitive(t, "string"); return "symbol" == product_permutation_typeof(i) ? i : i + ""; }
|
||||
function product_permutation_toPrimitive(t, r) { if ("object" != product_permutation_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != product_permutation_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
var ProductPermutation = /*#__PURE__*/function () {
|
||||
function ProductPermutation() {
|
||||
product_permutation_classCallCheck(this, ProductPermutation);
|
||||
}
|
||||
return product_permutation_createClass(ProductPermutation, null, [{
|
||||
key: "getProductVariationsFromIdCsv",
|
||||
value: function getProductVariationsFromIdCsv(csvVariations) {
|
||||
var productVariations = [];
|
||||
if (!csvVariations) return productVariations;
|
||||
var variationPairs = csvVariations.split(',');
|
||||
if (variationPairs.length == 0) return productVariations;
|
||||
var parts;
|
||||
variationPairs.forEach(function (variationPair) {
|
||||
parts = variationPair.split(':');
|
||||
if (parts.length == 2) {
|
||||
var productVariationType = productVariationTypes[parts[0]];
|
||||
productVariationType[flagProductVariations].some(function (productVariation) {
|
||||
if (productVariation[attrIdProductVariation] == parts[1]) {
|
||||
productVariations.push([productVariationType, productVariation]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
return productVariations;
|
||||
}
|
||||
}, {
|
||||
key: "getProductVariationsPreviewFromIdCsv",
|
||||
value: function getProductVariationsPreviewFromIdCsv(csvVariations) {
|
||||
var variationPairs = ProductPermutation.getProductVariationsFromIdCsv(csvVariations);
|
||||
var preview = '';
|
||||
if (variationPairs.length == 0) return preview;
|
||||
var variationType, variation;
|
||||
variationPairs.forEach(function (variationPair) {
|
||||
if (preview.length > 0) {
|
||||
preview += '\n';
|
||||
}
|
||||
variationType = variationPair[0];
|
||||
variation = variationPair[1];
|
||||
preview += variationType[flagName] + ': ' + variation[flagName];
|
||||
});
|
||||
return preview;
|
||||
}
|
||||
}, {
|
||||
key: "getProductVariationsIdCsvFromVariationTypeList",
|
||||
value: function getProductVariationsIdCsvFromVariationTypeList(variationTypeList) {
|
||||
var csvVariations = '';
|
||||
if (Validation.isEmpty(variationTypeList)) return csvVariations;
|
||||
variationTypeList.forEach(function (variationType) {
|
||||
if (csvVariations.length > 0) {
|
||||
csvVariations += ',';
|
||||
}
|
||||
csvVariations += variationType[attrIdProductVariationType] + ':' + variationType[flagProductVariations][0][attrIdProductVariation];
|
||||
});
|
||||
return csvVariations;
|
||||
}
|
||||
}]);
|
||||
}();
|
||||
|
||||
;// CONCATENATED MODULE: ./static/js/lib/utils.js
|
||||
function utils_typeof(o) { "@babel/helpers - typeof"; return utils_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, utils_typeof(o); }
|
||||
function utils_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
@@ -3378,6 +3445,19 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
|
||||
value: function hookupCurrencyFields() {
|
||||
this.hookupTableCellDdlPreviews(idTableMain + ' td.' + flagCurrency, Utils.getListFromDict(currencies));
|
||||
}
|
||||
}, {
|
||||
key: "createTdActive",
|
||||
value: function createTdActive(isActive) {
|
||||
var tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
var buttonActive = document.createElement("button");
|
||||
buttonActive.classList.add(flagActive);
|
||||
buttonActive.classList.add(isActive ? flagDelete : flagAdd);
|
||||
buttonActive.textContent = isActive ? 'x' : '+';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(buttonActive, isActive);
|
||||
tdActive.appendChild(buttonActive);
|
||||
return tdActive;
|
||||
}
|
||||
}, {
|
||||
key: "leave",
|
||||
value: function leave() {
|
||||
@@ -4068,6 +4148,7 @@ function manufacturing_purchase_orders_toPrimitive(t, r) { if ("object" != manuf
|
||||
|
||||
|
||||
|
||||
|
||||
var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
function PageStoreManufacturingPurchaseOrders(router) {
|
||||
var _this;
|
||||
@@ -4104,7 +4185,7 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var inputPriceTotalLocalVatExcl = row.querySelector('td.' + flagPriceTotalLocalVatExcl + ' input');
|
||||
var inputPriceTotalLocalVatIncl = row.querySelector('td.' + flagPriceTotalLocalVatIncl + ' input');
|
||||
var trsPurchaseOrderItem = row.querySelectorAll('tr.' + flagOrderItems);
|
||||
var checkboxActive = row.querySelector('td.' + flagActive + ' textarea');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdManufacturingPurchaseOrder] = row.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
jsonRow[attrIdCurrency] = DOM.getElementAttributeValueCurrent(tdCurrency);
|
||||
@@ -4119,7 +4200,7 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
});
|
||||
}
|
||||
jsonRow[flagOrderItems] = orderItems;
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -4132,8 +4213,10 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var tdUnitQuantity = tr.querySelector('td.' + flagUnitMeasurementQuantity);
|
||||
var inputQuantityUsed = tr.querySelector('td.' + flagQuantityUsed + ' input');
|
||||
var inputQuantityProduced = tr.querySelector('td.' + flagQuantityProduced + ' input');
|
||||
var tdUnitMeasurementLatencyManufacture = tr.querySelector('td.' + flagUnitMeasurementLatencyManufacture);
|
||||
var inputLatencyManufacture = tr.querySelector('td.' + flagLatencyManufacture + ' input');
|
||||
var checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
debugger;
|
||||
var buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdManufacturingPurchaseOrder] = tr.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
jsonRow[attrIdManufacturingPurchaseOrderProductLink] = tr.getAttribute(attrIdManufacturingPurchaseOrderProductLink);
|
||||
@@ -4144,8 +4227,9 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
jsonRow[attrIdUnitMeasurementQuantity] = DOM.getElementAttributeValueCurrent(tdUnitQuantity);
|
||||
jsonRow[flagQuantityUsed] = DOM.getElementAttributeValueCurrent(inputQuantityUsed);
|
||||
jsonRow[flagQuantityProduced] = DOM.getElementAttributeValueCurrent(inputQuantityProduced);
|
||||
jsonRow[attrIdUnitMeasurementLatencyManufacture] = DOM.getElementAttributeValueCurrent(tdUnitMeasurementLatencyManufacture);
|
||||
jsonRow[flagLatencyManufacture] = DOM.getElementAttributeValueCurrent(inputLatencyManufacture);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -4205,9 +4289,10 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
}
|
||||
this.toggleColumnHeaderCollapsed(flagOrderItems, false);
|
||||
element.classList.remove(flagCollapsed);
|
||||
debugger;
|
||||
var row = DOM.getRowFromElement(element);
|
||||
var idManufacturingPurchaseOrder = row.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
var manufacturingPurchaseOrderProductLinksList = idManufacturingPurchaseOrder > 0 ? manufacturingPurchaseOrderProductLinks[idManufacturingPurchaseOrder] : [];
|
||||
var manufacturingPurchaseOrder = idManufacturingPurchaseOrder > 0 ? manufacturingPurchaseOrders[idManufacturingPurchaseOrder] : manufacturing_purchase_orders_defineProperty({}, flagOrderItems, []);
|
||||
var tblOrderItems = document.createElement("table");
|
||||
tblOrderItems.classList.add(flagOrderItems);
|
||||
var thead = document.createElement("thead");
|
||||
@@ -4283,7 +4368,7 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
thead.appendChild(tr);
|
||||
tblOrderItems.appendChild(thead);
|
||||
var tbody = document.createElement("tbody");
|
||||
manufacturingPurchaseOrderProductLinksList.forEach(function (orderItem, index) {
|
||||
manufacturingPurchaseOrder[flagOrderItems].forEach(function (orderItem, index) {
|
||||
_this4.addRowManufacturingPurchaseOrderItem(tbody, orderItem);
|
||||
});
|
||||
tblOrderItems.appendChild(tbody);
|
||||
@@ -4303,6 +4388,7 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
if (_verbose) {
|
||||
console.log("addRowManufacturingPurchaseOrderItem: ", orderItem);
|
||||
}
|
||||
debugger;
|
||||
var tdDisplayOrder = document.createElement("td");
|
||||
tdDisplayOrder.classList.add(flagDisplayOrder);
|
||||
var inputDisplayOrder = document.createElement("input");
|
||||
@@ -4317,7 +4403,8 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var divCategory = document.createElement("div");
|
||||
divCategory.classList.add(flagProductCategory);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divCategory, orderItem[attrIdProductCategory]);
|
||||
divCategory.textContent = orderItem[flagProductCategory];
|
||||
var productCategory = productCategories[orderItem[attrIdProductCategory]];
|
||||
divCategory.textContent = BusinessObjects.getObjectText(productCategory);
|
||||
tdCategory.appendChild(divCategory);
|
||||
var tdProduct = document.createElement("td");
|
||||
tdProduct.classList.add(flagProduct);
|
||||
@@ -4325,7 +4412,8 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var divProduct = document.createElement("div");
|
||||
divProduct.classList.add(flagProduct);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divProduct, orderItem[attrIdProduct]);
|
||||
divProduct.textContent = orderItem[flagProduct];
|
||||
var product = products[orderItem[attrIdProduct]];
|
||||
divProduct.textContent = BusinessObjects.getObjectText(product);
|
||||
tdProduct.appendChild(divProduct);
|
||||
var tdVariations = document.createElement("td");
|
||||
tdVariations.classList.add(flagProductVariations);
|
||||
@@ -4334,7 +4422,8 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var divVariations = document.createElement("div");
|
||||
divVariations.classList.add(flagProductVariations);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divVariations, orderItem[attrIdProductVariation]);
|
||||
divVariations.textContent = orderItem[flagProductVariations];
|
||||
var variationsText = ProductPermutation.getProductVariationsPreviewFromIdCsv(orderItem[flagProductVariations]);
|
||||
divVariations.textContent = variationsText;
|
||||
tdVariations.appendChild(divVariations);
|
||||
var tdUnitQuantity = document.createElement("td");
|
||||
tdUnitQuantity.classList.add(flagUnitMeasurementQuantity);
|
||||
@@ -4342,20 +4431,22 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var divUnitQuantity = document.createElement("div");
|
||||
divUnitQuantity.classList.add(flagUnitMeasurementQuantity);
|
||||
// DOM.setElementValuesCurrentAndPrevious(divUnitQuantity, orderItem[flagUnitMeasurementQuantity]);
|
||||
var unitQuantity = unitMeasurements[orderItem[attrIdUnitMeasurementQuantity]];
|
||||
divUnitQuantity.textContent = BusinessObjects.getObjectText(unitQuantity);
|
||||
tdUnitQuantity.appendChild(divUnitQuantity);
|
||||
var tdQuantityUsed = document.createElement("td");
|
||||
tdQuantityUsed.classList.add(flagQuantityUsed);
|
||||
var inputQuantityUsed = document.createElement("input");
|
||||
inputQuantityUsed.classList.add(flagQuantityUsed);
|
||||
inputQuantityUsed.type = 'number';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputQuantityUsed, orderItem[flagQuantityUsed]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputQuantityUsed, orderItem[flagQuantityUsed]);
|
||||
tdQuantityUsed.appendChild(inputQuantityUsed);
|
||||
var tdQuantityProduced = document.createElement("td");
|
||||
tdQuantityProduced.classList.add(flagQuantityProduced);
|
||||
var inputQuantityProduced = document.createElement("input");
|
||||
inputQuantityProduced.classList.add(flagQuantityProduced);
|
||||
inputQuantityProduced.type = 'number';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputQuantityProduced, orderItem[flagQuantityProduced]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputQuantityProduced, orderItem[flagQuantityProduced]);
|
||||
tdQuantityProduced.appendChild(inputQuantityProduced);
|
||||
|
||||
/*
|
||||
@@ -4395,6 +4486,8 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
var divUnitMeasurementLatencyManufacture = document.createElement("div");
|
||||
divUnitMeasurementLatencyManufacture.classList.add(flagUnitMeasurementLatencyManufacture);
|
||||
// DOM.setElementValuesCurrentAndPrevious(divUnitMeasurementLatencyManufacture, orderItem[flagUnitMeasurementLatencyManufacture]);
|
||||
var unitMeasurementLatencyManufacture = unitMeasurementsTime[orderItem[attrIdUnitMeasurementLatencyManufacture]];
|
||||
divUnitMeasurementLatencyManufacture.textContent = BusinessObjects.getObjectText(unitMeasurementLatencyManufacture);
|
||||
tdUnitMeasurementLatencyManufacture.appendChild(divUnitMeasurementLatencyManufacture);
|
||||
var tdLatencyManufacture = document.createElement("td");
|
||||
tdLatencyManufacture.classList.add(flagLatencyManufacture);
|
||||
@@ -4402,21 +4495,9 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
inputLatencyManufacture.classList.add(flagLatencyManufacture);
|
||||
inputLatencyManufacture.type = 'number';
|
||||
inputLatencyManufacture.step = 1;
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputLatencyManufacture, orderItem[flagLatencyManufacture]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputLatencyManufacture, orderItem[flagLatencyManufacture]);
|
||||
tdLatencyManufacture.appendChild(inputLatencyManufacture);
|
||||
var tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
var checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, orderItem[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
var tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
var buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
var tdActive = this.createTdActive(orderItem[flagActive]);
|
||||
var tr = document.createElement("tr");
|
||||
tr.classList.add(flagOrderItems);
|
||||
tr.setAttribute(attrIdManufacturingPurchaseOrder, orderItem[attrIdManufacturingPurchaseOrder]);
|
||||
@@ -4437,7 +4518,6 @@ var PageStoreManufacturingPurchaseOrders = /*#__PURE__*/function (_TableBasePage
|
||||
tr.appendChild(tdUnitMeasurementLatencyManufacture);
|
||||
tr.appendChild(tdLatencyManufacture);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
}, {
|
||||
@@ -4692,7 +4772,7 @@ var PageStoreProductCategories = /*#__PURE__*/function (_TableBasePage) {
|
||||
var textareaName = row.querySelector('td.' + flagName + ' textarea');
|
||||
var textareaDescription = row.querySelector('td.' + flagDescription + ' textarea');
|
||||
var tdAccessLevel = row.querySelector('td.' + flagAccessLevel);
|
||||
var inputActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonCategory = {};
|
||||
jsonCategory[attrIdProductCategory] = row.getAttribute(attrIdProductCategory);
|
||||
jsonCategory[flagCode] = DOM.getElementAttributeValueCurrent(textareaCode);
|
||||
@@ -4700,7 +4780,7 @@ var PageStoreProductCategories = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonCategory[flagDescription] = DOM.getElementAttributeValueCurrent(textareaDescription);
|
||||
// jsonCategory[flagAccessLevelRequired] = tdAccessLevel.getAttribute(flagAccessLevelRequired);
|
||||
jsonCategory[attrIdAccessLevel] = DOM.getElementAttributeValueCurrent(tdAccessLevel);
|
||||
jsonCategory[flagActive] = DOM.getElementAttributeValueCurrent(inputActive);
|
||||
jsonCategory[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
jsonCategory[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(sliderDisplayOrder);
|
||||
return jsonCategory;
|
||||
}
|
||||
@@ -4938,7 +5018,7 @@ var PageStoreProductPermutations = /*#__PURE__*/function (_TableBasePage) {
|
||||
var checkboxDoesExpireFasterOnceUnsealed = row.querySelector('td.' + flagDoesExpireFasterOnceUnsealed + ' input');
|
||||
var inputCountIntervalExpirationUnsealed = row.querySelector('td.' + flagCountUnitMeasurementIntervalExpirationUnsealed + ' input');
|
||||
var tdUnitMeasurementIntervalExpirationUnsealed = row.querySelector('td.' + flagUnitMeasurementIntervalExpirationUnsealed);
|
||||
var checkboxActive = row.querySelector('td.' + flagActive + ' input');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdProductPermutation] = row.getAttribute(attrIdProductPermutation);
|
||||
jsonRow[attrIdProductCategory] = tdProductCategory.getAttribute(attrValueCurrent);
|
||||
@@ -4963,7 +5043,7 @@ var PageStoreProductPermutations = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonRow[flagDoesExpireFasterOnceUnsealed] = checkboxDoesExpireFasterOnceUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagCountUnitMeasurementIntervalExpirationUnsealed] = inputCountIntervalExpirationUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagUnitMeasurementIntervalExpirationUnsealed] = tdUnitMeasurementIntervalExpirationUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = checkboxActive.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -5292,7 +5372,7 @@ var PageStoreProducts = /*#__PURE__*/function (_TableBasePage) {
|
||||
// let tdProductVariations = row.querySelector('td.' + flagProductVariations);
|
||||
var inputHasVariations = row.querySelector('td.' + flagHasVariations + ' input[type="checkbox"]');
|
||||
var tdAccessLevel = row.querySelector('td.' + flagAccessLevel);
|
||||
var inputActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonProduct = {};
|
||||
jsonProduct[attrIdProduct] = row.getAttribute(attrIdProduct);
|
||||
jsonProduct[attrIdProductCategory] = DOM.getElementAttributeValueCurrent(tdProductCategory);
|
||||
@@ -5302,7 +5382,7 @@ var PageStoreProducts = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonProduct[flagHasVariations] = DOM.getElementAttributeValueCurrent(inputHasVariations);
|
||||
// jsonProduct[flagAccessLevelRequired] = tdAccessLevel.getAttribute(flagAccessLevelRequired);
|
||||
jsonProduct[attrIdAccessLevel] = DOM.getElementAttributeValueCurrent(tdAccessLevel);
|
||||
jsonProduct[flagActive] = DOM.getElementAttributeValueCurrent(inputActive);
|
||||
jsonProduct[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
jsonProduct[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(sliderDisplayOrder);
|
||||
return jsonProduct;
|
||||
}
|
||||
@@ -5434,7 +5514,7 @@ var PageStoreProductVariations = /*#__PURE__*/function (_TableBasePage) {
|
||||
var textareaName = row.querySelector('td.' + flagName + ' textarea');
|
||||
var textareaNamePlural = row.querySelector('td.' + flagNamePlural + ' textarea');
|
||||
var tdProductVariations = row.querySelector('td.' + flagProductVariations);
|
||||
var buttonActive = row.querySelector('td.' + flagActive + ' button');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdProductVariationType] = row.getAttribute(attrIdProductVariationType);
|
||||
if (validation_Validation.isEmpty(jsonRow[attrIdProductVariationType])) jsonRow[attrIdProductVariationType] = -1;
|
||||
@@ -5464,7 +5544,7 @@ var PageStoreProductVariations = /*#__PURE__*/function (_TableBasePage) {
|
||||
var textareaCode = tr.querySelector('td.' + flagCode + ' textarea');
|
||||
var textareaName = tr.querySelector('td.' + flagName + ' textarea');
|
||||
// let checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
var buttonActive = tr.querySelector('td.' + flagActive + ' button');
|
||||
var buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdProductVariation] = tr.getAttribute(attrIdProductVariation);
|
||||
if (validation_Validation.isEmpty(jsonRow[attrIdProductVariation])) jsonRow[attrIdProductVariation] = -1 - indexRow;
|
||||
@@ -5596,14 +5676,7 @@ var PageStoreProductVariations = /*#__PURE__*/function (_TableBasePage) {
|
||||
textareaName.classList.add(flagName);
|
||||
DOM.setElementValuesCurrentAndPrevious(textareaName, productVariation[flagName]);
|
||||
tdName.appendChild(textareaName);
|
||||
var tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
var buttonActive = document.createElement("button");
|
||||
buttonActive.classList.add(flagActive);
|
||||
buttonActive.classList.add(productVariation[flagActive] ? flagDelete : flagAdd);
|
||||
buttonActive.textContent = productVariation[flagActive] ? 'x' : '+';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(buttonActive, productVariation[flagActive]);
|
||||
tdActive.appendChild(buttonActive);
|
||||
var tdActive = this.createTdActive(productVariation[flagActive]);
|
||||
var tr = document.createElement("tr");
|
||||
tr.classList.add(flagProductVariation);
|
||||
tr.setAttribute(attrIdProductVariationType, productVariation[attrIdProductVariationType]);
|
||||
@@ -5776,7 +5849,7 @@ var PageStoreStockItems = /*#__PURE__*/function (_TableBasePage) {
|
||||
var inputDateExpiration = row.querySelector('td.' + flagDateExpiration + ' input');
|
||||
var inputIsConsumed = row.querySelector('td.' + flagIsConsumed + ' input');
|
||||
var inputDateConsumed = row.querySelector('td.' + flagDateConsumed + ' input');
|
||||
var checkboxActive = row.querySelector('td.' + flagActive + ' input');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdStockItem] = row.getAttribute(attrIdStockItem);
|
||||
jsonRow[attrIdProductPermutation] = tdProductVariations.getAttribute(attrIdProductPermutation);
|
||||
@@ -5795,7 +5868,7 @@ var PageStoreStockItems = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonRow[flagDateExpiration] = DOM.getElementAttributeValueCurrent(inputDateExpiration);
|
||||
jsonRow[flagIsConsumed] = DOM.getElementAttributeValueCurrent(inputIsConsumed);
|
||||
jsonRow[flagDateConsumed] = DOM.getElementAttributeValueCurrent(inputDateConsumed);
|
||||
jsonRow[flagActive] = checkboxActive.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -6151,7 +6224,7 @@ var PageStoreSuppliers = /*#__PURE__*/function (_TableBasePage) {
|
||||
var textareaEmail = row.querySelector('td.' + flagEmail + ' textarea');
|
||||
var textareaWebsite = row.querySelector('td.' + flagWebsite + ' textarea');
|
||||
var tdCurrency = row.querySelector('td.' + flagCurrency);
|
||||
var checkboxActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
var buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdSupplier] = row.getAttribute(attrIdSupplier);
|
||||
jsonRow[flagNameCompany] = DOM.getElementAttributeValueCurrent(textareaNameCompany);
|
||||
@@ -6164,7 +6237,7 @@ var PageStoreSuppliers = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonRow[flagEmail] = DOM.getElementAttributeValueCurrent(textareaEmail);
|
||||
jsonRow[flagWebsite] = DOM.getElementAttributeValueCurrent(textareaWebsite);
|
||||
jsonRow[attrIdCurrency] = DOM.getElementAttributeValueCurrent(tdCurrency);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -6366,19 +6439,7 @@ var PageStoreSuppliers = /*#__PURE__*/function (_TableBasePage) {
|
||||
});
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlRegion, region[attrIdRegion]);
|
||||
tdRegion.appendChild(ddlRegion);
|
||||
var tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
var checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, supplierAddress[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
var tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
var buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
var tdActive = this.createTdActive(supplierAddress[flagActive]);
|
||||
var tr = document.createElement("tr");
|
||||
tr.setAttribute(attrIdSupplierAddress, supplierAddress[attrIdSupplierAddress]);
|
||||
tr.setAttribute(attrIdSupplier, supplierAddress[attrIdSupplier]);
|
||||
@@ -6389,7 +6450,6 @@ var PageStoreSuppliers = /*#__PURE__*/function (_TableBasePage) {
|
||||
tr.appendChild(tdCounty);
|
||||
tr.appendChild(tdRegion);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
}, {
|
||||
@@ -6532,67 +6592,6 @@ var PageStoreSuppliers = /*#__PURE__*/function (_TableBasePage) {
|
||||
suppliers_defineProperty(PageStoreSuppliers, "hash", hashPageStoreSuppliers);
|
||||
suppliers_defineProperty(PageStoreSuppliers, "attrIdRowObject", attrIdSupplier);
|
||||
|
||||
;// CONCATENATED MODULE: ./static/js/lib/business_objects/store/product_permutation.js
|
||||
function product_permutation_typeof(o) { "@babel/helpers - typeof"; return product_permutation_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, product_permutation_typeof(o); }
|
||||
function product_permutation_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
function product_permutation_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, product_permutation_toPropertyKey(o.key), o); } }
|
||||
function product_permutation_createClass(e, r, t) { return r && product_permutation_defineProperties(e.prototype, r), t && product_permutation_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||||
function product_permutation_toPropertyKey(t) { var i = product_permutation_toPrimitive(t, "string"); return "symbol" == product_permutation_typeof(i) ? i : i + ""; }
|
||||
function product_permutation_toPrimitive(t, r) { if ("object" != product_permutation_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != product_permutation_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||||
var ProductPermutation = /*#__PURE__*/function () {
|
||||
function ProductPermutation() {
|
||||
product_permutation_classCallCheck(this, ProductPermutation);
|
||||
}
|
||||
return product_permutation_createClass(ProductPermutation, null, [{
|
||||
key: "getProductVariationsFromIdCsv",
|
||||
value: function getProductVariationsFromIdCsv(csvVariations) {
|
||||
var productVariations = [];
|
||||
if (!csvVariations) return productVariations;
|
||||
var variationPairs = csvVariations.split(',');
|
||||
if (variationPairs.length == 0) return productVariations;
|
||||
var parts;
|
||||
variationPairs.forEach(function (variationPair) {
|
||||
parts = variationPair.split(':');
|
||||
if (parts.length == 2) {
|
||||
var productVariationType = productVariationTypes[parts[0]];
|
||||
var productVariation = productVariations[parts[1]];
|
||||
if (productVariationType && productVariation) {
|
||||
productVariations.push([productVariationType, productVariation]);
|
||||
}
|
||||
}
|
||||
});
|
||||
return productVariations;
|
||||
}
|
||||
}, {
|
||||
key: "getProductVariationsPreviewFromIdCsv",
|
||||
value: function getProductVariationsPreviewFromIdCsv(csvVariations) {
|
||||
var variations = ProductPermutation.getProductVariationsFromIdCsv(csvVariations);
|
||||
var preview = '';
|
||||
if (variations.length == 0) return preview;
|
||||
variations.forEach(function (variation) {
|
||||
if (preview.length > 0) {
|
||||
preview += '\n';
|
||||
}
|
||||
preview += variation[0] + ': ' + variation[1] + ', ';
|
||||
});
|
||||
return preview;
|
||||
}
|
||||
}, {
|
||||
key: "getProductVariationsIdCsvFromVariationTypeList",
|
||||
value: function getProductVariationsIdCsvFromVariationTypeList(variationTypeList) {
|
||||
var csvVariations = '';
|
||||
if (Validation.isEmpty(variationTypeList)) return csvVariations;
|
||||
variationTypeList.forEach(function (variationType) {
|
||||
if (csvVariations.length > 0) {
|
||||
csvVariations += ',';
|
||||
}
|
||||
csvVariations += variationType[attrIdProductVariationType] + ':' + variationType[flagProductVariations][0][attrIdProductVariation];
|
||||
});
|
||||
return csvVariations;
|
||||
}
|
||||
}]);
|
||||
}();
|
||||
|
||||
;// CONCATENATED MODULE: ./static/js/pages/store/supplier_purchase_orders.js
|
||||
function supplier_purchase_orders_typeof(o) { "@babel/helpers - typeof"; return supplier_purchase_orders_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, supplier_purchase_orders_typeof(o); }
|
||||
function supplier_purchase_orders_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||||
@@ -6655,7 +6654,7 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
var inputCostTotalLocalVatExcl = row.querySelector('td.' + flagCostTotalLocalVatExcl + ' input');
|
||||
var inputCostTotalLocalVatIncl = row.querySelector('td.' + flagCostTotalLocalVatIncl + ' input');
|
||||
var trsPurchaseOrderItem = row.querySelectorAll('tr.' + flagOrderItems);
|
||||
var checkboxActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
var buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdSupplierPurchaseOrder] = row.getAttribute(attrIdSupplierPurchaseOrder);
|
||||
jsonRow[attrIdSupplier] = DOM.getElementAttributeValueCurrent(tdSupplier);
|
||||
@@ -6670,7 +6669,7 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
});
|
||||
}
|
||||
jsonRow[flagOrderItems] = orderItems;
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -6686,7 +6685,7 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
var inputCostTotalLocalVatExcl = tr.querySelector('td.' + flagCostTotalLocalVatExcl + ' input');
|
||||
var inputCostTotalLocalVatIncl = tr.querySelector('td.' + flagCostTotalLocalVatIncl + ' input');
|
||||
var inputLatencyDeliveryDays = tr.querySelector('td.' + flagLatencyDeliveryDays + ' input');
|
||||
var checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
var buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
var jsonRow = {};
|
||||
jsonRow[attrIdSupplierPurchaseOrder] = tr.getAttribute(attrIdSupplierPurchaseOrder);
|
||||
jsonRow[attrIdSupplierPurchaseOrderProductLink] = tr.getAttribute(attrIdSupplierPurchaseOrderProductLink);
|
||||
@@ -6700,7 +6699,7 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
jsonRow[flagCostTotalLocalVatExcl] = DOM.getElementAttributeValueCurrent(inputCostTotalLocalVatExcl);
|
||||
jsonRow[flagCostTotalLocalVatIncl] = DOM.getElementAttributeValueCurrent(inputCostTotalLocalVatIncl);
|
||||
jsonRow[flagLatencyDeliveryDays] = DOM.getElementAttributeValueCurrent(inputLatencyDeliveryDays);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
}, {
|
||||
@@ -6961,19 +6960,7 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
inputLatencyDeliveryDays.step = 1;
|
||||
DOM.setElementValuesCurrentAndPrevious(inputLatencyDeliveryDays, orderItem[flagLatencyDeliveryDays]);
|
||||
tdLatencyDeliveryDays.appendChild(inputLatencyDeliveryDays);
|
||||
var tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
var checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, orderItem[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
var tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
var buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
var tdActive = this.createTdActive(orderItem[flagActive]);
|
||||
var tr = document.createElement("tr");
|
||||
tr.classList.add(flagOrderItems);
|
||||
tr.setAttribute(attrIdSupplierPurchaseOrder, orderItem[attrIdSupplierPurchaseOrder]);
|
||||
@@ -6991,7 +6978,6 @@ var PageStoreSupplierPurchaseOrders = /*#__PURE__*/function (_TableBasePage) {
|
||||
tr.appendChild(tdCostUnitLocalVatIncl);
|
||||
tr.appendChild(tdLatencyDeliveryDays);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -11,23 +11,29 @@ export default class ProductPermutation {
|
||||
parts = variationPair.split(':');
|
||||
if (parts.length == 2) {
|
||||
let productVariationType = productVariationTypes[parts[0]];
|
||||
let productVariation = productVariations[parts[1]];
|
||||
if (productVariationType && productVariation) {
|
||||
productVariations.push([productVariationType, productVariation]);
|
||||
}
|
||||
productVariationType[flagProductVariations].some((productVariation) => {
|
||||
if (productVariation[attrIdProductVariation] == parts[1]) {
|
||||
productVariations.push([productVariationType, productVariation]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
return productVariations;
|
||||
}
|
||||
static getProductVariationsPreviewFromIdCsv(csvVariations) {
|
||||
let variations = ProductPermutation.getProductVariationsFromIdCsv(csvVariations);
|
||||
let variationPairs = ProductPermutation.getProductVariationsFromIdCsv(csvVariations);
|
||||
let preview = '';
|
||||
if (variations.length == 0) return preview;
|
||||
variations.forEach((variation) => {
|
||||
if (variationPairs.length == 0) return preview;
|
||||
let variationType, variation;
|
||||
variationPairs.forEach((variationPair) => {
|
||||
if (preview.length > 0) {
|
||||
preview += '\n';
|
||||
}
|
||||
preview += variation[0] + ': ' + variation[1] + ', ';
|
||||
variationType = variationPair[0];
|
||||
variation = variationPair[1];
|
||||
preview += variationType[flagName] + ': ' + variation[flagName];
|
||||
});
|
||||
return preview;
|
||||
}
|
||||
|
||||
@@ -919,6 +919,18 @@ export default class TableBasePage extends BasePage {
|
||||
hookupCurrencyFields() {
|
||||
this.hookupTableCellDdlPreviews(idTableMain + ' td.' + flagCurrency, Utils.getListFromDict(currencies));
|
||||
}
|
||||
|
||||
createTdActive(isActive) {
|
||||
let tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
let buttonActive = document.createElement("button");
|
||||
buttonActive.classList.add(flagActive);
|
||||
buttonActive.classList.add(isActive ? flagDelete : flagAdd);
|
||||
buttonActive.textContent = isActive ? 'x' : '+';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(buttonActive, isActive);
|
||||
tdActive.appendChild(buttonActive);
|
||||
return tdActive;
|
||||
}
|
||||
|
||||
leave() {
|
||||
if (this.constructor === TableBasePage) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import API from "../../api.js";
|
||||
import BusinessObjects from "../../lib/business_objects/business_objects.js";
|
||||
import DOM from "../../dom.js";
|
||||
import Events from "../../lib/events.js";
|
||||
import ProductPermutation from "../../lib/business_objects/store/product_permutation.js";
|
||||
import TableBasePage from "../base_table.js";
|
||||
import Utils from "../../lib/utils.js";
|
||||
import Validation from "../../lib/validation.js";
|
||||
@@ -38,7 +39,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let inputPriceTotalLocalVatExcl = row.querySelector('td.' + flagPriceTotalLocalVatExcl + ' input');
|
||||
let inputPriceTotalLocalVatIncl = row.querySelector('td.' + flagPriceTotalLocalVatIncl + ' input');
|
||||
let trsPurchaseOrderItem = row.querySelectorAll('tr.' + flagOrderItems);
|
||||
let checkboxActive = row.querySelector('td.' + flagActive + ' textarea');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdManufacturingPurchaseOrder] = row.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
@@ -54,7 +55,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
});
|
||||
}
|
||||
jsonRow[flagOrderItems] = orderItems;
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
getJsonRowOrderItem(tr) {
|
||||
@@ -65,8 +66,9 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let tdUnitQuantity = tr.querySelector('td.' + flagUnitMeasurementQuantity);
|
||||
let inputQuantityUsed = tr.querySelector('td.' + flagQuantityUsed + ' input');
|
||||
let inputQuantityProduced = tr.querySelector('td.' + flagQuantityProduced + ' input');
|
||||
let tdUnitMeasurementLatencyManufacture = tr.querySelector('td.' + flagUnitMeasurementLatencyManufacture);
|
||||
let inputLatencyManufacture = tr.querySelector('td.' + flagLatencyManufacture + ' input');
|
||||
let checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
let buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdManufacturingPurchaseOrder] = tr.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
@@ -78,8 +80,9 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
jsonRow[attrIdUnitMeasurementQuantity] = DOM.getElementAttributeValueCurrent(tdUnitQuantity);
|
||||
jsonRow[flagQuantityUsed] = DOM.getElementAttributeValueCurrent(inputQuantityUsed);
|
||||
jsonRow[flagQuantityProduced] = DOM.getElementAttributeValueCurrent(inputQuantityProduced);
|
||||
jsonRow[attrIdUnitMeasurementLatencyManufacture] = DOM.getElementAttributeValueCurrent(tdUnitMeasurementLatencyManufacture);
|
||||
jsonRow[flagLatencyManufacture] = DOM.getElementAttributeValueCurrent(inputLatencyManufacture);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
|
||||
return jsonRow;
|
||||
}
|
||||
@@ -125,10 +128,11 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
if (_verbose) { console.log("click order items preview"); }
|
||||
this.toggleColumnHeaderCollapsed(flagOrderItems, false);
|
||||
element.classList.remove(flagCollapsed);
|
||||
|
||||
let row = DOM.getRowFromElement(element);
|
||||
let idManufacturingPurchaseOrder = row.getAttribute(attrIdManufacturingPurchaseOrder);
|
||||
let manufacturingPurchaseOrderProductLinksList = idManufacturingPurchaseOrder > 0 ? manufacturingPurchaseOrderProductLinks[idManufacturingPurchaseOrder] : [];
|
||||
let manufacturingPurchaseOrder = idManufacturingPurchaseOrder > 0 ? manufacturingPurchaseOrders[idManufacturingPurchaseOrder] : {
|
||||
[flagOrderItems]: [],
|
||||
};
|
||||
let tblOrderItems = document.createElement("table");
|
||||
tblOrderItems.classList.add(flagOrderItems);
|
||||
let thead = document.createElement("thead");
|
||||
@@ -207,7 +211,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
tblOrderItems.appendChild(thead);
|
||||
|
||||
let tbody = document.createElement("tbody");
|
||||
manufacturingPurchaseOrderProductLinksList.forEach((orderItem, index) => {
|
||||
manufacturingPurchaseOrder[flagOrderItems].forEach((orderItem, index) => {
|
||||
this.addRowManufacturingPurchaseOrderItem(tbody, orderItem);
|
||||
});
|
||||
tblOrderItems.appendChild(tbody);
|
||||
@@ -221,7 +225,6 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
}
|
||||
addRowManufacturingPurchaseOrderItem(tbody, orderItem) { // productVariationTypeOptions, productVariationOptions, productCategoryOptions, productOptions, unitMeasurementOptions,
|
||||
if (_verbose) { console.log("addRowManufacturingPurchaseOrderItem: ", orderItem); }
|
||||
|
||||
let tdDisplayOrder = document.createElement("td");
|
||||
tdDisplayOrder.classList.add(flagDisplayOrder);
|
||||
let inputDisplayOrder = document.createElement("input");
|
||||
@@ -237,7 +240,8 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let divCategory = document.createElement("div");
|
||||
divCategory.classList.add(flagProductCategory);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divCategory, orderItem[attrIdProductCategory]);
|
||||
divCategory.textContent = orderItem[flagProductCategory];
|
||||
let productCategory = productCategories[orderItem[attrIdProductCategory]];
|
||||
divCategory.textContent = BusinessObjects.getObjectText(productCategory);
|
||||
tdCategory.appendChild(divCategory);
|
||||
|
||||
let tdProduct = document.createElement("td");
|
||||
@@ -246,7 +250,8 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let divProduct = document.createElement("div");
|
||||
divProduct.classList.add(flagProduct);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divProduct, orderItem[attrIdProduct]);
|
||||
divProduct.textContent = orderItem[flagProduct];
|
||||
let product = products[orderItem[attrIdProduct]];
|
||||
divProduct.textContent = BusinessObjects.getObjectText(product);
|
||||
tdProduct.appendChild(divProduct);
|
||||
|
||||
let tdVariations = document.createElement("td");
|
||||
@@ -256,7 +261,8 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let divVariations = document.createElement("div");
|
||||
divVariations.classList.add(flagProductVariations);
|
||||
// DOM.setElementAttributesValuesCurrentAndPrevious(divVariations, orderItem[attrIdProductVariation]);
|
||||
divVariations.textContent = orderItem[flagProductVariations];
|
||||
let variationsText = ProductPermutation.getProductVariationsPreviewFromIdCsv(orderItem[flagProductVariations]);
|
||||
divVariations.textContent = variationsText;
|
||||
tdVariations.appendChild(divVariations);
|
||||
|
||||
let tdUnitQuantity = document.createElement("td");
|
||||
@@ -265,6 +271,8 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let divUnitQuantity = document.createElement("div");
|
||||
divUnitQuantity.classList.add(flagUnitMeasurementQuantity);
|
||||
// DOM.setElementValuesCurrentAndPrevious(divUnitQuantity, orderItem[flagUnitMeasurementQuantity]);
|
||||
let unitQuantity = unitMeasurements[orderItem[attrIdUnitMeasurementQuantity]];
|
||||
divUnitQuantity.textContent = BusinessObjects.getObjectText(unitQuantity);
|
||||
tdUnitQuantity.appendChild(divUnitQuantity);
|
||||
|
||||
let tdQuantityUsed = document.createElement("td");
|
||||
@@ -272,7 +280,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let inputQuantityUsed = document.createElement("input");
|
||||
inputQuantityUsed.classList.add(flagQuantityUsed);
|
||||
inputQuantityUsed.type = 'number';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputQuantityUsed, orderItem[flagQuantityUsed]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputQuantityUsed, orderItem[flagQuantityUsed]);
|
||||
tdQuantityUsed.appendChild(inputQuantityUsed);
|
||||
|
||||
let tdQuantityProduced = document.createElement("td");
|
||||
@@ -280,7 +288,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let inputQuantityProduced = document.createElement("input");
|
||||
inputQuantityProduced.classList.add(flagQuantityProduced);
|
||||
inputQuantityProduced.type = 'number';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputQuantityProduced, orderItem[flagQuantityProduced]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputQuantityProduced, orderItem[flagQuantityProduced]);
|
||||
tdQuantityProduced.appendChild(inputQuantityProduced);
|
||||
|
||||
/*
|
||||
@@ -323,6 +331,8 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
let divUnitMeasurementLatencyManufacture = document.createElement("div");
|
||||
divUnitMeasurementLatencyManufacture.classList.add(flagUnitMeasurementLatencyManufacture);
|
||||
// DOM.setElementValuesCurrentAndPrevious(divUnitMeasurementLatencyManufacture, orderItem[flagUnitMeasurementLatencyManufacture]);
|
||||
let unitMeasurementLatencyManufacture = unitMeasurementsTime[orderItem[attrIdUnitMeasurementLatencyManufacture]];
|
||||
divUnitMeasurementLatencyManufacture.textContent = BusinessObjects.getObjectText(unitMeasurementLatencyManufacture);
|
||||
tdUnitMeasurementLatencyManufacture.appendChild(divUnitMeasurementLatencyManufacture);
|
||||
|
||||
let tdLatencyManufacture = document.createElement("td");
|
||||
@@ -331,23 +341,10 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
inputLatencyManufacture.classList.add(flagLatencyManufacture);
|
||||
inputLatencyManufacture.type = 'number';
|
||||
inputLatencyManufacture.step = 1;
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(inputLatencyManufacture, orderItem[flagLatencyManufacture]);
|
||||
DOM.setElementValuesCurrentAndPrevious(inputLatencyManufacture, orderItem[flagLatencyManufacture]);
|
||||
tdLatencyManufacture.appendChild(inputLatencyManufacture);
|
||||
|
||||
let tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
let checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, orderItem[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
|
||||
let tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
let buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
let tdActive = this.createTdActive(orderItem[flagActive]);
|
||||
|
||||
let tr = document.createElement("tr");
|
||||
tr.classList.add(flagOrderItems);
|
||||
@@ -369,7 +366,6 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
|
||||
tr.appendChild(tdUnitMeasurementLatencyManufacture);
|
||||
tr.appendChild(tdLatencyManufacture);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
hookupFieldsOrderItemDisplayOrder() {
|
||||
|
||||
@@ -71,7 +71,7 @@ export default class PageStoreProductCategories extends TableBasePage {
|
||||
let textareaName = row.querySelector('td.' + flagName + ' textarea');
|
||||
let textareaDescription = row.querySelector('td.' + flagDescription + ' textarea');
|
||||
let tdAccessLevel = row.querySelector('td.' + flagAccessLevel);
|
||||
let inputActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonCategory = {};
|
||||
jsonCategory[attrIdProductCategory] = row.getAttribute(attrIdProductCategory);
|
||||
@@ -80,7 +80,7 @@ export default class PageStoreProductCategories extends TableBasePage {
|
||||
jsonCategory[flagDescription] = DOM.getElementAttributeValueCurrent(textareaDescription);
|
||||
// jsonCategory[flagAccessLevelRequired] = tdAccessLevel.getAttribute(flagAccessLevelRequired);
|
||||
jsonCategory[attrIdAccessLevel] = DOM.getElementAttributeValueCurrent(tdAccessLevel);
|
||||
jsonCategory[flagActive] = DOM.getElementAttributeValueCurrent(inputActive);
|
||||
jsonCategory[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
jsonCategory[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(sliderDisplayOrder);
|
||||
return jsonCategory;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ export default class PageStoreProductPermutations extends TableBasePage {
|
||||
let checkboxDoesExpireFasterOnceUnsealed = row.querySelector('td.' + flagDoesExpireFasterOnceUnsealed + ' input');
|
||||
let inputCountIntervalExpirationUnsealed = row.querySelector('td.' + flagCountUnitMeasurementIntervalExpirationUnsealed + ' input');
|
||||
let tdUnitMeasurementIntervalExpirationUnsealed = row.querySelector('td.' + flagUnitMeasurementIntervalExpirationUnsealed);
|
||||
let checkboxActive = row.querySelector('td.' + flagActive + ' input');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdProductPermutation] = row.getAttribute(attrIdProductPermutation);
|
||||
@@ -173,7 +173,7 @@ export default class PageStoreProductPermutations extends TableBasePage {
|
||||
jsonRow[flagDoesExpireFasterOnceUnsealed] = checkboxDoesExpireFasterOnceUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagCountUnitMeasurementIntervalExpirationUnsealed] = inputCountIntervalExpirationUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagUnitMeasurementIntervalExpirationUnsealed] = tdUnitMeasurementIntervalExpirationUnsealed.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = checkboxActive.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class PageStoreProductVariations extends TableBasePage {
|
||||
let textareaName = row.querySelector('td.' + flagName + ' textarea');
|
||||
let textareaNamePlural = row.querySelector('td.' + flagNamePlural + ' textarea');
|
||||
let tdProductVariations = row.querySelector('td.' + flagProductVariations);
|
||||
let buttonActive = row.querySelector('td.' + flagActive + ' button');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdProductVariationType] = row.getAttribute(attrIdProductVariationType);
|
||||
@@ -69,7 +69,7 @@ export default class PageStoreProductVariations extends TableBasePage {
|
||||
let textareaCode = tr.querySelector('td.' + flagCode + ' textarea');
|
||||
let textareaName = tr.querySelector('td.' + flagName + ' textarea');
|
||||
// let checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
let buttonActive = tr.querySelector('td.' + flagActive + ' button');
|
||||
let buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdProductVariation] = tr.getAttribute(attrIdProductVariation);
|
||||
@@ -192,14 +192,7 @@ export default class PageStoreProductVariations extends TableBasePage {
|
||||
DOM.setElementValuesCurrentAndPrevious(textareaName, productVariation[flagName]);
|
||||
tdName.appendChild(textareaName);
|
||||
|
||||
let tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
let buttonActive = document.createElement("button");
|
||||
buttonActive.classList.add(flagActive);
|
||||
buttonActive.classList.add(productVariation[flagActive] ? flagDelete : flagAdd);
|
||||
buttonActive.textContent = productVariation[flagActive] ? 'x' : '+';
|
||||
DOM.setElementAttributesValuesCurrentAndPrevious(buttonActive, productVariation[flagActive]);
|
||||
tdActive.appendChild(buttonActive);
|
||||
let tdActive = this.createTdActive(productVariation[flagActive]);
|
||||
|
||||
let tr = document.createElement("tr");
|
||||
tr.classList.add(flagProductVariation);
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class PageStoreProducts extends TableBasePage {
|
||||
// let tdProductVariations = row.querySelector('td.' + flagProductVariations);
|
||||
let inputHasVariations = row.querySelector('td.' + flagHasVariations + ' input[type="checkbox"]');
|
||||
let tdAccessLevel = row.querySelector('td.' + flagAccessLevel);
|
||||
let inputActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonProduct = {};
|
||||
jsonProduct[attrIdProduct] = row.getAttribute(attrIdProduct);
|
||||
@@ -83,7 +83,7 @@ export default class PageStoreProducts extends TableBasePage {
|
||||
jsonProduct[flagHasVariations] = DOM.getElementAttributeValueCurrent(inputHasVariations);
|
||||
// jsonProduct[flagAccessLevelRequired] = tdAccessLevel.getAttribute(flagAccessLevelRequired);
|
||||
jsonProduct[attrIdAccessLevel] = DOM.getElementAttributeValueCurrent(tdAccessLevel);
|
||||
jsonProduct[flagActive] = DOM.getElementAttributeValueCurrent(inputActive);
|
||||
jsonProduct[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
jsonProduct[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(sliderDisplayOrder);
|
||||
return jsonProduct;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export default class PageStoreStockItems extends TableBasePage {
|
||||
let inputDateExpiration = row.querySelector('td.' + flagDateExpiration + ' input');
|
||||
let inputIsConsumed = row.querySelector('td.' + flagIsConsumed + ' input');
|
||||
let inputDateConsumed = row.querySelector('td.' + flagDateConsumed + ' input');
|
||||
let checkboxActive = row.querySelector('td.' + flagActive + ' input');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdStockItem] = row.getAttribute(attrIdStockItem);
|
||||
@@ -104,7 +104,7 @@ export default class PageStoreStockItems extends TableBasePage {
|
||||
jsonRow[flagDateExpiration] = DOM.getElementAttributeValueCurrent(inputDateExpiration);
|
||||
jsonRow[flagIsConsumed] = DOM.getElementAttributeValueCurrent(inputIsConsumed);
|
||||
jsonRow[flagDateConsumed] = DOM.getElementAttributeValueCurrent(inputDateConsumed);
|
||||
jsonRow[flagActive] = checkboxActive.getAttribute(attrValueCurrent);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
initialiseRowNew(tbody, row) {
|
||||
|
||||
@@ -38,7 +38,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
let inputCostTotalLocalVatExcl = row.querySelector('td.' + flagCostTotalLocalVatExcl + ' input');
|
||||
let inputCostTotalLocalVatIncl = row.querySelector('td.' + flagCostTotalLocalVatIncl + ' input');
|
||||
let trsPurchaseOrderItem = row.querySelectorAll('tr.' + flagOrderItems);
|
||||
let checkboxActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
let buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdSupplierPurchaseOrder] = row.getAttribute(attrIdSupplierPurchaseOrder);
|
||||
@@ -54,7 +54,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
});
|
||||
}
|
||||
jsonRow[flagOrderItems] = orderItems;
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
getJsonRowOrderItem(tr) {
|
||||
@@ -68,7 +68,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
let inputCostTotalLocalVatExcl = tr.querySelector('td.' + flagCostTotalLocalVatExcl + ' input');
|
||||
let inputCostTotalLocalVatIncl = tr.querySelector('td.' + flagCostTotalLocalVatIncl + ' input');
|
||||
let inputLatencyDeliveryDays = tr.querySelector('td.' + flagLatencyDeliveryDays + ' input');
|
||||
let checkboxActive = tr.querySelector('td.' + flagActive + ' input');
|
||||
let buttonActive = tr.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdSupplierPurchaseOrder] = tr.getAttribute(attrIdSupplierPurchaseOrder);
|
||||
@@ -83,7 +83,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
jsonRow[flagCostTotalLocalVatExcl] = DOM.getElementAttributeValueCurrent(inputCostTotalLocalVatExcl);
|
||||
jsonRow[flagCostTotalLocalVatIncl] = DOM.getElementAttributeValueCurrent(inputCostTotalLocalVatIncl);
|
||||
jsonRow[flagLatencyDeliveryDays] = DOM.getElementAttributeValueCurrent(inputLatencyDeliveryDays);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
|
||||
return jsonRow;
|
||||
}
|
||||
@@ -340,20 +340,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
DOM.setElementValuesCurrentAndPrevious(inputLatencyDeliveryDays, orderItem[flagLatencyDeliveryDays]);
|
||||
tdLatencyDeliveryDays.appendChild(inputLatencyDeliveryDays);
|
||||
|
||||
let tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
let checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, orderItem[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
|
||||
let tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
let buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
let tdActive = this.createTdActive(orderItem[flagActive]);
|
||||
|
||||
let tr = document.createElement("tr");
|
||||
tr.classList.add(flagOrderItems);
|
||||
@@ -372,7 +359,6 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
|
||||
tr.appendChild(tdCostUnitLocalVatIncl);
|
||||
tr.appendChild(tdLatencyDeliveryDays);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
hookupFieldsOrderItemDisplayOrder() {
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class PageStoreSuppliers extends TableBasePage {
|
||||
let textareaEmail = row.querySelector('td.' + flagEmail + ' textarea');
|
||||
let textareaWebsite = row.querySelector('td.' + flagWebsite + ' textarea');
|
||||
let tdCurrency = row.querySelector('td.' + flagCurrency);
|
||||
let checkboxActive = row.querySelector('td.' + flagActive + ' input[type="checkbox"]');
|
||||
let buttonActive = row.querySelector(':scope > td.' + flagActive + ' button');
|
||||
|
||||
let jsonRow = {};
|
||||
jsonRow[attrIdSupplier] = row.getAttribute(attrIdSupplier);
|
||||
@@ -55,7 +55,7 @@ export default class PageStoreSuppliers extends TableBasePage {
|
||||
jsonRow[flagEmail] = DOM.getElementAttributeValueCurrent(textareaEmail);
|
||||
jsonRow[flagWebsite] = DOM.getElementAttributeValueCurrent(textareaWebsite);
|
||||
jsonRow[attrIdCurrency] = DOM.getElementAttributeValueCurrent(tdCurrency);
|
||||
jsonRow[flagActive] = DOM.getElementAttributeValueCurrent(checkboxActive);
|
||||
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
|
||||
return jsonRow;
|
||||
}
|
||||
getSupplierAddressesFromRow(row) {
|
||||
@@ -250,20 +250,7 @@ export default class PageStoreSuppliers extends TableBasePage {
|
||||
DOM.setElementValuesCurrentAndPrevious(ddlRegion, region[attrIdRegion]);
|
||||
tdRegion.appendChild(ddlRegion);
|
||||
|
||||
let tdActive = document.createElement("td");
|
||||
tdActive.classList.add(flagActive);
|
||||
let checkboxActive = document.createElement("input");
|
||||
checkboxActive.classList.add(flagActive);
|
||||
checkboxActive.type = 'checkbox';
|
||||
DOM.setElementValuesCurrentAndPrevious(checkboxActive, supplierAddress[flagActive]);
|
||||
tdActive.appendChild(checkboxActive);
|
||||
|
||||
let tdDelete = document.createElement("td");
|
||||
tdDelete.classList.add(flagDelete);
|
||||
let buttonDelete = document.createElement("button");
|
||||
buttonDelete.classList.add(flagDelete);
|
||||
buttonDelete.textContent = 'x';
|
||||
tdDelete.appendChild(buttonDelete);
|
||||
let tdActive = this.createTdActive(supplierAddress[flagActive]);
|
||||
|
||||
let tr = document.createElement("tr");
|
||||
tr.setAttribute(attrIdSupplierAddress, supplierAddress[attrIdSupplierAddress]);
|
||||
@@ -275,7 +262,6 @@ export default class PageStoreSuppliers extends TableBasePage {
|
||||
tr.appendChild(tdCounty);
|
||||
tr.appendChild(tdRegion);
|
||||
tr.appendChild(tdActive);
|
||||
tr.appendChild(tdDelete);
|
||||
tbody.appendChild(tr);
|
||||
}
|
||||
hookupAddressPostcodeInputs() {
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
var flagNameAttrOptionText = "{{ model.FLAG_NAME_ATTR_OPTION_TEXT}}";
|
||||
var flagNameAttrOptionValue = "{{ model.FLAG_NAME_ATTR_OPTION_VALUE }}";
|
||||
var flagNamePlural = "{{ model.FLAG_NAME_PLURAL }}";
|
||||
{# var flagNameSingular = "{{ model.FLAG_NAME_SINGULAR }}"; #}
|
||||
var flagNavAdminHome = "{{ model.FLAG_NAV_ADMIN_HOME }}";
|
||||
var flagNavAdminStoreStripePrices = "{{ model.FLAG_NAV_ADMIN_STORE_STRIPE_PRICES }}";
|
||||
var flagNavAdminStoreStripeProducts = "{{ model.FLAG_NAV_ADMIN_STORE_STRIPE_PRODUCTS }}";
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set is_blank_row = False %}
|
||||
{% for manufacturing_purchase_order in model.manufacturing_purchase_orders %}
|
||||
{% for order in model.manufacturing_purchase_orders %}
|
||||
{% include 'components/store/_row_manufacturing_purchase_order.html' %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var currencies = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.currencies) | tojson | safe }};
|
||||
var flagQuantityProduced = "{{ model.FLAG_QUANTITY_PRODUCED }}";
|
||||
var flagQuantityUsed = "{{ model.FLAG_QUANTITY_USED }}";
|
||||
var manufacturing_purchase_orders = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.manufacturing_purchase_orders) | tojson | safe }};
|
||||
var manufacturingPurchaseOrders = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.manufacturing_purchase_orders) | tojson | safe }};
|
||||
var products = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.get_list_products()) | tojson | safe }};
|
||||
var productCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.categories) | tojson | safe }};
|
||||
var productVariations = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.variations) | tojson | safe }};
|
||||
|
||||
Reference in New Issue
Block a user