Feat: Product Variations page get, filter, and save. \n Fix: Active column changed to Add / Delete / Undelete column - this change has only been applied to Product Variations page

This commit is contained in:
2024-11-09 13:41:08 +00:00
parent 8c4efc73da
commit 60431062f0
105 changed files with 12154 additions and 741 deletions

134
app.log.1
View File

@@ -1,15 +1,12 @@
Server Error: (MySQLdb.OperationalError) (1054, "Unknown column 'cost_local' in 'field list'")
[SQL: CALL p_shop_get_many_product(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (1, True, False, '', True, False, '', True, False, '', False, False, '', False, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Request: 127.0.0.1 GET http /store/permutations? Host: 127.0.0.1:5000
Server Error: name 'Parameters_Product' is not defined
Request: 127.0.0.1 GET http /store/categories? 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
Dnt: 1
@@ -22,83 +19,62 @@ 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 'cost_local' 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\product_permutation.py", line 98, in permutations
model = Model_View_Store_Product_Permutation(form_filters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_product_permutation.py", line 53, in __init__
self.category_list, errors = datastore_store.get_many_product(filters_product)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_base.py", line 76, in get_many_product
result = cls.db_procedure_execute('p_shop_get_many_product', argument_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 96, 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(
Sec-Fetch-User: ?1
Sec-Gpc: 1
Priority: u=0, i
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)
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\product_category.py", line 56, in categories
model = Model_View_Store_Product_Category(form_filters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_product_category.py", line 48, in __init__
filters_product = Parameters_Product.from_filters_product_category(self.form_filters)
^^^^^^^^^^^^^^^^^^
NameError: name 'Parameters_Product' is not defined
Server Error: 1
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
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
Dnt: 1
Connection: keep-alive
Referer: http://127.0.0.1:5000/store/stock_items
Cookie: session=.eJytVlnzokgS_yoTRsw8tTY3-I_omPUCRUFB5HohCgqkuOUQcba_-xba090PM3tErKFYVZlk_rLy_GMCujYua9SE8NKE9eTjj0kACg_AHBVe05Z1OPlo6y789NNx92J8n4Y5QNnkYxLCHtRwliMIs7AtiyZHbfyP60idBWU--TSJUN20BcixwIkRQjjgMwS9oKvrsAgGD4YR6LJ28lF0WfYi1eEVlcVfEN4AyO9rbzSCwHJf___kWIHy52wgzFlIzAFP-IAkojAaFTbeC7F3D2sUoRBOPiKQNeGLgoog62AIPXNh_ND6thOTm67Cqn42vunqbwYpf9o9PY-GT77i-2rqyGvLNCwwXRB4GvoszUOf8Sma4aM5iCDPBYAGfsBAjgwYBkQjxO6bG0AQhE3zXUI4yLEvBeiI5BTYO3RYyZmfK-N-qSQXSidUdYd6BGz1uUtKBLY6EWwV7jDMU9d2Wr-AMXjuejVxMzdxy6OUMT5iyWBgY2jrpbJiE58i7ruCmM2yYR07BymE20hQltPHzAY9BQ5hOOzkRxAuTpDfXPcBf1k5WqwkR7Pzbmia7hQa3oZpxisnehCEqiwqLNObAzdvJG9nZ-fl9rjyjuyFcKfF5tjXTqG5BwJJ0cUs_eXtcSMYLQMFeZUOmmYe2cUmhsxG7rWkCfa5LW7OMbewDZgF5Wmf7kuFAVAMH1YfXwGFhFt89_VrMqUV0hC0Y5prvM3Ep6FYnWMPLabZahk3tkPvXdJJ85vqhY7DlGtIOf0wn9bLpa4_uav0kM3W8LeOH9JFGCy1WFRvuju9IQSyA9_4oi2ea49doPVD3YBeXhUaH2e6mapphD8VEDtVX9erjXNMTnpJ80fBuSnlNmF4Mr1uzQXTi8fDvCr4mamrZsoB1ScEw7rtnXK7aOMrDoPwUaE6bDyAQ5DkaYKlBZ4hfpwjHBQCxxDEKwv-IkrOl-eOVNGu2RU6G6x23C6tbHOF93lbueO-MO-h7V70lGH8RL672ytppuJBEWNSH-T5DAvrgKXWfi627hm_kJsppMTBXbEtsPTUl0zCp9inb2UEeAlmY9-6jMozdwvjINc6TEtd6ZFBad4FFFlBKV64FBkDq-8cat6OIRtIWQK35vDWERNwu3wekXDHoVkEuUg5th4H6B2eju3GUBKHw_PydNdqriQaoaxhqhrYWMphVMkZVEqNlXXAqE8duWuHONHKXF1fe7nYzQMpyN01WcKt3gfD5amdL4OO8C9XU5wOP6dCpqRYVy4Sji0_ZUOWXEvrAoktRszQXqYYV-aK8xiOl5nseoylVYxNq6zFi7JOOcXYcUqy6NRkR1ijI3KzdaysGdPTtXQay00POVm5kt64tn73C7UFWL8mwRffIVfv_vnHezbtZkGe5cAy011S5Y71eLrn_0PKY3sce5SJcRHwFtr6w0hJW6NiA9jxw3jim8pEzkxjW7PE7JxW3CVPxxJUObaGjsmGVp4LAvvgqa43I15mDDjFCJ7KWmOOa4VQMM6ANtGoA-siwHopqMmFUfIdq1oKczTMVFlnsfpcIsfY9G5u5q_YoLIXLjiQB42a67CQGWDLJyeraJcUKD3TCTNnVZDN-3Mi5gYOfoyrw3GZvOIpc4twuzyqWUUGhTzArfwEKXwopk6PpY5Y0ftSbp4N78ie3YpSRjuNtKF2REzu-ao-S_paR5vBH7RtqnJSdMYu4pfirlxCkzUXIHxKp1ogqelq6kVRcjuTlFzsiUQPs3XkWNJpfbBbfi8AckvkLmE0XlFFmtXpzVEn6bO5BzVdbC3y0TgU0THzm8F14uZeMqIBVHqeeO5GmhtHK6UYQyCHRcI30y6trekuue0HizkfdG5FMEkxZzyRmMY6cuim5S7DihrurFwXSb8ZiL1U-CIuyYfFpRZYjznQvtCtuRNvIunsOewRy3oKnV4fUL9cZXsqOxfafNke79Hl_mgAjFJyoWngXq7tYR-ZnPpQROoiOMF0X516m1tSJojP7F0HvGSO9asJymrsjPhZIPhLVZcRysJf3vPCp8mrYHnt8OJZhqDGTe_d-1ARla_-1-HmPLlKydDeVMVaxWf0uB15Stee5tbCFy_LOL8n_8sI8jetH5fUd41lBIFmxrHiz6LLsNT7oGmwgrhtq-bj82cY3qdFD1KK4Lgw4mIBPYpZ18xe08eo6jPW9W0w-M-gChSk_455ZCmLYKSb10elci6emOq2bhLpRho9JlcoaLtxUPuOsJlda3AHLahfcN7LzywN6YhiGIKHLMXykcBEFB8AgsedxYcc83vzhRGI3-ov1fU3-OUl61d68Ssl4m8Aix_24f1bZINXIZxVxcvjaHRYP92vSu1eP1B99N3-6nGi0ZqFkniVTEaHF2Pn_zezWldB0OJpbHTGhCIoZkqSU4I0iPkHSX1QxIyjGHfy9evXfwErYp4O.ZySbdA.IOzQ4B0k8HNh-01pbYKqF3sN8jI
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1

247
app.log.2
View File

@@ -1,26 +1,51 @@
config_env: production
config_env: production
config_env: production
config_env: production
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_variation.py", line 45, in product_variations
return render_template('pages/store/_product_variations.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_variations.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 353, 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_variations.html", line 51, in block 'page_body'
{% include 'components/store/_row_product_variation_type.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_product_variation_type.html", line 50, in top-level template code
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {% if product.active %}checked{% endif %} {{ model.ATTR_VALUE_CURRENT }}="{{ variation_type.active | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ variation_type.active | lower }}">
^^^^^^^^^^^^^^^^^^^^^^^^^
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: 'product' is undefined
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 'MPO.id_currency_cost' in 'on clause'")
[SQL: CALL p_shop_get_many_manufacturing_purchase_order(%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (1, True, True, '', '', None, None, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Request: 127.0.0.1 GET http /store/manufacturing_purchase_orders? Host: 127.0.0.1:5000
Server Error: 'models.model_view_store_product_variation.Model_View_Store_Product_Variation object' has no attribute 'category_list_filters'
Request: 127.0.0.1 GET http /store/variations? 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
Accept-Encoding: gzip, deflate, br, zstd
Referer: http://127.0.0.1:5000/store/variations
@@ -32,111 +57,107 @@ 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 'MPO.id_currency_cost' in 'on clause'")
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]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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\product_variation.py", line 45, in product_variations
return render_template('pages/store/_product_variations.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)
model = Model_View_Store_Manufacturing_Purchase_Order(form_filters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store_manufacturing_purchase_order.py", line 50, in __init__
self.manufacturing_purchase_orders, errors = datastore_manufacturing_purchase_order.get_many_manufacturing_purchase_order(parameters_manufacturing_purchase_order)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_manufacturing_purchase_order.py", line 51, in get_many_manufacturing_purchase_order
result = self.db_procedure_execute('p_shop_get_many_manufacturing_purchase_order', argument_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 96, 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 1304, in render
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 'MPO.id_currency_cost' in 'on clause'")
[SQL: CALL p_shop_get_many_manufacturing_purchase_order(%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (1, True, True, '', '', None, None, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
config_env: production
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_variations.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 353, 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_variations.html", line 69, in block 'page_body'
var productCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.categories) | tojson | safe }};
^^^^^^^^^^^^^^^^^^^^^^^^^
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: 'models.model_view_store_product_variation.Model_View_Store_Product_Variation object' has no attribute 'category_list_filters'
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

177
app.log.3
View File

@@ -1,97 +1,80 @@
Traceback: Traceback (most recent call last):
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^
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\supplier_purchase_order.py", line 43, in supplier_purchase_orders
return render_template('pages/store/_supplier_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()
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\_supplier_purchase_orders.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 329, 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\_supplier_purchase_orders.html", line 55, in block 'page_body'
{% include 'components/store/_row_supplier_purchase_order.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_supplier_purchase_order.html", line 62, in top-level template code
{% include 'components/store/_preview_order_items.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_preview_order_items.html", line 4, in top-level template code
{% set str_items = model.convert_list_objects_to_preview_str(order_items) %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 366, in convert_list_objects_to_preview_str
preview_str += obj_json[obj_json[Base.FLAG_NAME_ATTR_OPTION_TEXT]]
TypeError: can only concatenate str (not "NoneType") to str
Exception on /store/supplier_purchase_orders [GET]
Traceback (most recent call last):
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_cors\extension.py", line 178, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
^^^^^^^^^^^^^^^^^^
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\supplier_purchase_order.py", line 43, in supplier_purchase_orders
return render_template('pages/store/_supplier_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()
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\_supplier_purchase_orders.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 329, 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\_supplier_purchase_orders.html", line 55, in block 'page_body'
{% include 'components/store/_row_supplier_purchase_order.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_supplier_purchase_order.html", line 62, in top-level template code
{% include 'components/store/_preview_order_items.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_preview_order_items.html", line 4, in top-level template code
{% set str_items = model.convert_list_objects_to_preview_str(order_items) %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_base.py", line 367, in convert_list_objects_to_preview_str
preview_str += obj_json[obj_json[Base.FLAG_NAME_ATTR_OPTION_TEXT]]
TypeError: can only concatenate str (not "NoneType") to str
Server Error: 500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Request: 127.0.0.1 GET http /store/variations? 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
Referer: http://127.0.0.1:5000/store/variations
Dnt: 1
Connection: keep-alive
Cookie: session=.eJytVlnzokgS_yoTRsw8tTY3-I_omPUCRUFB5HohCgqkuOUQcba_-xba090PM3tErKFYVZlk_rLy_GMCujYua9SE8NKE9eTjj0kACg_AHBVe05Z1OPlo6y789NNx92J8n4Y5QNnkYxLCHtRwliMIs7AtiyZHbfyP60idBWU--TSJUN20BcixwIkRQjjgMwS9oKvrsAgGD4YR6LJ28lF0WfYi1eEVlcVfEN4AyO9rbzSCwHJf___kWIHy52wgzFlIzAFP-IAkojAaFTbeC7F3D2sUoRBOPiKQNeGLgoog62AIPXNh_ND6thOTm67Cqn42vunqbwYpf9o9PY-GT77i-2rqyGvLNCwwXRB4GvoszUOf8Sma4aM5iCDPBYAGfsBAjgwYBkQjxO6bG0AQhE3zXUI4yLEvBeiI5BTYO3RYyZmfK-N-qSQXSidUdYd6BGz1uUtKBLY6EWwV7jDMU9d2Wr-AMXjuejVxMzdxy6OUMT5iyWBgY2jrpbJiE58i7ruCmM2yYR07BymE20hQltPHzAY9BQ5hOOzkRxAuTpDfXPcBf1k5WqwkR7Pzbmia7hQa3oZpxisnehCEqiwqLNObAzdvJG9nZ-fl9rjyjuyFcKfF5tjXTqG5BwJJ0cUs_eXtcSMYLQMFeZUOmmYe2cUmhsxG7rWkCfa5LW7OMbewDZgF5Wmf7kuFAVAMH1YfXwGFhFt89_VrMqUV0hC0Y5prvM3Ep6FYnWMPLabZahk3tkPvXdJJ85vqhY7DlGtIOf0wn9bLpa4_uav0kM3W8LeOH9JFGCy1WFRvuju9IQSyA9_4oi2ea49doPVD3YBeXhUaH2e6mapphD8VEDtVX9erjXNMTnpJ80fBuSnlNmF4Mr1uzQXTi8fDvCr4mamrZsoB1ScEw7rtnXK7aOMrDoPwUaE6bDyAQ5DkaYKlBZ4hfpwjHBQCxxDEKwv-IkrOl-eOVNGu2RU6G6x23C6tbHOF93lbueO-MO-h7V70lGH8RL672ytppuJBEWNSH-T5DAvrgKXWfi627hm_kJsppMTBXbEtsPTUl0zCp9inb2UEeAlmY9-6jMozdwvjINc6TEtd6ZFBad4FFFlBKV64FBkDq-8cat6OIRtIWQK35vDWERNwu3wekXDHoVkEuUg5th4H6B2eju3GUBKHw_PydNdqriQaoaxhqhrYWMphVMkZVEqNlXXAqE8duWuHONHKXF1fe7nYzQMpyN01WcKt3gfD5amdL4OO8C9XU5wOP6dCpqRYVy4Sji0_ZUOWXEvrAoktRszQXqYYV-aK8xiOl5nseoylVYxNq6zFi7JOOcXYcUqy6NRkR1ijI3KzdaysGdPTtXQay00POVm5kt64tn73C7UFWL8mwRffIVfv_vnHezbtZkGe5cAy011S5Y71eLrn_0PKY3sce5SJcRHwFtr6w0hJW6NiA9jxw3jim8pEzkxjW7PE7JxW3CVPxxJUObaGjsmGVp4LAvvgqa43I15mDDjFCJ7KWmOOa4VQMM6ANtGoA-siwHopqMmFUfIdq1oKczTMVFlnsfpcIsfY9G5u5q_YoLIXLjiQB42a67CQGWDLJyeraJcUKD3TCTNnVZDN-3Mi5gYOfoyrw3GZvOIpc4twuzyqWUUGhTzArfwEKXwopk6PpY5Y0ftSbp4N78ie3YpSRjuNtKF2REzu-ao-S_paR5vBH7RtqnJSdMYu4pfirlxCkzUXIHxKp1ogqelq6kVRcjuTlFzsiUQPs3XkWNJpfbBbfi8AckvkLmE0XlFFmtXpzVEn6bO5BzVdbC3y0TgU0THzm8F14uZeMqIBVHqeeO5GmhtHK6UYQyCHRcI30y6trekuue0HizkfdG5FMEkxZzyRmMY6cuim5S7DihrurFwXSb8ZiL1U-CIuyYfFpRZYjznQvtCtuRNvIunsOewRy3oKnV4fUL9cZXsqOxfafNke79Hl_mgAjFJyoWngXq7tYR-ZnPpQROoiOMF0X516m1tSJojP7F0HvGSO9asJymrsjPhZIPhLVZcRysJf3vPCp8mrYHnt8OJZhqDGTe_d-1ARla_-1-HmPLlKydDeVMVaxWf0uB15Stee5tbCFy_LOL8n_8sI8jetH5fUd41lBIFmxrHiz6LLsNT7oGmwgrhtq-bj82cY3qdFD1KK4Lgw4mIBPYpZ18xe08eo6jPW9W0w-M-gChSk_455ZCmLYKSb10elci6emOq2bhLpRho9JlcoaLtxUPuOsJlda3AHLahfcN7LzywN6YhiGIKHLMXykcBEFB8AgsedxYcc83vzhRGI3-ov1fU3-OUl61d68Ssl4m8Aix_24f1bZINXIZxVxcvjaHRYP92vSu1eP1B99N3-6nGi0ZqFkniVTEaHF2Pn_zezWldB0OJpbHTGhCIoZkqSU4I0iPkHSX1QxIyjGHfy9evXfwErYp4O.ZySbdA.IOzQ4B0k8HNh-01pbYKqF3sN8jI
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\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_variation.py", line 45, in product_variations
return render_template('pages/store/_product_variations.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_variations.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 353, 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_variations.html", line 51, in block 'page_body'
{% include 'components/store/_row_product_variation_type.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_product_variation_type.html", line 47, in top-level template code
{% include 'components/store/_preview_product_variation_type_variations.html' %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_preview_product_variation_type_variations.html", line 5, in top-level template code
{{ variation_type.get_preview_variations() }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\business_objects\store\product_variation_type.py", line 112, in get_preview_variations
preview = '\n'.join([variation.name_singular for variation in self.variations])
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Product_Variation' object has no attribute 'name_singular'
config_env: development
Server Error: 'product' is undefined
Request: 127.0.0.1 GET http /store/variations? Host: 127.0.0.1:5000

2
app.py
View File

@@ -43,6 +43,7 @@ from controllers.store.manufacturing_purchase_order import routes_store_manufact
from controllers.store.product import routes_store_product
from controllers.store.product_category import routes_store_product_category
from controllers.store.product_permutation import routes_store_product_permutation
from controllers.store.product_variation import routes_store_product_variation
from controllers.store.stock_item import routes_store_stock_item
from controllers.store.supplier import routes_store_supplier
from controllers.store.supplier_purchase_order import routes_store_supplier_purchase_order
@@ -137,6 +138,7 @@ app.register_blueprint(routes_store_manufacturing_purchase_order)
app.register_blueprint(routes_store_product)
app.register_blueprint(routes_store_product_category)
app.register_blueprint(routes_store_product_permutation)
app.register_blueprint(routes_store_product_variation)
app.register_blueprint(routes_store_stock_item)
app.register_blueprint(routes_store_supplier)
app.register_blueprint(routes_store_supplier_purchase_order)

View File

@@ -69,6 +69,9 @@ class Base():
NAME_ATTR_OPTION_TEXT: ClassVar[str] = 'name-attribute-option-text'
NAME_ATTR_OPTION_VALUE: ClassVar[str] = 'name-attribute-option-value'
"""
def __repr__(self):
attrs = '\n'.join(f'{k}={v!r}' for k, v in self.__dict__.items())
return f'<{self.__class__.__name__}(\n{attrs}\n)>'
@classmethod
def output_bool(cls, value):

View File

@@ -119,8 +119,6 @@ class Product_Permutation(db.Model, Store_Base):
# variation_tree
def __init__(self):
self.variations = []
self.variation_index = {}
self.prices = []
self.price_index = {}
self.images = []
@@ -139,6 +137,7 @@ class Product_Permutation(db.Model, Store_Base):
self.is_unavailable_in_currency_or_region = False
# self.is_available = False
self.variation_tree = None
# self.variations = []
@classmethod
def from_DB_get_many_product_catalogue(cls, query_row):
_m = f'{cls.__name__}.from_DB_get_many_product_catalogue'
@@ -303,7 +302,7 @@ class Product_Permutation(db.Model, Store_Base):
self.FLAG_CAN_VIEW: self.can_view,
self.FLAG_CAN_EDIT: self.can_edit,
self.FLAG_CAN_ADMIN: self.can_admin,
self.FLAG_PRODUCT_VARIATION: [variation.to_json() for variation in self.variations],
self.FLAG_PRODUCT_VARIATIONS: [variation_type.to_json() for variation_type in self.variation_tree.get_product_variation_types()],
self.FLAG_PRODUCT_IMAGE: [image.to_json() for image in self.images],
self.FLAG_DELIVERY_OPTION: [option.to_json() for option in self.delivery_options],
self.FLAG_PRODUCT_PRICE: [price.to_json() for price in self.prices],
@@ -341,13 +340,13 @@ class Product_Permutation(db.Model, Store_Base):
return f'{price.symbol_currency} {locale.format_string("%d", price.value_local_VAT_incl, grouping=True)}'
else:
return f'{price.symbol_currency} {locale.format_string("%d", price.value_local_VAT_excl, grouping=True)}'
"""
def output_variations(self):
if not self.has_variations: return ''
return '\n'.join([f'{variation.name_variation_type}: {variation.name_variation}' for variation in self.variations])
def output_variations_jsonify(self):
if not self.has_variations: return ''
return ','.join([f'{variation.id_type}: {variation.id_variation}' for variation in self.variations])
"""
def __repr__(self):
return f'''Product_Permutation
@@ -387,7 +386,7 @@ class Product_Permutation(db.Model, Store_Base):
can_view: {self.can_view}
can_edit: {self.can_edit}
can_admin: {self.can_admin}
variations: {self.variations}
variation tree: {self.variation_tree}
images: {self.images}
delivery_options: {self.delivery_options}
prices: {self.prices}

View File

@@ -18,8 +18,9 @@ Business object for product variation
# IMPORTS
# internal
import lib.argument_validation as av
from business_objects.db_base import Get_Many_Parameters_Base
from business_objects.store.store_base import Store_Base
from business_objects.store.product_variation_type import Product_Variation_Type
# from business_objects.store.product_variation_type import Product_Variation_Type
from extensions import db
from helpers.helper_app import Helper_App
# external
@@ -55,7 +56,7 @@ class Product_Variation(db.Model, Store_Base):
variation.id_product = query_row[11]
variation.id_permutation = query_row[12]
variation.id_category = query_row[13]
variation.variation_type = Product_Variation_Type.from_DB_get_many_product_catalogue(query_row)
# variation.variation_type = Product_Variation_Type.from_DB_get_many_product_catalogue(query_row)
return variation
@classmethod
@@ -73,13 +74,14 @@ class Product_Variation(db.Model, Store_Base):
def from_json(cls, json):
variation = cls()
variation.id_variation = json[cls.ATTR_ID_PRODUCT_VARIATION]
variation.id_type = json[cls.ATTR_ID_PRODUCT_VARIATION_TYPE]
variation.code = json[cls.FLAG_CODE]
variation.name = json[cls.FLAG_NAME]
variation.display_order = json[cls.FLAG_DISPLAY_ORDER]
variation.active = json[cls.FLAG_ACTIVE]
variation.id_permutation = json[cls.ATTR_ID_PRODUCT_PERMUTATION]
variation.id_product = json[cls.ATTR_ID_PRODUCT]
variation.id_category = json[cls.ATTR_ID_PRODUCT_CATEGORY]
variation.active = 1 if av.input_bool(json[cls.FLAG_ACTIVE], cls.FLAG_ACTIVE, f'{cls.__name__}.from_json') else 0
variation.id_permutation = json.get(cls.ATTR_ID_PRODUCT_PERMUTATION, None)
variation.id_product = json.get(cls.ATTR_ID_PRODUCT, None)
variation.id_category = json.get(cls.ATTR_ID_PRODUCT_CATEGORY, None)
return variation
def __repr__(self):
@@ -116,7 +118,7 @@ class Product_Variation(db.Model, Store_Base):
'text': self.name
}
"""
@dataclass
class Product_Variation_Filters():
get_all_variation_type: bool
@@ -140,7 +142,7 @@ class Product_Variation_Filters():
'a_ids_variation': self.ids_variation,
}
"""
""
@staticmethod
def from_form(form):
av.val_instance(form, 'form', 'User_Filters.from_form', Filters_Product_Variation)
@@ -164,7 +166,7 @@ class Product_Variation_Filters():
ids_user = user.id_user,
ids_user_auth0 = user.id_user_auth0,
)
"""
""
@staticmethod
def get_default():
@@ -178,8 +180,35 @@ class Product_Variation_Filters():
# get_first_variation = False,
ids_variation = ''
)
"""
class Parameters_Product_Variation(Get_Many_Parameters_Base):
a_get_all_variation_type: bool
a_get_inactive_variation_type: bool
a_ids_variation_type: str
a_get_all_variation: bool
a_get_inactive_variation: bool
a_ids_variation: str
def __init__(self, **kwargs):
super().__init__(**kwargs)
@classmethod
def get_default(cls):
return cls(
a_get_all_variation_type = True,
a_get_inactive_variation_type = False,
a_ids_variation_type = '',
a_get_all_variation = True,
a_get_inactive_variation = False,
a_ids_variation = ''
)
@classmethod
def from_filters_product_variation(cls, form):
parameters = cls.get_default()
get_inactive = not form.active.data
parameters.a_get_inactive_variation_type = get_inactive
parameters.a_get_inactive_variation = get_inactive
return parameters
"""
class Product_Variation_Container(BaseModel):
variation_types: list = []
variations: list = []
@@ -209,4 +238,43 @@ class Product_Variation_Container(BaseModel):
for variation_type in self.variation_types:
list_variation_types.append(variation_type.to_json_option())
return list_variation_types
"""
class Product_Variation_Temp(db.Model, Store_Base):
__tablename__ = 'Shop_Variation_Temp'
__table_args__ = { 'extend_existing': True }
id_temp: int = db.Column(db.Integer, primary_key=True, autoincrement=True)
id_variation: int = db.Column(db.Integer) # , primary_key=True)
id_type: int = db.Column(db.Integer, nullable=False)
code: str = db.Column(db.String(50))
name: str = db.Column(db.String(255))
active: bool = db.Column(db.Boolean)
display_order: int = db.Column(db.Integer)
guid: str = db.Column(db.String(36))
def __repr__(self):
attrs = '\n'.join(f'{k}={v!r}' for k, v in self.__dict__.items())
return f'<{self.__class__.__name__}(\n{attrs}\n)>'
def __init__(self):
super().__init__()
self.id_temp = None
@classmethod
def from_product_variation(cls, product_variation):
row = cls()
row.id_variation = product_variation.id_variation
row.id_type = product_variation.id_type
row.code = product_variation.code
row.name = product_variation.name
row.active = 1 if av.input_bool(product_variation.active, cls.FLAG_ACTIVE, f'{cls.__name__}.to_json') else 0
row.display_order = product_variation.display_order
return row
def to_json(self):
return {
'id_variation': self.id_variation,
'id_type': self.id_type,
'code': self.code,
'name': self.name,
'active': self.active,
'display_order': self.display_order,
'guid': self.guid,
}

View File

@@ -11,21 +11,21 @@ Business object for product
"""
# internal
from business_objects.store.product_variation import Product_Variation
from business_objects.store.product_variation_type import Product_Variation_Type
from extensions import db
from helpers.helper_app import Helper_App
# external
class Product_Variation_Tree_Node():
variation: Product_Variation
variation_type: Product_Variation_Type
node_parent: None
nodes_child: list
def __init__(self):
self.nodes_child = []
def from_variation_and_node_parent(variation, node_parent):
def from_variation_type_and_node_parent(variation_type, node_parent):
node = Product_Variation_Tree_Node()
node.variation = variation
node.variation_type = variation_type
node.node_parent = node_parent
return node
def from_node_parent(node_parent):
@@ -45,8 +45,8 @@ class Product_Variation_Tree():
tree.node_root = node_root
return tree
@classmethod
def from_variation_root(cls, variation_root):
node_root = Product_Variation_Tree_Node.from_variation_and_node_parent(variation_root, None)
def from_variation_type_root(cls, variation_type_root):
node_root = Product_Variation_Tree_Node.from_variation_type_and_node_parent(variation_type_root, None)
return cls.from_node_root(node_root)
def is_equal(self, tree):
my_type_list = self.get_product_variations()
@@ -56,53 +56,51 @@ class Product_Variation_Tree():
is_equal = (sz_me == sz_other)
if is_equal:
for index_type in range(sz_me):
if my_type_list[index_type] != other_type_list[index_type]:
my_variation_type = my_type_list[index_type]
other_variation_type = other_type_list[index_type]
if my_variation_type.id_type != other_variation_type.id_type:
is_equal = False
break
my_variation = my_variation_type.variations[0]
other_variation = other_variation_type.variations[0]
if my_variation.id_variation != other_variation.id_variation:
is_equal = False
break
return is_equal
@classmethod
def from_product_permutation(cls, product_permutation):
depth_max = len(product_permutation.variations)
node_root = Product_Variation_Tree_Node.from_variation_and_node_parent(product_permutation.variations[0], None)
depth_max = len(product_permutation.variation_types)
node_root = Product_Variation_Tree_Node.from_variation_type_and_node_parent(product_permutation.variation_types[0], None)
node = node_root
for depth in range(depth_max - 1):
node = Product_Variation_Tree_Node.from_variation_and_node_parent(product_permutation.variations[depth + 1], node)
node = Product_Variation_Tree_Node.from_variation_type_and_node_parent(product_permutation.variation_types[depth + 1], node)
return cls.from_node_root(node_root)
@classmethod
def from_product_variation(cls, product_variation):
node_root = Product_Variation_Tree_Node.from_variation_and_node_parent(product_variation, None)
def from_product_variation_type(cls, product_variation_type):
node_root = Product_Variation_Tree_Node.from_variation_type_and_node_parent(product_variation_type, None)
return cls.from_node_root(node_root)
@classmethod
def from_product_variations(cls, product_variations):
node_root = Product_Variation_Tree_Node.from_variation_and_node_parent(product_variations[0], None)
def from_product_variation_types(cls, product_variation_types):
node_root = Product_Variation_Tree_Node.from_variation_type_and_node_parent(product_variation_types[0], None)
tree = cls.from_node_root(node_root)
if len(product_variations) > 1:
for variation in product_variations[1:]:
tree.add_product_variation(variation)
if len(product_variation_types) > 1:
for variation_type in product_variation_types[1:]:
tree.add_product_variation_type(variation_type)
return tree
@classmethod
def from_json_str(cls, json_str):
variations = []
variation_types = []
if json_str is None or json_str == '': return None
for json_variation in json_str.split(','):
parts = json_variation.split(':')
for json_variation_type in json_str.split(','):
parts = json_variation_type.split(':')
if len(parts) != 2: continue
variation_type = Product_Variation_Type()
variation_type.id_type = parts[0]
variation = Product_Variation()
variation.id_type = parts[0]
variation.id_variation = parts[1]
variations.append(variation)
return cls.from_product_variations(variations)
"""
def get_name_variations(self):
node = self.node_root
name = node.variation.name_variation_type
at_leaf_node = node.is_leaf()
while not at_leaf_node:
node = node.nodes_child[0]
name += f', {node.variation.name_variation_type}'
at_leaf_node = node.is_leaf()
return name
"""
variation_type.id_variation = parts[1]
variation_type.variations = [variation]
variation_types.append(variation_type)
return cls.from_product_variation_types(variation_types)
def get_node_leaf(self):
node = self.node_root
at_leaf_node = node.is_leaf()
@@ -110,19 +108,20 @@ class Product_Variation_Tree():
node = node.nodes_child[0]
at_leaf_node = node.is_leaf()
return node
def add_product_variation(self, variation):
def add_product_variation_type(self, variation_type):
node_leaf = self.get_node_leaf()
node_new = Product_Variation_Tree_Node.from_variation_and_node_parent(variation, node_leaf)
node_new = Product_Variation_Tree_Node.from_variation_type_and_node_parent(variation_type, node_leaf)
node_leaf.add_child(node_new)
def get_product_variation_types(self):
types = []
node = self.node_root
at_leaf_node = node.is_leaf()
while not at_leaf_node:
types.append(node.variation.name_variation_type)
types.append(node.variation_type)
node = node.nodes_child[0]
at_leaf_node = node.is_leaf()
return types
"""
def get_product_variations(self):
variations = []
node = self.node_root
@@ -133,58 +132,28 @@ class Product_Variation_Tree():
at_leaf_node = node.is_leaf()
variations.append(node.variation)
return variations
"""
def to_preview_str(self):
Helper_App.console_log(f'Product_Variation_Tree.to_preview_str')
variations = self.get_product_variations()
Helper_App.console_log(f'variations: {variations}')
variation_types = self.get_product_variation_types()
Helper_App.console_log(f'variation_types: {variation_types}')
preview_str = ''
for variation in variations:
for variation_type in variation_types:
is_first = (preview_str == '')
preview_str += f'{variation.variation_type.name_singular}: {variation.name}'
preview_str += f'{variation_type.name}: {variation_type.variations[0].name}'
if is_first:
preview_str += '\n'
Helper_App.console_log(f'preview_str: {preview_str}')
return preview_str
def to_json(self):
variations = self.get_product_variations()
json_variations = []
for variation in variations:
json_variations.append(variation.to_json())
return json_variations
variation_types = self.get_product_variation_types()
json_variation_types = []
for variation_type in variation_types:
json_variation_types.append(variation_type.to_json())
return json_variation_types
def to_variation_id_pairs_str(self):
variations = self.get_product_variations()
variation_types = self.get_product_variation_types()
pairs_str = ''
for variation in variations:
pairs_str += f'{variation.id_type}:{variation.id_variation},'
return pairs_str
"""
class Product_Variation_Container(BaseModel):
variation_types: list = []
variations: list = []
def add_product_variation_type(self, variation_type):
av.val_instance(variation_type, 'variation_type', 'Product_Variation_Container.add_product_variation_type', Product_Variation_Type)
self.variations.append(variation_type)
def add_product_variation(self, variation):
av.val_instance(variation, 'variation', 'Product_Variation_Container.add_product_variation', Product_Variation)
if variation.variation_type is None:
variation_type = next(filterfalse(lambda x: x.id_type != variation.id_type, self.variation_types), None)
if variation_type is not None:
variation.variation_type = variation_type
self.variations.append(variation)
def __repr__(self):
return f'Product_Variation_Container:\nvariations_types: {self.variation_types}\nvariations: {self.variations}'
def to_list_variation_options(self):
list_variations = []
for variation in self.variations:
list_variations.append(variation.to_json_option())
Helper_App.console_log(f'list_variations: {list_variations}')
return list_variations
def to_list_variation_type_options(self):
list_variation_types = []
for variation_type in self.variation_types:
list_variation_types.append(variation_type.to_json_option())
return list_variation_types
"""
for variation_type in variation_types:
pairs_str += f'{variation_type.id_type}:{variation_type.variations[0].id_variation},'
return pairs_str

View File

@@ -18,6 +18,7 @@ Business object for product variation
# IMPORTS
# internal
import lib.argument_validation as av
from business_objects.store.product_variation import Product_Variation
from business_objects.store.store_base import Store_Base
from extensions import db
# external
@@ -40,7 +41,8 @@ class Product_Variation_Type(db.Model, Store_Base):
def __init__(self):
super().__init__()
self.variations = []
@classmethod
def from_DB_get_many_product_catalogue(cls, query_row):
variation_type = cls()
@@ -50,6 +52,7 @@ class Product_Variation_Type(db.Model, Store_Base):
variation_type.name_plural = query_row[8]
variation_type.display_order = query_row[9]
variation_type.active = av.input_bool(query_row[10], cls.FLAG_ACTIVE, f'{cls.__name__}.from_DB_get_many_product_catalogue')
variation_type.variations = [Product_Variation.from_DB_get_many_product_catalogue(query_row)]
return variation_type
@classmethod
@@ -68,10 +71,13 @@ class Product_Variation_Type(db.Model, Store_Base):
variation_type = cls()
variation_type.id_type = json[cls.ATTR_ID_PRODUCT_VARIATION_TYPE]
variation_type.code = json[cls.FLAG_CODE]
variation_type.name_singular = json[cls.FLAG_NAME_SINGULAR]
variation_type.name_singular = json.get(cls.FLAG_NAME_SINGULAR, json.get(cls.FLAG_NAME, ''))
variation_type.name_plural = json[cls.FLAG_NAME_PLURAL]
variation_type.display_order = json[cls.FLAG_DISPLAY_ORDER]
variation_type.active = json[cls.FLAG_ACTIVE]
variations = json.get(cls.FLAG_PRODUCT_VARIATIONS, [])
if variations is not None and len(variations) > 0:
variation_type.variations = [Product_Variation.from_json(variation) for variation in variations]
return variation_type
def __repr__(self):
@@ -90,14 +96,74 @@ class Product_Variation_Type(db.Model, Store_Base):
**self.get_shared_json_attributes(self),
self.ATTR_ID_PRODUCT_VARIATION_TYPE: self.id_type,
self.FLAG_CODE: self.code,
self.FLAG_NAME_SINGULAR: self.name_singular,
self.FLAG_NAME: self.name_singular,
self.FLAG_NAME_PLURAL: self.name_plural,
self.FLAG_DISPLAY_ORDER: self.display_order,
self.FLAG_ACTIVE: self.active,
self.FLAG_PRODUCT_VARIATIONS: [variation.to_json() for variation in self.variations]
}
def to_json_option(self):
return {
'value': self.id_type,
'text': self.name_singular
}
"""
def get_preview_variations(self):
preview = ''
if len(self.variations) > 0:
# preview = '\n'.join([variation.name for variation in self.variations])
preview = '<p>' + '</p><p>'.join([variation.name for variation in self.variations]) + '</p>'
return preview
def get_str_list_ids_variation(self):
if self.variations is None or len(self.variations) == 0:
return ''
return ','.join([str(variation.id_variation) for variation in self.variations])
"""
class Product_Variation_Type_Temp(db.Model, Store_Base):
__tablename__ = 'Shop_Variation_Type_Temp'
__table_args__ = { 'extend_existing': True }
id_temp: int = db.Column(db.Integer, primary_key=True, autoincrement=True)
id_type: int = db.Column(db.Integer)
code: str = db.Column(db.String(50))
name: str = db.Column(db.String(255))
name_plural: str = db.Column(db.String(256))
active: bool = db.Column(db.Boolean)
display_order: int = db.Column(db.Integer)
guid: str = db.Column(db.String(36))
def __init__(self):
super().__init__()
self.id_temp = None
@classmethod
def from_product_variation_type(cls, product_variation_type):
row = cls()
row.id_type = product_variation_type.id_type
row.code = product_variation_type.code
row.name = product_variation_type.name_singular
row.name_plural = product_variation_type.name_plural
row.active = 1 if av.input_bool(product_variation_type.active, cls.FLAG_ACTIVE, f'{cls.__name__}.from_product_variation_type') else 0
row.display_order = product_variation_type.display_order
return row
def to_json(self):
return {
'id_type': self.id_type,
'code': self.code,
'name': self.name,
'name_plural': self.name_plural,
'active': self.active,
'display_order': self.display_order,
'guid': self.guid,
}
def __repr__(self):
return f'''
{self.__class__.__name__}
id_temp: {self.id_temp}
id_type: {self.id_type}
code: {self.code}
name: {self.name}
name_plural: {self.name_plural}
active: {self.active}
display_order: {self.display_order}
guid: {self.guid}
'''

View File

@@ -126,7 +126,7 @@ def filter_product():
Model_View_Store_Product.FLAG_STATUS: Model_View_Store_Product.FLAG_FAILURE,
Model_View_Store_Product.FLAG_MESSAGE: f'Form invalid.\n{form_filters.errors}'
})
model = Model_View_Store_Product(form_filters = form_filters)
model = Model_View_Store_Product(form_filters_old = form_filters)
if not model.is_user_logged_in:
raise Exception('User not logged in')
return jsonify({
@@ -165,7 +165,7 @@ def save_product():
Helper_App.console_log(f'objsProduct={objsProduct}')
save_errors = Model_View_Store_Product.save_products(data.get('comment', 'No comment'), objsProduct)
model_return = Model_View_Store_Product(form_filters=form_filters)
model_return = Model_View_Store_Product(form_filters_old=form_filters)
if not model_return.is_user_logged_in:
raise Exception('User not logged in')
Helper_App.console_log('nips')

View File

@@ -72,7 +72,7 @@ def filter_category():
})
# ToDo: manually validate category, product
# filters_form = Filters_Product_Category.from_form(form_filters)
model = Model_View_Store_Product_Category(form_filters = form_filters)
model = Model_View_Store_Product_Category(form_filters_old = form_filters)
if not model.is_user_logged_in:
raise Exception('User not logged in')
return jsonify({
@@ -110,7 +110,7 @@ def save_category():
Helper_App.console_log(f'objsCategory={objsCategory}')
Model_View_Store_Product_Category.save_categories(data.get('comment', 'No comment'), objsCategory)
model_return = Model_View_Store_Product_Category(form_filters=form_filters)
model_return = Model_View_Store_Product_Category(form_filters_old=form_filters)
if not model_return.is_user_logged_in:
raise Exception('User not logged in')
return jsonify({

View File

@@ -29,68 +29,13 @@ from urllib.parse import quote, urlparse, parse_qs
routes_store_product_permutation = Blueprint('routes_store_product_permutation', __name__)
"""
@routes_store_product_permutation.route('/store/permutations', methods=['GET'])
def permutation():
filters = Parameters_Product.get_default()
model = Model_View_Store_Product_Permutation(filters_product=filters)
return render_template('pages/store/_product_permutations.html', model = model)
@routes_store_product_permutation.route('/store/permutation_filter', methods=['POST'])
def permutation_filter():
data = Helper_App.get_request_data(request)
form_filters = None
try:
form_filters = get_Form_Filters_Permutation(data)
if not form_filters.validate_on_submit():
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_FAILURE, Model_View_Base.FLAG_MESSAGE: f'Form invalid.\n{form_filters.errors}'})
# ToDo: manually validate category, product
filters_form = Parameters_Product.from_form(form_filters)
model = Model_View_Store_Product_Permutation(filters_product=filters_form)
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_SUCCESS, 'Success': True, Model_View_Base.FLAG_DATA: model.category_list.to_permutation_row_list()})
except Exception as e:
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_FAILURE, Model_View_Base.FLAG_MESSAGE: f'Bad data received by controller.\n{e}'})
def get_Form_Filters_Permutation(data_request):
data_form = data_request[Model_View_Store_Product_Permutation.FLAG_FORM]
form_filters = Filters_Product_Permutation(**data_form)
form_filters.is_out_of_stock.data = av.input_bool(data_form['is_out_of_stock'], 'is_out_of_stock', 'permutations_post')
return form_filters
@routes_store_product_permutation.route('/store/permutation_save', methods=['POST'])
def permutation_save():
data = Helper_App.get_request_data(request)
form_filters = None
try:
form_filters = get_Form_Filters_Permutation(data)
if not form_filters.validate_on_submit():
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_FAILURE, Model_View_Base.FLAG_MESSAGE: f'Filters form invalid.\n{form_filters.errors}'})
permutations = data[Model_View_Store_Product_Permutation.FLAG_PRODUCT_PERMUTATION]
if len(permutations) == 0:
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_FAILURE, Model_View_Base.FLAG_MESSAGE: f'No permutations.'})
objsPermutation = []
for permutation in permutations:
objsPermutation.append(Product_Permutation.from_json(permutation))
# ToDo: manually validate category, product
filters_form = Parameters_Product.from_form(form_filters)
model_save = Model_View_Store_Product_Permutation(filters_product=filters_form)
model_save.save_permutations(data.comment, objsPermutation)
model_return = Model_View_Store_Product_Permutation(filters_product=filters_form)
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_SUCCESS, 'Success': True, Model_View_Base.FLAG_DATA: model_return.category_list.to_permutation_row_list()})
except Exception as e:
return jsonify({Model_View_Base.FLAG_STATUS: Model_View_Base.FLAG_FAILURE, Model_View_Base.FLAG_MESSAGE: f'Bad data received by controller.\n{e}'})
"""
@routes_store_product_permutation.route(Model_View_Store_Product_Permutation.HASH_PAGE_STORE_PRODUCT_PERMUTATIONS, methods=['GET'])
def permutations():
Helper_App.console_log('permutations')
data = Helper_App.get_request_data(request)
try:
form_filters = Filters_Product_Permutation.from_json(request.args)
form_filters = Filters_Product_Permutation.from_json(data)
except Exception as e:
Helper_App.console_log(f'Error: {e}')
form_filters = Filters_Product_Permutation()
@@ -111,7 +56,7 @@ def filter_permutation():
Model_View_Store_Product_Permutation.FLAG_STATUS: Model_View_Store_Product_Permutation.FLAG_FAILURE,
Model_View_Store_Product_Permutation.FLAG_MESSAGE: f'Form invalid.\n{form_filters.errors}'
})
model = Model_View_Store_Product_Permutation(form_filters = form_filters)
model = Model_View_Store_Product_Permutation(form_filters_old = form_filters)
if not model.is_user_logged_in:
raise Exception('User not logged in')
return jsonify({
@@ -150,7 +95,7 @@ def save_permutation():
Helper_App.console_log(f'objsPermutation={objsPermutation}')
Model_View_Store_Product_Permutation.save_permutations(data.get('comment', 'No comment'), objsPermutation)
model_return = Model_View_Store_Product_Permutation(form_filters=form_filters)
model_return = Model_View_Store_Product_Permutation(form_filters_old=form_filters)
if not model_return.is_user_logged_in:
raise Exception('User not logged in')
Helper_App.console_log('nips')

View File

@@ -0,0 +1,109 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: App Routing
Feature: Store Product Variation Routes
Description:
Initializes the Flask application, sets the configuration based on the environment, and defines two routes (/ and /about) that render templates with the specified titles.
"""
# internal
from business_objects.store.product_variation import Product_Variation, Parameters_Product_Variation
from business_objects.store.product_variation_type import Product_Variation_Type
from datastores.datastore_store_product_variation import DataStore_Store_Product_Variation
from forms.store.product_variation import Filters_Product_Variation
from models.model_view_store_product_variation import Model_View_Store_Product_Variation
from helpers.helper_app import Helper_App
import lib.argument_validation as av
# external
from flask import Flask, render_template, jsonify, request, render_template_string, send_from_directory, redirect, url_for, session, Blueprint, current_app
from extensions import db, oauth
from urllib.parse import quote_plus, urlencode
from authlib.integrations.flask_client import OAuth
from authlib.integrations.base_client import OAuthError
from urllib.parse import quote, urlparse, parse_qs
routes_store_product_variation = Blueprint('routes_store_product_variation', __name__)
@routes_store_product_variation.route(Model_View_Store_Product_Variation.HASH_PAGE_STORE_PRODUCT_VARIATIONS, methods=['GET'])
def product_variations():
Helper_App.console_log('product_variations')
try:
form_filters = Filters_Product_Variation.from_json(request.args)
except Exception as e:
Helper_App.console_log(f'Error: {e}')
form_filters = Filters_Product_Variation()
Helper_App.console_log(f'form_filters={form_filters}')
model = Model_View_Store_Product_Variation(form_filters)
if not model.is_user_logged_in:
return redirect(url_for('routes_core.home'))
return render_template('pages/store/_product_variations.html', model = model)
@routes_store_product_variation.route(Model_View_Store_Product_Variation.HASH_GET_STORE_PRODUCT_VARIATION, methods=['POST'])
def filter_product_variation():
data = Helper_App.get_request_data(request)
try:
form_filters = Filters_Product_Variation.from_json(data)
if not form_filters.validate_on_submit():
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_FAILURE,
Model_View_Store_Product_Variation.FLAG_MESSAGE: f'Form invalid.\n{form_filters.errors}'
})
model = Model_View_Store_Product_Variation(form_filters_old = form_filters)
if not model.is_user_logged_in:
raise Exception('User not logged in')
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_SUCCESS,
Model_View_Store_Product_Variation.FLAG_DATA: model.convert_list_objects_to_json(model.variation_types)
})
except Exception as e:
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_FAILURE,
Model_View_Store_Product_Variation.FLAG_MESSAGE: f'Bad data received by controller.\n{e}'
})
@routes_store_product_variation.route(Model_View_Store_Product_Variation.HASH_SAVE_STORE_PRODUCT_VARIATION, methods=['POST'])
def save_product_variation():
data = Helper_App.get_request_data(request)
try:
form_filters = Filters_Product_Variation.from_json(data[Model_View_Store_Product_Variation.FLAG_FORM_FILTERS])
if not form_filters.validate_on_submit():
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_FAILURE,
Model_View_Store_Product_Variation.FLAG_MESSAGE: f'Filters form invalid.\n{form_filters.errors}'
})
# filters_form = Filters_Product_Variation.from_form(form_filters)
Helper_App.console_log(f'form_filters: {form_filters}')
product_variation_types = data[Model_View_Store_Product_Variation.FLAG_PRODUCT_VARIATION_TYPE]
if len(product_variation_types) == 0:
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_FAILURE,
Model_View_Store_Product_Variation.FLAG_MESSAGE: f'No Product Variations.'
})
objs_product_variation_type = []
for product_variation_type in product_variation_types:
objs_product_variation_type.append(Product_Variation_Type.from_json(product_variation_type))
# model_save = Model_View_Store_Product_Variation() # filters_product_variation=filters_form)
Helper_App.console_log(f'objs_product_variation_type={objs_product_variation_type}')
save_errors = Model_View_Store_Product_Variation.save_product_variations(data.get('comment', 'No comment'), objs_product_variation_type)
model_return = Model_View_Store_Product_Variation(form_filters_old = form_filters)
if not model_return.is_user_logged_in:
raise Exception('User not logged in')
Helper_App.console_log('nips')
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_SUCCESS,
Model_View_Store_Product_Variation.FLAG_DATA: model_return.convert_list_objects_to_json(model_return.variation_types)
})
except Exception as e:
return jsonify({
Model_View_Store_Product_Variation.FLAG_STATUS: Model_View_Store_Product_Variation.FLAG_FAILURE,
Model_View_Store_Product_Variation.FLAG_MESSAGE: f'Bad data received by controller.\n{e}'
})

View File

@@ -29,7 +29,6 @@ from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.unit_measurement import Unit_Measurement
from business_objects.user import User, User_Filters, User_Permission_Evaluation
# from business_objects.store.product_variation import Product_Variation, Product_Variation_Filters, Product_Variation_Container
# from helpers.helper_db_mysql import Helper_DB_MySQL
# from models.model_view_store_checkout import Model_View_Store_Checkout # circular!
from extensions import db
@@ -189,7 +188,6 @@ class DataStore_Base(BaseModel):
else:
expected_columns = set(column.name for column in db.inspect(table_object).columns)
Helper_App.console_log(f'expected_columns: {expected_columns}')
try:
for i in range(0, len(records), batch_size):
batch = records[i:i+batch_size]

View File

@@ -24,7 +24,8 @@ from business_objects.store.product import Product, Product_Permutation, Paramet
from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.user import User, User_Filters, User_Permission_Evaluation
from business_objects.store.product_variation import Product_Variation_Type, Product_Variation, Product_Variation_Filters, Product_Variation_Container
from business_objects.store.product_variation import Product_Variation, Parameters_Product_Variation
from business_objects.store.product_variation_type import Product_Variation_Type
from datastores.datastore_base import DataStore_Base
from extensions import db
from helpers.helper_app import Helper_App
@@ -255,7 +256,7 @@ class DataStore_Store_Base(DataStore_Base):
def get_many_product_variation(cls, variation_filters):
_m = 'DataStore_Store_Base.get_many_product_variation'
Helper_App.console_log(_m)
av.val_instance(variation_filters, 'variation_filters', _m, Product_Variation_Filters)
av.val_instance(variation_filters, 'variation_filters', _m, Parameters_Product_Variation)
guid = Helper_DB_MySQL.create_guid()
# now = datetime.now()
@@ -284,14 +285,14 @@ class DataStore_Store_Base(DataStore_Base):
# Product_Variation Types
# variation_container = Product_Variation_Container()
variation_types = []
variation_types_dict = {}
index_variation_type = {}
for row in result_set_vt:
new_variation_type = Product_Variation_Type.from_DB_get_many_product_variation(row)
# variation_container.add_product_variation_type(new_variation_type)
index_variation_type[new_variation_type.id_type] = len(variation_types)
variation_types.append(new_variation_type)
variation_types_dict[new_variation_type.id_type] = new_variation_type
Helper_App.console_log(f'variation_types_dict: {variation_types_dict}')
Helper_App.console_log(f'index_variation_type: {index_variation_type}')
# Product_Variations
cursor.nextset()
@@ -300,8 +301,9 @@ class DataStore_Store_Base(DataStore_Base):
variations = []
for row in result_set_v:
new_variation = Product_Variation.from_DB_get_many_product_variation(row)
new_variation.variation_type = variation_types_dict[new_variation.id_type]
# new_variation.variation_type = variation_types_dict[new_variation.id_type]
# variation_container.add_product_variation(new_variation)
variation_types[index_variation_type[new_variation.id_type]].variations.append(new_variation)
variations.append(new_variation)
errors = []

View File

@@ -14,18 +14,7 @@ Datastore for Store Baskets
# from routes import bp_home
import lib.argument_validation as av
from business_objects.store.basket import Basket, Basket_Item
from business_objects.store.product_category import Product_Category_Container, Product_Category
from business_objects.currency import Currency
from business_objects.store.image import Image
from business_objects.store.delivery_option import Delivery_Option
from business_objects.region import Region
from business_objects.store.discount import Discount
from business_objects.store.order import Order
from business_objects.store.product import Product, Product_Permutation, Product_Price, Parameters_Product
from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.user import User, User_Filters, User_Permission_Evaluation
from business_objects.store.product_variation import Product_Variation, Product_Variation_Filters, Product_Variation_Container
from datastores.datastore_store_base import DataStore_Store_Base
from helpers.helper_app import Helper_App
# from helpers.helper_db_mysql import Helper_DB_MySQL

View File

@@ -12,19 +12,8 @@ Datastore for Store Product Categories
# internal
import lib.argument_validation as av
from business_objects.store.basket import Basket, Basket_Item
from business_objects.store.product_category import Product_Category_Container, Product_Category, Product_Category_Temp
from business_objects.currency import Currency
from business_objects.store.image import Image
from business_objects.store.delivery_option import Delivery_Option
from business_objects.region import Region
from business_objects.store.discount import Discount
from business_objects.store.order import Order
from business_objects.store.product import Product, Product_Permutation, Product_Price, Parameters_Product
from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.user import User, User_Filters, User_Permission_Evaluation
from business_objects.store.product_variation import Product_Variation, Product_Variation_Filters, Product_Variation_Container
# from datastores.datastore_base import Table_Shop_Product_Category, Table_Shop_Product_Category_Temp
from datastores.datastore_store_base import DataStore_Store_Base
from helpers.helper_app import Helper_App

View File

@@ -13,20 +13,10 @@ Datastore for Store Product Variations
# internal
# from routes import bp_home
import lib.argument_validation as av
from business_objects.store.basket import Basket, Basket_Item
from business_objects.store.product_category import Product_Category_Container, Product_Category
from business_objects.currency import Currency
from business_objects.store.image import Image
from business_objects.store.delivery_option import Delivery_Option
from business_objects.region import Region
from business_objects.store.discount import Discount
from business_objects.store.order import Order
from business_objects.store.product import Product, Product_Permutation, Product_Price, Parameters_Product
from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.user import User, User_Filters, User_Permission_Evaluation
from business_objects.store.product_variation import Product_Variation, Product_Variation_Filters, Product_Variation_Container
from business_objects.store.product_variation import Product_Variation, Parameters_Product_Variation, Product_Variation_Temp
from business_objects.store.product_variation_type import Product_Variation_Type, Product_Variation_Type_Temp
from datastores.datastore_store_base import DataStore_Store_Base
from helpers.helper_app import Helper_App
from helpers.helper_db_mysql import Helper_DB_MySQL
# from models.model_view_store_checkout import Model_View_Store_Checkout # circular!
from extensions import db
@@ -46,4 +36,42 @@ from datetime import datetime
class DataStore_Store_Product_Variation(DataStore_Store_Base):
def __init__(self, **kwargs):
super().__init__(**kwargs)
super().__init__(**kwargs)
@classmethod
def save_product_variations(cls, comment, variation_types):
_m = f'{cls.__class__}.save_product_variations'
av.val_str(comment, 'comment', _m)
guid = Helper_DB_MySQL.create_guid_str()
user = cls.get_user_session()
rows = []
for variation_type in variation_types:
row = Product_Variation_Type_Temp.from_product_variation_type(variation_type)
row.guid = guid
rows.append(row)
Helper_App.console_log(f'rows: {rows}')
DataStore_Store_Base.upload_bulk(Product_Variation_Type_Temp.__tablename__, rows, 1000)
Helper_App.console_log('bulk uploaded product variation types')
rows = []
for variation_type in variation_types:
if variation_type.variations is not None:
for variation in variation_type.variations:
row = Product_Variation_Temp.from_product_variation(variation)
row.guid = guid
rows.append(row)
Helper_App.console_log(f'rows: {rows}')
DataStore_Store_Base.upload_bulk(Product_Variation_Temp.__tablename__, rows, 1000)
Helper_App.console_log('bulk uploaded product variations')
argument_dict_list = {
'a_comment': comment,
'a_guid': guid,
'a_id_user': user.id_user,
'a_debug': 0,
}
cls.db_procedure_execute('p_shop_save_product_variation', argument_dict_list)
Helper_App.console_log('saved product variations')

View File

@@ -14,18 +14,8 @@ Datastore for Store Stripe service
# from routes import bp_home
import lib.argument_validation as av
from business_objects.store.basket import Basket, Basket_Item
from business_objects.store.product_category import Product_Category_Container, Product_Category
from business_objects.currency import Currency
from business_objects.store.image import Image
from business_objects.store.delivery_option import Delivery_Option
from business_objects.region import Region
from business_objects.store.discount import Discount
from business_objects.store.order import Order
from business_objects.store.product import Product, Product_Permutation, Product_Price, Parameters_Product
from business_objects.sql_error import SQL_Error
from business_objects.store.stock_item import Stock_Item
from business_objects.user import User, User_Filters, User_Permission_Evaluation
from business_objects.store.product_variation import Product_Variation, Product_Variation_Filters, Product_Variation_Container
from datastores.datastore_store_base import DataStore_Store_Base
# from helpers.helper_db_mysql import Helper_DB_MySQL
# from models.model_view_store_checkout import Model_View_Store_Checkout # circular!

View File

@@ -0,0 +1,38 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Backend
Feature: Forms - Product Variation Filters data input
Description:
Defines Flask-WTF forms for handling product variation filter input.
"""
# internal
from business_objects.store.store_base import Store_Base
from forms.base import Form_Base
from helpers.helper_app import Helper_App
import lib.argument_validation as av
# external
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField, BooleanField, IntegerField, SelectField, FloatField, DateField
from wtforms.validators import InputRequired, NumberRange, Regexp, DataRequired, Optional
from flask_wtf.recaptcha import RecaptchaField
from abc import ABCMeta, abstractmethod
class Filters_Product_Variation(Form_Base):
is_not_empty = BooleanField('Not empty only?')
active = BooleanField("Active only?", default = True)
def __repr__(self):
return f'Filters_Product_Variation(is_not_empty={self.is_not_empty.data}, active={self.active.data})'
@classmethod
def from_json(cls, json):
_m = f'{cls.__name__}.from_json'
Helper_App.console_log(f'{_m}\njson={json}')
form = cls()
form.is_not_empty.data = av.input_bool(json[Store_Base.FLAG_IS_NOT_EMPTY], Store_Base.FLAG_IS_NOT_EMPTY, _m)
form.active.data = av.input_bool(json[Store_Base.FLAG_ACTIVE], Store_Base.FLAG_ACTIVE, _m)
return form

View File

@@ -447,13 +447,13 @@ def input_bool(v_input, v_name, method, suppress_errors = False, suppress_consol
# v_arg_type
if not val_str(v_arg_type, 'v_arg_type', my_f, 1, -1, suppress_errors, suppress_console_outputs): return None
# METHODS
if not val_bool(v_input, v_name, my_f, True, suppress_console_outputs):
if not val_int(v_input, v_name, my_f, 0, 1, True, suppress_console_outputs):
if not val_bool(v_input, v_name, my_f, True, True):
if not val_int(v_input, v_name, my_f, 0, 1, True, True):
# if str(type(v_input)) == "<class 'bytes'>":
# return bool(v_input)
v_input = str(v_input)
error_msg = error_msg_str(v_input, v_name, method, "<class 'bool'>", suppress_errors, suppress_console_outputs, v_arg_type)
if not val_str(v_input, v_name, my_f, suppress_errors=True, suppress_console_outputs=suppress_console_outputs):
if not val_str(v_input, v_name, my_f, suppress_errors=True, suppress_console_outputs=True):
if suppress_errors:
if not suppress_console_outputs:
print(error_msg)

View File

@@ -99,6 +99,7 @@ class Model_View_Base(BaseModel, ABC):
FLAG_NAME: ClassVar[str] = Base.FLAG_NAME
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_NAV_ADMIN_HOME: ClassVar[str] = 'navAdminHome'
FLAG_NAV_ADMIN_STORE_STRIPE_PRICES: ClassVar[str] = 'navAdminStoreStripePrices'
FLAG_NAV_ADMIN_STORE_STRIPE_PRODUCTS: ClassVar[str] = 'navAdminStoreStripeProducts'

View File

@@ -23,7 +23,7 @@ from business_objects.store.product import Product, Parameters_Product, Product_
from business_objects.store.image import Resolution_Level_Enum
from business_objects.store.basket import Basket_Item, Basket
from business_objects.store.product_category import Product_Category
from business_objects.store.product_variation import Product_Variation_Filters, Product_Variation
from business_objects.store.product_variation import Product_Variation, Parameters_Product_Variation
from business_objects.store.stock_item import Stock_Item
from datastores.datastore_store_base import DataStore_Store_Base
from datastores.datastore_user import DataStore_User
@@ -148,6 +148,7 @@ class Model_View_Store(Model_View_Base):
HASH_GET_STORE_PRODUCT: ClassVar[str] = '/store/product_get'
HASH_GET_STORE_PRODUCT_CATEGORY: ClassVar[str] = '/store/category_get'
HASH_GET_STORE_PRODUCT_PERMUTATION: ClassVar[str] = '/store/permutation_get'
HASH_GET_STORE_PRODUCT_VARIATION: ClassVar[str] = '/store/product_variation_get'
HASH_GET_STORE_STOCK_ITEM: ClassVar[str] = '/store/stock_item_get'
HASH_GET_STORE_SUPPLIER: ClassVar[str] = '/store/supplier_get'
HASH_GET_STORE_SUPPLIER_PURCHASE_ORDER: ClassVar[str] = '/store/supplier_purchase_order_get'
@@ -157,6 +158,7 @@ class Model_View_Store(Model_View_Base):
HASH_SAVE_STORE_PRODUCT: ClassVar[str] = '/store/save_product'
HASH_SAVE_STORE_PRODUCT_CATEGORY: ClassVar[str] = '/store/save_category'
HASH_SAVE_STORE_PRODUCT_PERMUTATION: ClassVar[str] = '/store/save_permutation'
HASH_SAVE_STORE_PRODUCT_VARIATION: ClassVar[str] = '/store/save_product_variation'
HASH_SAVE_STORE_STOCK_ITEM: ClassVar[str] = '/store/save_stock_item'
HASH_SAVE_STORE_SUPPLIER: ClassVar[str] = '/store/save_supplier'
HASH_SAVE_STORE_SUPPLIER_PURCHASE_ORDER: ClassVar[str] = '/store/save_supplier_purchase_order'
@@ -502,6 +504,6 @@ class Model_View_Store(Model_View_Base):
def get_many_product_variation(self, variation_filters = None):
if variation_filters is None:
variation_filters = Product_Variation_Filters.get_default()
variation_filters = Parameters_Product_Variation.get_default()
variation_types, variations, errors = DataStore_Store_Base().get_many_product_variation(variation_filters)
return variation_types, variations, errors

View File

@@ -79,7 +79,6 @@ class Model_View_Store_Product(Model_View_Store):
# product_blank: Product = None
units_measurement: list = None
units_measurement_time: list = None
# variation_container: Product_Variation_Container = None
variations: list = None
variation_types: list = None

View File

@@ -14,13 +14,12 @@ Data model for store permutations view
from models.model_view_store import Model_View_Store
# from datastores.datastore_store_base import DataStore_Store_Base
from datastores.datastore_store_product_category import DataStore_Store_Product_Category
from business_objects.store.product import Parameters_Product
from business_objects.store.product_category import Product_Category_Container # , Filters_Product_Category
from forms.access_level import Filters_Access_Level
# from forms.store.product_permutation import Filters_Product_Permutation
from forms.store.product_category import Filters_Product_Category
# from routes import bp_home
from business_objects.store.product import Product, Parameters_Product, Product_Permutation
from business_objects.store.product_variation import Product_Variation_Container
from helpers.helper_app import Helper_App
import lib.argument_validation as av

View File

@@ -17,7 +17,6 @@ from business_objects.store.product_category import Product_Category_Container
from forms.store.product_permutation import Filters_Product_Permutation
# from routes import bp_home
from business_objects.store.product import Product, Parameters_Product, Product_Permutation
from business_objects.store.product_variation import Product_Variation_Container
from helpers.helper_app import Helper_App
import lib.argument_validation as av
@@ -35,7 +34,6 @@ class Model_View_Store_Product_Permutation(Model_View_Store):
list_options_product: list = None
units_measurement: list = None
units_measurement_time: list = None
# variation_container: Product_Variation_Container = None
variations: list = None
variation_types: list = None

View File

@@ -0,0 +1,54 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: View Models
Feature: Store Product View Model
Description:
Data model for store product view
"""
# IMPORTS
# VARIABLE INSTANTIATION
# METHODS
# IMPORTS
# internal
from business_objects.store.product_variation import Product_Variation, Parameters_Product_Variation
from business_objects.store.product_category import Product_Category_Container
from datastores.datastore_store_product_variation import DataStore_Store_Product_Variation
from forms.access_level import Filters_Access_Level
from forms.store.product_variation import Filters_Product_Variation
from helpers.helper_app import Helper_App
from models.model_view_store import Model_View_Store
# from routes import bp_home
import lib.argument_validation as av
# external
from typing import ClassVar
class Model_View_Store_Product_Variation(Model_View_Store):
form_filters: Filters_Product_Variation = None
form_filters_old: Filters_Product_Variation
variation_types: list = None
variations: list = None
@property
def title(self):
return 'Store Product Variation'
def __init__(self, form_filters_old, hash_page_current=Model_View_Store.HASH_PAGE_STORE_PRODUCT_VARIATIONS):
_m = 'Model_View_Store_Product_Variation.__init__'
Helper_App.console_log(f'{_m}\nstarting...')
super().__init__(hash_page_current = hash_page_current, form_filters_old = form_filters_old)
self.form_filters = form_filters_old
parameters_variation = Parameters_Product_Variation.from_filters_product_variation(self.form_filters)
datastore_variation = DataStore_Store_Product_Variation()
self.variation_types, self.variations, errors = datastore_variation.get_many_product_variation(parameters_variation)
@classmethod
def save_product_variations(cls, comment, list_orders):
_m = f'{cls.__name__}.save_product_variations'
return DataStore_Store_Product_Variation().save_product_variations(comment, list_orders)

File diff suppressed because it is too large Load Diff

View File

@@ -168,13 +168,19 @@ DROP TABLE IF EXISTS Shop_Product_Variation_Link;
DROP TABLE IF EXISTS Shop_Product_Permutation_Variation_Link_Audit;
DROP TABLE IF EXISTS Shop_Product_Permutation_Variation_Link;
DROP TABLE IF EXISTS Shop_Variation_Temp;
DROP TABLE IF EXISTS Shop_Variation_Audit;
DROP TABLE IF EXISTS Shop_Variation;
DROP TABLE IF EXISTS Shop_Product_Variation_Type_Link_Audit;
DROP TABLE IF EXISTS Shop_Product_Variation_Type_Link;
DROP TABLE IF EXISTS Shop_Product_Variation_Temp;
DROP TABLE IF EXISTS Shop_Product_Variation;
DROP TABLE IF EXISTS Shop_Variation_Type_Temp;
DROP TABLE IF EXISTS Shop_Variation_Type_Audit;
DROP TABLE IF EXISTS Shop_Variation_Type;
DROP TABLE IF EXISTS Shop_Product_Variation_Type_Temp;
DROP TABLE IF EXISTS Shop_Product_Variation_Type;
DROP TABLE IF EXISTS Shop_Product_Permutation_Temp;
DROP TABLE IF EXISTS Shop_Product_Permutation_Audit;
@@ -294,6 +300,8 @@ DROP PROCEDURE IF EXISTS p_shop_get_many_stripe_product_new;
DROP PROCEDURE IF EXISTS p_shop_save_permutation;
DROP PROCEDURE IF EXISTS p_shop_save_product_permutation;
DROP PROCEDURE IF EXISTS p_shop_save_product_permutation_test;
DROP PROCEDURE IF EXISTS p_shop_save_product_variation;
DROP PROCEDURE IF EXISTS p_shop_save_product_variation_test;
DROP PROCEDURE IF EXISTS p_shop_get_many_product_variation;
DROP FUNCTION IF EXISTS fn_shop_get_id_product_permutation_from_variation_csv_list;
DROP PROCEDURE IF EXISTS p_shop_save_stock_item;

View File

@@ -16,8 +16,8 @@ CREATE TABLE IF NOT EXISTS Shop_Product_Permutation_Temp (
, latency_manufacture INT NOT NULL
, id_unit_measurement_quantity INT NOT NULL
, count_unit_measurement_per_quantity_step FLOAT NOT NULL
, quantity_min FLOAT NOT NULL
, quantity_max FLOAT NOT NULL
, quantity_min FLOAT NULL
, quantity_max FLOAT NULL
, quantity_stock FLOAT NULL
, is_subscription BIT NOT NULL
, id_unit_measurement_interval_recurrence INT

View File

@@ -6,16 +6,17 @@
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Variation_Type';
CREATE TABLE IF NOT EXISTS Shop_Variation_Type (
id_type INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
code VARCHAR(50),
name VARCHAR(255),
name_plural VARCHAR(256),
active BIT NOT NULL DEFAULT 1,
display_order INT NOT NULL,
created_on DATETIME,
created_by INT,
id_change_set INT,
CONSTRAINT FK_Shop_Variation_Type_id_change_set
id_type INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, id_type_temp INT NULL
, code VARCHAR(50)
, name VARCHAR(255)
, name_plural VARCHAR(256)
, active BIT NOT NULL DEFAULT 1
, display_order INT NOT NULL
, created_on DATETIME
, created_by INT
, id_change_set INT
, CONSTRAINT FK_Shop_Variation_Type_id_change_set
FOREIGN KEY (id_change_set)
REFERENCES Shop_Product_Change_Set(id_change_set)
);

View File

@@ -0,0 +1,20 @@
# Variation Types Temp
-- DROP TABLE partsltd_prod.Shop_Variation_Type_Temp;
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Variation_Type_Temp';
CREATE TABLE IF NOT EXISTS Shop_Variation_Type_Temp (
id_temp INT NOT NULL PRIMARY KEY AUTO_INCREMENT
, id_type INT NOT NULL
-- , id_type_temp INT NOT NULL
, code VARCHAR(50)
, name VARCHAR(255)
, name_plural VARCHAR(256)
, active BIT NULL
, display_order INT NOT NULL
, created_on DATETIME
, created_by INT
, guid BINARY(36) NOT NULL
);

View File

@@ -0,0 +1,19 @@
# Variations Temp
-- DROP TABLE partsltd_prod.Shop_Variation_Temp;
SELECT CONCAT('WARNING: Table ', TABLE_NAME, ' already exists.') AS msg_warning FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'Shop_Variation_Temp';
CREATE TABLE Shop_Variation_Temp (
id_temp INT NOT NULL PRIMARY KEY AUTO_INCREMENT
, id_variation INT NOT NULL
, id_type INT NOT NULL
, code VARCHAR(50)
, name VARCHAR(255)
, active BIT
, display_order INT NOT NULL
, created_on DATETIME
, created_by INT
, guid BINARY(36)
);

View File

@@ -20,8 +20,8 @@ BEGIN
ELSE '' END
)
FROM Shop_Product_Permutation PP
INNER JOIN Shop_Product P ON PP.id_product = P.id_product
INNER JOIN Shop_Product_Category PC ON P.id_category = PC.id_category
LEFT JOIN Shop_Product P ON PP.id_product = P.id_product
LEFT JOIN Shop_Product_Category PC ON P.id_category = PC.id_category
LEFT JOIN Shop_Product_Permutation_Variation_Link PPVL ON PP.id_permutation = PPVL.id_permutation
LEFT JOIN Shop_Variation V ON PPVL.id_variation = V.id_variation
LEFT JOIN Shop_Variation_Type VT ON V.id_type = VT.id_type

View File

@@ -337,7 +337,8 @@ BEGIN
PP.id_product,
P.id_category,
PP.description,
PP.cost_local,
PP.cost_local_VAT_excl,
PP.cost_local_VAT_incl,
PP.id_currency_cost,
C.code AS code_currency_cost,
C.symbol AS symbol_currency_cost,

View File

@@ -51,7 +51,7 @@ BEGIN
/* Test 1 - Insert */
(
-1 -- id_permutation
, 8 -- id_product
, 5 -- id_product
, 'Hair clip' -- description
, NULL -- cost_local_VAT_excl
, NULL -- cost_local_VAT_incl
@@ -112,7 +112,6 @@ BEGIN
END //
DELIMITER ;;
/*
CALL partsltd_prod.p_shop_save_product_permutation_test ();
DELETE FROM partsltd_prod.Shop_Product_Permutation_Temp;
@@ -120,5 +119,7 @@ DELETE FROM partsltd_prod.Shop_Product_Permutation_Temp;
DROP TABLE IF EXISTS tmp_Msg_Error;
/*
SELECT * FROM partsltd_prod.Shop_Product
Cannot add or update a child row: a foreign key constraint fails (`partsltd_prod`.`shop_product_permutation`, CONSTRAINT `FK_Shop_Product_Permutation_id_product` FOREIGN KEY (`id_product`) REFERENCES `shop_product` (`id_product`) ON UPDATE RESTRICT)
*/

View File

@@ -353,20 +353,20 @@ BEGIN
END //
DELIMITER ;;
/*
CALL p_shop_get_many_product_variation (
1 # 'auth0|6582b95c895d09a70ba10fef', # a_id_user
, 1 # a_get_all_variation_type
, 0 # a_get_inactive_variation_type
, 1 # a_get_inactive_variation_type
, '' # a_ids_variation_type
, 1 # a_get_all_variation
, 0 # a_get_inactive_variation
, 1 # a_get_inactive_variation
, '' # a_ids_variation
, 1 # a_debug
, 0 # a_debug
);
select * from TMP_MSG_ERROR;
DROP TABLE TMP_MSG_ERROR;

View File

@@ -0,0 +1,546 @@
-- Clear previous proc
DROP PROCEDURE IF EXISTS p_shop_save_product_variation;
DROP TABLE IF EXISTS tmp_Variation_Type;
DROP TABLE IF EXISTS tmp_Variation;
DROP TABLE IF EXISTS tmp_Msg_Error;
DELIMITER //
CREATE PROCEDURE p_shop_save_product_variation (
IN a_comment VARCHAR(500)
, IN a_guid BINARY(36)
, IN a_id_user INT
, IN a_debug BIT
)
BEGIN
DECLARE v_code_type_error_bad_data VARCHAR(50);
DECLARE v_code_type_error_no_permission VARCHAR(50);
DECLARE v_code_type_error_warning VARCHAR(50);
DECLARE v_id_access_level_edit INT;
DECLARE v_id_change_set INT;
DECLARE v_ids_permission_product_variation VARCHAR(100);
DECLARE v_id_type_error_bad_data INT;
DECLARE v_id_type_error_no_permission INT;
DECLARE v_id_type_error_warning INT;
DECLARE v_ids_product_permission TEXT;
DECLARE v_time_start TIMESTAMP(6);
DECLARE exit handler for SQLEXCEPTION
BEGIN
GET DIAGNOSTICS CONDITION 1
@sqlstate = RETURNED_SQLSTATE
, @errno = MYSQL_ERRNO
, @text = MESSAGE_TEXT
;
ROLLBACK;
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_Msg_Error (
display_order INT NOT NULL PRIMARY KEY AUTO_INCREMENT
, id_type INT NULL
, code VARCHAR(50) NOT NULL
, msg VARCHAR(4000) NOT NULL
);
INSERT INTO tmp_Msg_Error (
id_type
, code
, msg
)
SELECT
MET.id_type
, @errno
, @text
FROM partsltd_prod.Shop_Msg_Error_Type MET
WHERE code = 'MYSQL_ERROR'
LIMIT 1
;
SELECT *
FROM tmp_Msg_Error;
DROP TABLE IF EXISTS tmp_Msg_Error;
END;
SET v_time_start := CURRENT_TIMESTAMP(6);
SET v_code_type_error_bad_data := (SELECT code FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = 'BAD_DATA' LIMIT 1);
SET v_id_type_error_bad_data := (SELECT id_type FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = v_code_type_error_bad_data LIMIT 1);
SET v_code_type_error_no_permission := (SELECT code FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = 'NO_PERMISSION' LIMIT 1);
SET v_id_type_error_no_permission := (SELECT id_type FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = v_code_type_error_no_permission LIMIT 1);
SET v_code_type_error_warning := (SELECT code FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = 'WARNING' LIMIT 1);
SET v_id_type_error_warning := (SELECT id_type FROM partsltd_prod.Shop_Msg_Error_Type WHERE code = v_code_type_error_warning LIMIT 1);
SET v_ids_permission_product_variation := (SELECT GROUP_CONCAT(id_permission SEPARATOR ',') FROM partsltd_prod.Shop_Permission WHERE code IN ('STORE_PRODUCT'));
SET v_id_access_level_edit := (SELECT id_access_level FROM partsltd_prod.Shop_Access_Level WHERE code = 'EDIT' LIMIT 1);
CALL p_validate_guid ( a_guid );
SET a_comment := TRIM(IFNULL(a_comment, ''));
DROP TEMPORARY TABLE IF EXISTS tmp_Variation_Type;
DROP TEMPORARY TABLE IF EXISTS tmp_Variation;
DROP TEMPORARY TABLE IF EXISTS tmp_Msg_Error;
-- Temporary tables
CREATE TEMPORARY TABLE tmp_Variation_Type (
id_type INT NOT NULL PRIMARY KEY
, id_type_temp INT NOT NULL
, code VARCHAR(50)
, name VARCHAR(255)
, name_plural VARCHAR(256)
, active BIT NULL
, display_order INT NOT NULL
, created_on DATETIME
, created_by INT
, is_new BIT NOT NULL
, name_error VARCHAR(1000) NOT NULL
);
-- CREATE TEMPORARY TABLE tmp_Variation_Type_Count
CREATE TEMPORARY TABLE tmp_Variation (
id_variation INT NOT NULL PRIMARY KEY
, id_type INT NOT NULL
, code VARCHAR(50)
, name VARCHAR(255)
, active BIT
, display_order INT NOT NULL
, created_on DATETIME
, created_by INT
, has_type BIT NULL
, is_new BIT NOT NULL
, name_error VARCHAR(1000) NOT NULL
);
CREATE TEMPORARY TABLE IF NOT EXISTS tmp_Msg_Error (
display_order INT NOT NULL PRIMARY KEY AUTO_INCREMENT
, id_type INT NOT NULL
, code VARCHAR(50) NOT NULL
, msg VARCHAR(4000) NOT NULL
);
INSERT INTO tmp_Variation_Type (
id_type
, id_type_temp
, code
, name
, name_plural
, active
, display_order
, created_on
, created_by
, is_new
, name_error
)
SELECT
VT_T.id_type
, VT_T.id_type
, VT_T.code
, VT_T.name
, VT_T.name_plural
, VT_T.active
, VT_T.display_order
, IFNULL(VT_T.created_on, VT.created_on) AS created_on
, IFNULL(VT_T.created_by, VT.created_by) AS created_by
, IFNULL(VT_T.id_type, 0) < 1 AS is_new
, CASE WHEN IFNULL(VT_T.id_type, 0) < 1 THEN
CONCAT(
'New Variation Type: '
, VT_T.display_order
, ' - '
, IFNULL(VT_T.code, '(No Code)')
, ' - '
, IFNULL(VT_T.name, '(No Name)')
)
ELSE
CONCAT(
VT_T.display_order
, ' - '
, IFNULL(VT_T.code, '(No Code)')
, ' - '
, IFNULL(VT_T.name, '(No Name)')
)
END AS name_error
FROM partsltd_prod.Shop_Variation_Type_Temp VT_T
LEFT JOIN partsltd_prod.Shop_Variation_Type VT ON VT_T.id_type = VT.id_type
WHERE VT_T.GUID = a_guid
;
INSERT INTO tmp_Variation (
id_variation
, id_type
, code
, name
, active
, display_order
, created_on
, created_by
, has_type
, is_new
, name_error
)
SELECT
V_T.id_variation
, IFNULL(V_T.id_type, V.id_type) AS id_type
, V_T.code
, V_T.name
, V_T.active
, V_T.display_order
, IFNULL(V_T.created_on, V.created_on) AS created_on
, IFNULL(V_T.created_by, V.created_by) AS created_by
, NOT ISNULL(t_VT.id_type) AS has_type
, IFNULL(V_T.id_variation, 0) < 1 AS is_new
, CASE WHEN IFNULL(V_T.id_variation, 0) < 1 THEN
CONCAT(
'New Variation: '
, V_T.display_order
, ' - '
, IFNULL(V_T.code, '(No Code)')
, ' - '
, IFNULL(V_T.name, '(No Name)')
)
ELSE
CONCAT(
V_T.display_order
, ' - '
, IFNULL(V_T.code, '(No Code)')
, ' - '
, IFNULL(V_T.name, '(No Name)')
)
END AS name_error
FROM partsltd_prod.Shop_Variation_Temp V_T
LEFT JOIN partsltd_prod.Shop_Variation V ON V_T.id_variation = V.id_variation
-- LEFT JOIN partsltd_prod.Shop_Variation_Type VT ON V_T.id_type = VT.id_type
LEFT JOIN tmp_Variation_Type t_VT ON V_T.id_type = t_VT.id_type
WHERE V_T.GUID = a_guid
;
-- Insert missing order records
INSERT INTO tmp_Variation_Type (
id_type
, id_type_temp
, code
, name
, name_plural
, active
, display_order
, created_on
, created_by
, is_new
, name_error
)
SELECT
VT.id_type
, VT.id_type
, VT.code
, VT.name
, VT.name_plural
, VT.active
, VT.display_order
, VT.created_on
, VT.created_by
, 0 AS is_new
, CONCAT(
VT.display_order
, ' - '
, IFNULL(VT.code, '(No Code)')
, ' - '
, IFNULL(VT.name, '(No Name)')
) AS name_error
FROM partsltd_prod.Shop_Variation_Type VT
INNER JOIN tmp_Variation t_V
ON VT.id_type = t_V.id_type
AND t_V.has_type = 0
AND NOT ISNULL(t_V.id_type)
;
UPDATE tmp_Variation t_V
INNER JOIN tmp_Variation_Type t_VT ON t_V.id_type = t_V.id_type
SET t_V.has_type = 1
WHERE t_V.has_type = 0
;
-- Validation
-- Variation Type
# id_type
IF EXISTS (
SELECT *
FROM tmp_Variation_Type t_VT
INNER JOIN partsltd_prod.Shop_Variation_Type VT ON t_VT.id_type = VT.id_type
WHERE 1=1
AND t_VT.id_type > 0
AND ISNULL(VT.id_type)
LIMIT 1
) THEN
INSERT INTO tmp_Msg_Error (
id_type
, code
, msg
)
SELECT
v_id_type_error_bad_data
, v_code_type_error_bad_data
, CONCAT(
'A valid ID is required for the following Product Variation Type(s): '
, GROUP_CONCAT(t_VT.name_error SEPARATOR ', ')
) AS msg
FROM tmp_Variation_Type t_VT
INNER JOIN partsltd_prod.Shop_Variation_Type VT ON t_VT.id_type = VT.id_type
WHERE 1=1
AND t_VT.id_type > 0
AND ISNULL(VT.id_type)
;
END IF;
-- Variation
# id_variation
IF EXISTS (
SELECT *
FROM tmp_Variation t_V
INNER JOIN partsltd_prod.Shop_Variation V ON t_V.id_variation = V.id_variation
WHERE 1=1
AND t_V.id_variation > 0
AND ISNULL(V.id_variation)
LIMIT 1
) THEN
INSERT INTO tmp_Msg_Error (
id_type
, code
, msg
)
SELECT
v_id_type_error_bad_data
, v_code_type_error_bad_data
, CONCAT(
'A valid ID is required for the following Product Variation(s): '
, GROUP_CONCAT(t_V.name_error SEPARATOR ', ')
) AS msg
FROM tmp_Variation t_V
INNER JOIN partsltd_prod.Shop_Variation V ON t_V.id_variation = V.id_variation
WHERE 1=1
AND t_V.id_variation > 0
AND ISNULL(V.id_variation)
;
END IF;
# id_type
IF EXISTS ( SELECT * FROM tmp_Variation t_V WHERE t_V.has_type = 0 LIMIT 1 ) THEN
INSERT INTO tmp_Msg_Error (
id_type
, code
, msg
)
SELECT
v_id_type_error_bad_data
, v_code_type_error_bad_data
, CONCAT(
'A valid ID is required for the following Product Variation(s): '
, GROUP_CONCAT(t_V.name_error SEPARATOR ', ')
) AS msg
FROM tmp_Variation t_V
WHERE t_V.has_type = 0
;
END IF;
-- Duplicate Variation Type Ids
-- Duplicate Variation Ids
-- Duplicate Variation Type Codes
-- Duplicate Variation Codes
-- Permissions
IF a_debug = 1 THEN
SELECT
a_guid
, a_id_user
, FALSE -- get inactive users
, v_ids_permission_product_variation
, v_id_access_level_edit
, NULL -- ids_product
, 0 -- a_debug
;
SELECT *
FROM partsltd_prod.Shop_Calc_User_Temp
WHERE GUID = a_guid
;
END IF;
CALL p_shop_calc_user(
a_guid
, a_id_user
, FALSE -- get inactive users
, v_ids_permission_product_variation
, v_id_access_level_edit
, NULL -- ids_product
, 0 -- a_debug
);
IF a_debug = 1 THEN
SELECT * from partsltd_prod.Shop_Calc_User_Temp WHERE GUID = a_guid;
END IF;
IF EXISTS (SELECT * FROM partsltd_prod.Shop_Calc_User_Temp UE_T WHERE UE_T.GUID = a_guid AND IFNULL(UE_T.can_view, 0) = 0) THEN
DELETE FROM tmp_Msg_Error;
INSERT INTO tmp_Msg_Error (
id_type
, code
, msg
)
SELECT
v_id_type_error_no_permission
, v_code_type_error_no_permission
, CONCAT(
'You do not have edit permissions for '
, GROUP_CONCAT(name SEPARATOR ', ')
)
FROM partsltd_prod.Shop_Permission PERM
INNER JOIN partsltd_prod.Shop_Calc_User_Temp UE_T
ON PERM.id_permission = UE_T.id_permission
AND UE_T.GUID = a_guid
AND IFNULL(UE_T.can_view, 0) = 0
;
END IF;
CALL partsltd_prod.p_shop_clear_calc_user(
a_guid
, 0 -- a_debug
);
IF EXISTS ( SELECT * FROM tmp_Msg_Error WHERE id_type <> v_id_type_error_warning LIMIT 1 ) THEN
DELETE FROM tmp_Variation_Type;
DELETE FROM tmp_Variation;
END IF;
-- Transaction
IF NOT EXISTS (SELECT * FROM tmp_Msg_Error) THEN
START TRANSACTION;
INSERT INTO Shop_Product_Change_Set (
comment
, updated_last_by
, updated_last_on
)
VALUES (
a_comment
, a_id_user
, v_time_start
);
SET v_id_change_set := LAST_INSERT_ID();
INSERT INTO partsltd_prod.Shop_Variation_Type (
id_type_temp
, code
, name
, name_plural
, active
, display_order
, created_on
, created_by
)
SELECT
t_VT.id_type
, t_VT.code
, t_VT.name
, t_VT.name_plural
, t_VT.active
, t_VT.display_order
, t_VT.created_on
, t_VT.created_by
FROM tmp_Variation_Type t_VT
WHERE t_VT.is_new = 1
;
UPDATE tmp_Variation_Type t_VT
INNER JOIN partsltd_prod.Shop_Variation_Type VT ON t_VT.id_type_temp = VT.id_type_temp
SET
t_VT.id_type = VT.id_type
WHERE t_VT.is_new = 1
;
UPDATE tmp_Variation t_V
INNER JOIN tmp_Variation_Type t_VT
ON t_V.id_type = t_VT.id_type_temp
AND t_VT.is_new = 1
SET
t_V.id_type = t_VT.id_type
;
INSERT INTO partsltd_prod.Shop_Variation (
id_type
, code
, name
, active
, display_order
, created_on
, created_by
)
SELECT
t_V.id_type
, t_V.code
, t_V.name
, t_V.active
, t_V.display_order
, t_V.created_on
, t_V.created_by
FROM tmp_Variation t_V
WHERE t_V.is_new = 1
;
UPDATE partsltd_prod.Shop_Variation_Type VT
INNER JOIN tmp_Variation_Type t_VT
ON VT.id_type = t_VT.id_type
AND t_VT.is_new = 0
INNER JOIN tmp_Variation t_V ON t_VT.id_type = t_V.id_type
SET
VT.code = t_VT.code
, VT.name = t_VT.name
, VT.name_plural = t_VT.name_plural
, VT.active = t_VT.active
, VT.display_order = t_VT.display_order
, VT.created_on = t_VT.created_on
, VT.created_by = t_VT.created_by
, VT.id_change_set = v_id_change_set
;
UPDATE partsltd_prod.Shop_Variation V
INNER JOIN tmp_Variation t_V
ON V.id_variation = t_V.id_variation
AND t_V.is_new = 0
SET
V.code = t_V.code
, V.name = t_V.name
, V.active = t_V.active
, V.display_order = t_V.display_order
, V.created_on = t_V.created_on
, V.created_by = t_V.created_by
, V.id_change_set = v_id_change_set
;
DELETE VT_T
FROM partsltd_prod.Shop_Variation_Type_Temp VT_T
WHERE VT_T.GUID = a_guid
;
DELETE V_T
FROM partsltd_prod.Shop_Variation_Temp V_T
WHERE V_T.GUID = a_guid
;
COMMIT;
END IF;
# Errors
SELECT *
FROM tmp_Msg_Error t_ME
INNER JOIN partsltd_prod.Shop_Msg_Error_Type MET ON t_ME.id_type = MET.id_type
;
IF a_debug = 1 THEN
SELECT * from tmp_Variation_Type;
SELECT * from tmp_Variation;
END IF;
DROP TEMPORARY TABLE tmp_Variation_Type;
DROP TEMPORARY TABLE tmp_Variation;
DROP TEMPORARY TABLE tmp_Msg_Error;
IF a_debug = 1 THEN
CALL partsltd_prod.p_debug_timing_reporting ( v_time_start );
END IF;
END //
DELIMITER ;;

View File

@@ -0,0 +1,186 @@
-- Clear previous proc
DROP PROCEDURE IF EXISTS partsltd_prod.p_shop_save_product_variation_test;
DELIMITER //
CREATE PROCEDURE p_shop_save_product_variation_test ()
BEGIN
DECLARE v_guid BINARY(36);
DECLARE v_time_start TIMESTAMP(6);
SET v_time_start := CURRENT_TIMESTAMP(6);
SET v_guid := 'nips';
SELECT *
FROM partsltd_prod.Shop_Variation_Type
;
SELECT *
FROM partsltd_prod.Shop_Variation_Type_Temp
;
SELECT *
FROM partsltd_prod.Shop_Variation
;
SELECT *
FROM partsltd_prod.Shop_Variation_Temp
;
START TRANSACTION;
DELETE FROM partsltd_prod.Shop_Variation_Type_Temp;
DELETE FROM partsltd_prod.Shop_Variation_Temp;
INSERT INTO partsltd_prod.Shop_Variation_Type_Temp (
id_type
-- , id_type_temp
, code
, name
, name_plural
, display_order
, active
, GUID
)
/* Test 1 - Insert
VALUES (
-1
-- , -1
, 'SIZE'
, 'Size'
, 'Sizes'
, 2
, 1
, v_guid
)
*/
/* Test 2: Alter */
SELECT
id_type
-- , id_type AS id_type_temp
, code
, name
, name_plural
, display_order
, active
, v_guid AS GUID
FROM partsltd_prod.Shop_Variation_Type
WHERE id_type = 1
;
INSERT INTO partsltd_prod.Shop_Variation_Temp (
id_variation
, id_type
, code
, name
, display_order
, active
, GUID
)
/* Test 1 - Insert
VALUES (
-1 -- id_variation
, -1 -- id_type
, '300 mL' -- code
, '300 millilitres' -- name
, 1 -- display_order
, 1 -- active
, v_guid --
)
*/
/* Test 3 - Insert
VALUES (
-1 -- id_variation
, 1 -- id_type
, 'SILVER' -- code
, 'Silver' -- name
, 10 -- display_order
, 1 -- active
, 'NIPS' -- v_guid --
);
*/
/* Test 2: Alter */
SELECT
id_variation
, id_type
, code
, name
, display_order
, active
, v_guid AS GUID
FROM partsltd_prod.Shop_Variation
WHERE id_variation = 2
UNION
SELECT
-1 -- id_variation
, 1 -- id_type
, 'GREEN' -- code
, 'Green' -- name
, 3 -- display_order
, 1 -- active
, v_guid --
;
COMMIT;
SELECT *
FROM partsltd_prod.Shop_Variation_Type_Temp
WHERE GUID = v_guid
;
SELECT *
FROM partsltd_prod.Shop_Variation_Temp
WHERE GUID = v_guid
;
CALL partsltd_prod.p_shop_save_product_variation (
'Test save Variations - add + edit' -- comment
, v_guid -- guid
, 1 -- id_user
, 1 -- debug
);
SELECT *
FROM partsltd_prod.Shop_Variation_Type_Temp
;
SELECT *
FROM partsltd_prod.Shop_Variation_Temp
;
SELECT *
FROM partsltd_prod.Shop_Variation_Type
;
SELECT *
FROM partsltd_prod.Shop_Variation
;
CALL partsltd_prod.p_debug_timing_reporting ( v_time_start );
END //
DELIMITER ;;
CALL partsltd_prod.p_shop_save_product_variation_test ();
DELETE FROM partsltd_prod.Shop_Variation_Type_Temp;
DELETE FROM partsltd_prod.Shop_Variation_Temp;
DROP TABLE IF EXISTS tmp_Msg_Error;
/*
delete from shop_variation_audit
where id_variation = 3
;
delete from shop_variation_audit
where id_variation = 3
;
delete from shop_variation_type_audit
where id_type = -1
;
delete
-- select *
from shop_variation_type
where id_type = -1
;
Cannot add or update a child row: a foreign key constraint fails (`partsltd_prod`.`shop_variation_type`, CONSTRAINT `FK_Shop_Variation_Type_id_change_set` FOREIGN KEY (`id_change_set`) REFERENCES `shop_product_change_set` (`id_change_set`))
*/

View File

@@ -699,7 +699,7 @@ BEGIN
v_id_type_error_no_permission
, v_code_type_error_no_permission
, CONCAT(
'You do not have view permissions for '
'You do not have edit permissions for '
, GROUP_CONCAT(name SEPARATOR ', ')
)
FROM partsltd_prod.Shop_Permission PERM

View File

@@ -51,8 +51,10 @@
1208_tbl_Shop_Product_Permutation_Temp.sql
1209_tbl_Shop_Variation_Type.sql
1210_tbl_Shop_Variation_Type_Audit.sql
1211_tbl_Shop_Variation_Type_Temp.sql
1212_tbl_Shop_Variation.sql
1213_tbl_Shop_Variation_Audit.sql
1214_tbl_Shop_Variation_Temp.sql
1215_tbl_Shop_Product_Permutation_Variation_Link.sql
1216_tbl_Shop_Product_Permutation_Variation_Link_Audit.sql
1218_tbl_Shop_Stock_Item.sql
@@ -189,6 +191,8 @@
7206_p_shop_save_product_permutation.sql
7206_p_shop_save_product_permutation_test.sql
7210_p_shop_get_many_product_variation.sql
7212_p_shop_save_product_variation.sql
7212_p_shop_save_product_variation_test.sql
7219_p_shop_get_many_stock_item.sql
7220_p_shop_save_stock_item.sql
7220_p_shop_save_stock_item_test.sql

View File

@@ -48,16 +48,11 @@ tr {
}
*/
table textarea {
width: 95% !important;
}
table select {
width: 100% !important;
}
table textarea,
table select,
table input {
width: 90% !important;
width: 100%;
box-sizing: border-box;
}
table button {
@@ -65,6 +60,10 @@ table button {
padding: 0.5vh 1vh;
}
tr.delete {
table button.active {
background-color: var(--c_purple_pastel);
}
tr.delete, tr.delete > td {
background-color: red;
}
}

View File

@@ -16,4 +16,7 @@ form.filter button.save, form.filter button.button-cancel {
#formFilters .container-input.filter.active {
width: 8vh;
}
#formFilters .container-input.filter.is_not_empty {
width: 12vh;
}

View File

@@ -1,7 +1,7 @@
#tableMain {
overflow-x: auto;
padding: 1vh 2vh;
padding: 1vh;
max-width: 95vw; /* min(calc(1vh * 80), calc(1vw * 90)); */
width: fit-content;
margin: 1vh 2vh;

View File

@@ -0,0 +1,46 @@
/*
#formFilters {
width: 50vh;
}
*/
#tableMain:has(thead tr th.product_variations.collapsed) {
max-width: 66vh;
}
#tableMain {
max-width: 97vh;
}
#tableMain tbody tr td.display_order, #tableMain thead tr th.display_order,
#tableMain tbody tr td.active, #tableMain thead tr th.active {
width: 6vh;
min-width: 6vh;
}
#tableMain tbody tr td.code, #tableMain thead tr th.code,
#tableMain tbody tr td.name, #tableMain thead tr th.name,
#tableMain tbody tr td.name_plural, #tableMain thead tr th.name_plural {
width: 12vh;
min-width: 12vh;
}
#tableMain thead tr th.product_variations.collapsed, #tableMain tbody tr td.product_variations.collapsed {
width: 8vh;
min-width: 8vh;
}
#tableMain thead tr th.product_variations, #tableMain tbody tr td.product_variations {
width: 41vh;
min-width: 41vh;
}
#tableMain tbody tr td.product_variations table thead tr th.code, #tableMain tbody tr td.product_variations table tbody tr td.code,
#tableMain tbody tr td.product_variations table thead tr th.name, #tableMain tbody tr td.product_variations table tbody tr td.name {
width: 12vh;
min-width: 12vh;
}
#tableMain tbody tr td.product_variations table thead tr th.display_order, #tableMain tbody tr td.product_variations table tbody tr td.display_order,
#tableMain tbody tr td.product_variations table thead tr th.active, #tableMain tbody tr td.product_variations table tbody tr td.active {
width: 6vh;
min-width: 6vh;
}

View File

@@ -5,3 +5,5 @@
.container.row {
width: auto;
}
/*# sourceMappingURL=core_admin_home.bundle.css.map*/

View File

@@ -32,3 +32,5 @@
*/
/*# sourceMappingURL=core_contact.bundle.css.map*/

View File

@@ -34,3 +34,5 @@ img {
width: fit-content;
}
/*# sourceMappingURL=core_home.bundle.css.map*/

View File

@@ -44,3 +44,5 @@ img {
max-width: 10vw;
}
*/
/*# sourceMappingURL=core_services.bundle.css.map*/

View File

@@ -6,3 +6,5 @@
#pageBody > * :last-child {
}
/*# sourceMappingURL=legal_license.bundle.css.map*/

View File

@@ -654,16 +654,11 @@ tr {
}
*/
table textarea {
width: 95% !important;
}
table select {
width: 100% !important;
}
table textarea,
table select,
table input {
width: 90% !important;
width: 100%;
box-sizing: border-box;
}
table button {
@@ -671,11 +666,16 @@ table button {
padding: 0.5vh 1vh;
}
tr.delete {
table button.active {
background-color: var(--c_purple_pastel);
}
tr.delete, tr.delete > td {
background-color: red;
}
button.collapsed {
display: block;
opacity: 0;
@@ -693,11 +693,14 @@ form.filter button.save, form.filter button.button-cancel {
#formFilters .container-input.filter.active {
width: 8vh;
}
#formFilters .container-input.filter.is_not_empty {
width: 12vh;
}
#tableMain {
overflow-x: auto;
padding: 1vh 2vh;
padding: 1vh;
max-width: 95vw; /* min(calc(1vh * 80), calc(1vw * 90)); */
width: fit-content;
margin: 1vh 2vh;
@@ -767,3 +770,5 @@ form.filter button.save, form.filter button.button-cancel {
--card-border: #dee2e6;
--card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
/*# sourceMappingURL=main.bundle.css.map*/

View File

@@ -56,3 +56,5 @@
/*# sourceMappingURL=store_home.bundle.css.map*/

View File

@@ -152,3 +152,5 @@ select.id_variation, select.id_variation_type {
}
*/
/*# sourceMappingURL=store_product_categories.bundle.css.map*/

View File

@@ -188,3 +188,5 @@ select.id_variation, select.id_variation_type {
}
*/
/*# sourceMappingURL=store_product_permutations.bundle.css.map*/

View File

@@ -138,3 +138,5 @@ th, td {
width: 15vh;
min-width: 15vh;
}
/*# sourceMappingURL=store_stock_items.bundle.css.map*/

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={497:()=>{},647:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={780:0,564:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[564],(()=>t(647)));var a=t.O(void 0,[564],(()=>t(497)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 497:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 647:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 780: 0,
/******/ 564: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [564], () => (__webpack_require__(647)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [564], () => (__webpack_require__(497)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=core_admin_home.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={206:()=>{},647:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={775:0,564:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[564],(()=>t(647)));var a=t.O(void 0,[564],(()=>t(206)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 206:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 647:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 775: 0,
/******/ 564: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [564], () => (__webpack_require__(647)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [564], () => (__webpack_require__(206)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=core_contact.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={469:()=>{},647:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={664:0,564:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[564],(()=>t(647)));var a=t.O(void 0,[564],(()=>t(469)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 469:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 647:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 664: 0,
/******/ 564: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [564], () => (__webpack_require__(647)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [564], () => (__webpack_require__(469)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=core_home.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={396:()=>{},647:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={405:0,564:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[564],(()=>t(647)));var a=t.O(void 0,[564],(()=>t(396)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 396:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 647:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 405: 0,
/******/ 564: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [564], () => (__webpack_require__(647)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [564], () => (__webpack_require__(396)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=core_services.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={132:()=>{},807:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={841:0,830:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[830],(()=>t(807)));var a=t.O(void 0,[830],(()=>t(132)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 132:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 807:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 841: 0,
/******/ 830: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [830], () => (__webpack_require__(807)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [830], () => (__webpack_require__(132)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=legal_accessibility_statement.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={527:()=>{},807:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={690:0,830:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[830],(()=>t(807)));var a=t.O(void 0,[830],(()=>t(527)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 527:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 807:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 690: 0,
/******/ 830: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [830], () => (__webpack_require__(807)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [830], () => (__webpack_require__(527)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=legal_license.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={649:()=>{},807:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={364:0,830:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[830],(()=>t(807)));var a=t.O(void 0,[830],(()=>t(649)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 649:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 807:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 364: 0,
/******/ 830: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [830], () => (__webpack_require__(807)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [830], () => (__webpack_require__(649)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=legal_privacy_policy.bundle.js.map

View File

@@ -1 +1,153 @@
(()=>{"use strict";var r,e={954:()=>{},807:()=>{}},o={};function t(r){var a=o[r];if(void 0!==a)return a.exports;var n=o[r]={exports:{}};return e[r](n,n.exports,t),n.exports}t.m=e,r=[],t.O=(e,o,a,n)=>{if(!o){var i=1/0;for(f=0;f<r.length;f++){for(var[o,a,n]=r[f],p=!0,v=0;v<o.length;v++)(!1&n||i>=n)&&Object.keys(t.O).every((r=>t.O[r](o[v])))?o.splice(v--,1):(p=!1,n<i&&(i=n));if(p){r.splice(f--,1);var s=a();void 0!==s&&(e=s)}}return e}n=n||0;for(var f=r.length;f>0&&r[f-1][2]>n;f--)r[f]=r[f-1];r[f]=[o,a,n]},t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r={607:0,830:0};t.O.j=e=>0===r[e];var e=(e,o)=>{var a,n,[i,p,v]=o,s=0;if(i.some((e=>0!==r[e]))){for(a in p)t.o(p,a)&&(t.m[a]=p[a]);if(v)var f=v(t)}for(e&&e(o);s<i.length;s++)n=i[s],t.o(r,n)&&r[n]&&r[n][0](),r[n]=0;return t.O(f)},o=self.webpackChunkapp=self.webpackChunkapp||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),t.O(void 0,[830],(()=>t(807)));var a=t.O(void 0,[830],(()=>t(954)));a=t.O(a)})();
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 954:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 807:
/***/ (() => {
// extracted by mini-css-extract-plugin
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 607: 0,
/******/ 830: 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunkapp"] = self["webpackChunkapp"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, [830], () => (__webpack_require__(807)))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, [830], () => (__webpack_require__(954)))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/ })()
;
//# sourceMappingURL=legal_retention_schedule.bundle.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,17 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
/******/ })()
;
//# sourceMappingURL=store_home.bundle.js.map

View File

@@ -0,0 +1,17 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
/******/ })()
;
//# sourceMappingURL=store_product_categories.bundle.js.map

View File

@@ -0,0 +1,17 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
/******/ })()
;
//# sourceMappingURL=store_product_permutations.bundle.js.map

View File

@@ -0,0 +1,17 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
(() => {
// extracted by mini-css-extract-plugin
})();
/******/ })()
;
//# sourceMappingURL=store_stock_items.bundle.js.map

View File

@@ -120,6 +120,21 @@ export default class API {
return await API.request(hashSaveStoreProductPermutation, 'POST', dataRequest);
}
// product variations
static async getProductVariations() {
return await API.request(hashGetStoreProductVariation);
}
static async getProductVariationsByFilters(filtersJson) {
API.goToHash(hashPageStoreProductVariations, filtersJson);
}
static async saveProductVariations(variationTypes, formFilters, comment) {
let dataRequest = {};
dataRequest[flagFormFilters] = DOM.convertForm2JSON(formFilters);
dataRequest[flagProductVariationType] = variationTypes;
dataRequest[flagComment] = comment;
return await API.request(hashSaveStoreProductVariation, 'POST', dataRequest);
}
// stock items
static async getStockItems() {
return await API.request(hashGetStoreStockItem);

View File

@@ -101,8 +101,8 @@ export default class DOM {
return container.querySelector('.' + flagDirty) != null;
}
static hasDirtyChildrenNotDeletedContainer(container) {
if (container == null) return false;
return container.querySelector('.' + flagDirty + ':not(.' + flagDelete + ')') != null;
if (container == null || container.classList.contains(flagDelete)) return false;
return container.querySelector('.' + flagDirty + ':not(.' + flagDelete + ', .' + flagDelete + ' *)') != null;
}
static getElementValueCurrent(element) {
let returnVal = '';
@@ -120,6 +120,9 @@ export default class DOM {
else if (element.tagName === 'INPUT' || element.tagName === 'TEXTAREA' || element.tagName === 'SELECT') {
returnVal = element.value;
}
else if (element.tagName === 'BUTTON' && element.classList.contains(flagActive)) {
returnVal = element.classList.contains(flagDelete);
}
else {
returnVal = element.textContent;
}

View File

@@ -24,4 +24,12 @@ export default class BusinessObjects {
static getObjectText(objectJson) {
return objectJson[objectJson[flagNameAttrOptionText]];
}
static getListObjectsFromIdDictAndCsv(idDict, idCsv) {
let listObjects = [];
let ids = idCsv.split(',');
for (let id of ids) {
listObjects.push(idDict[id]);
}
return listObjects;
}
}

View File

@@ -174,7 +174,7 @@ export default class TableBasePage extends BasePage {
let records = [];
let record;
document.querySelectorAll(idTableMain + ' > tbody > tr').forEach((row) => {
if (dirtyOnly && !row.classList.contains(flagDirty)) return;
if (dirtyOnly && !DOM.hasDirtyChildrenContainer(row)) return;
record = this.getJsonRow(row);
records.push(record);
});
@@ -217,28 +217,22 @@ export default class TableBasePage extends BasePage {
});
}
hookupButtonAddRowTable() {
this.hookupEventHandler("click", idFormFilters + ' button.' + flagAdd, (event, button) => {
event.stopPropagation();
let tbody = document.querySelector(idTableMain + ' tbody');
let row = _rowBlank.cloneNode(true);
row.classList.remove(flagInitialised);
row.querySelectorAll('.' + flagInitialised).forEach(function(element) {
element.classList.remove(flagInitialised);
});
let countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
row.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
/* Shared nethods
let newDisplayOrder = parseInt(tbody.querySelector('tr:last-child').querySelector('td.' + flagDisplayOrder + ' .' + flagSlider).getAttribute(attrValueCurrent)) + 1;
let slider = tbody.querySelector('tr:last-child').querySelector('td.' + flagDisplayOrder + ' .' + flagSlider);
if (slider) {
slider.setAttribute(attrValueCurrent, newDisplayOrder);
slider.setAttribute(attrValuePrevious, newDisplayOrder);
}
*/
this.initialiseRowNew(row);
tbody.appendChild(row);
this.hookupTableMain();
this.hookupEventHandler("click", idFormFilters + ' button.' + flagAdd, (event, button) => { this.handleClickAddRowTable(event, button); });
}
handleClickAddRowTable(event, button) {
event.stopPropagation();
_rowBlank.setAttribute(this.constructor.attrIdRowObject, -1 - _rowBlank.getAttribute(this.constructor.attrIdRowObject));
let tbody = document.querySelector(idTableMain + ' tbody');
let row = _rowBlank.cloneNode(true);
row.classList.remove(flagInitialised);
row.querySelectorAll('.' + flagInitialised).forEach(function(element) {
element.classList.remove(flagInitialised);
});
let countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
row.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
this.initialiseRowNew(row);
tbody.appendChild(row);
this.hookupTableMain();
}
initialiseRowNew(row) {
if (this.constructor === TableBasePage) {
@@ -260,10 +254,12 @@ export default class TableBasePage extends BasePage {
let selectorRowNew = idTableMain + ' tbody tr.' + flagRowNew;
let rowBlankTemp = document.querySelector(selectorRowNew);
if (_verbose) { console.log("row blank temp: ", rowBlankTemp); }
let countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
_rowBlank = rowBlankTemp.cloneNode(true);
document.querySelectorAll(selectorRowNew).forEach(function(row) {
row.remove();
});
_rowBlank.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
}
hookupSlidersDisplayOrderTable() {
let selectorDisplayOrder = idTableMain + ' tbody tr td.' + flagDisplayOrder + ' input.' + flagSlider + '.' + flagDisplayOrder;
@@ -299,12 +295,12 @@ export default class TableBasePage extends BasePage {
handleChangeElementCellTable(event, element) {
let row = DOM.getRowFromElement(element);
let td = DOM.getCellFromElement(element);
let wasDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let wasDirtyRow = DOM.hasDirtyChildrenContainer(row);
let wasDirtyElement = element.classList.contains(flagDirty);
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
if (isDirtyElement != wasDirtyElement) {
DOM.handleDirtyElement(td, isDirtyElement);
let isNowDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let isNowDirtyRow = DOM.hasDirtyChildrenContainer(row);
if (isNowDirtyRow != wasDirtyRow) {
DOM.handleDirtyElement(row, isNowDirtyRow);
let rows = this.getTableRecords(true);
@@ -326,12 +322,12 @@ export default class TableBasePage extends BasePage {
}
let row = DOM.getRowFromElement(element);
let td = DOM.getCellFromElement(element);
let wasDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let wasDirtyRow = DOM.hasDirtyChildrenContainer(row);
let wasDirtyElement = element.classList.contains(flagDirty);
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
if (isDirtyElement != wasDirtyElement) {
DOM.handleDirtyElement(td, isDirtyElement);
let isNowDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let isNowDirtyRow = DOM.hasDirtyChildrenContainer(row);
if (isNowDirtyRow != wasDirtyRow) {
DOM.handleDirtyElement(row, isNowDirtyRow);
let rows = this.getTableRecords(true);
@@ -345,18 +341,18 @@ export default class TableBasePage extends BasePage {
let rowTable = rowSubtable.closest(idTableMain + ' > tbody > tr');
let td = DOM.getCellFromElement(element);
// let tdSubtable = td.closest('td.' + flagFieldSubtable);
let wasDirtyRowSubtable = DOM.hasDirtyChildrenNotDeletedContainer(rowSubtable);
let wasDirtyRowTable = DOM.hasDirtyChildrenNotDeletedContainer(rowTable);
let wasDirtyRowSubtable = DOM.hasDirtyChildrenContainer(rowSubtable);
let wasDirtyRowTable = DOM.hasDirtyChildrenContainer(rowTable);
let wasDirtyElement = element.classList.contains(flagDirty);
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
console.log({isDirtyElement, wasDirtyElement});
if (isDirtyElement != wasDirtyElement) {
DOM.handleDirtyElement(td, isDirtyElement);
let isNowDirtyRowSubtable = DOM.hasDirtyChildrenNotDeletedContainer(rowSubtable);
let isNowDirtyRowSubtable = DOM.hasDirtyChildrenContainer(rowSubtable);
console.log({isNowDirtyRowSubtable, wasDirtyRowSubtable});
if (isNowDirtyRowSubtable != wasDirtyRowSubtable) {
DOM.handleDirtyElement(rowSubtable, isNowDirtyRowSubtable);
let isNowDirtyRowTable = DOM.hasDirtyChildrenNotDeletedContainer(rowTable);
let isNowDirtyRowTable = DOM.hasDirtyChildrenContainer(rowTable);
console.log({isNowDirtyRowTable, wasDirtyRowTable});
if (isNowDirtyRowTable != wasDirtyRowTable) {
DOM.handleDirtyElement(rowTable, isNowDirtyRowTable);
@@ -370,13 +366,14 @@ export default class TableBasePage extends BasePage {
*/
handleChangeNestedElementCellTable(event, element) {
let wasDirtyParentRows = this.getAllIsDirtyRowsInParentTree(element);
let wasDirtyElement = element.classList.contains(flagDirty);
let wasDirtyElement = DOM.isElementDirty(element);
let isDirtyElement = DOM.updateAndCheckIsElementDirty(element);
if (_verbose) { console.log({isDirtyElement, wasDirtyElement, wasDirtyParentRows}); }
if (isDirtyElement != wasDirtyElement) {
let td = DOM.getCellFromElement(element);
DOM.setElementAttributeValueCurrent(td, DOM.getElementAttributeValueCurrent(element));
this.toggleShowButtonsSaveCancel(isDirtyElement);
DOM.handleDirtyElement(td, isDirtyElement);
this.updateAndToggleShowButtonsSaveCancel();
this.cascadeChangedIsDirtyNestedElementCellTable(element, isDirtyElement, wasDirtyParentRows);
}
}
@@ -396,15 +393,15 @@ export default class TableBasePage extends BasePage {
cascadeChangedIsDirtyNestedElementCellTable(element, isDirtyElement, wasDirtyParentRows) {
if (Validation.isEmpty(wasDirtyParentRows)) return;
let td = DOM.getCellFromElement(element);
let isDirtyTd = isDirtyElement || DOM.hasDirtyChildrenNotDeletedContainer(tr);
let isDirtyTd = isDirtyElement || DOM.hasDirtyChildrenContainer(tr);
DOM.handleDirtyElement(td, isDirtyTd);
let tr = DOM.getRowFromElement(td);
let isDirtyRow = isDirtyTd || DOM.hasDirtyChildrenNotDeletedContainer(tr);
let wasDirtyRow = wasDirtyParentRows.pop();
let isDirtyRow = isDirtyTd || DOM.hasDirtyChildrenContainer(tr);
let wasDirtyRow = wasDirtyParentRows.shift();
if (_verbose) { console.log({isDirtyRow, wasDirtyRow}); }
if (isDirtyRow != wasDirtyRow) {
DOM.handleDirtyElement(tr, isDirtyRow);
this.toggleShowButtonsSaveCancel(isDirtyRow);
this.updateAndToggleShowButtonsSaveCancel();
this.cascadeChangedIsDirtyNestedElementCellTable(tr.parentElement, isDirtyRow, wasDirtyParentRows);
}
}
@@ -480,8 +477,18 @@ export default class TableBasePage extends BasePage {
hookupTextareasDescriptionTable() {
this.hookupChangeHandlerTableCells(idTableMain + ' tbody tr td.' + flagDescription + ' textarea');
}
hookupInputsActiveTable() {
this.hookupChangeHandlerTableCells(idTableMain + ' > tbody > tr > td.' + flagActive + ' input[type="checkbox"]');
hookupFieldsActive(flagTable = '', handleClickRowNew = (event, element) => { this.handleClickAddRowTable(event, element); }) {
let selectorButton = 'table' + (Validation.isEmpty(flagTable) ? '' : '.' + flagTable) + ' > tbody > tr > td.' + flagActive + ' button';
let selectorButtonDelete = selectorButton + '.' + flagDelete;
let selectorButtonUndelete = selectorButton + ':not(.' + flagDelete + ')';
console.log("hookupFieldsActive: ", selectorButtonDelete, selectorButtonUndelete);
this.hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete);
this.hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete);
this.hookupEventHandler(
"click"
, 'table' + (Validation.isEmpty(flagTable) ? '' : '.' + flagTable) + ' > thead > tr > th.' + flagActive + ' button'
, (event, button) => { handleClickRowNew(event, button); }
);
}
hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete) {
this.hookupEventHandler("click", selectorButtonDelete, (event, element) => {
@@ -489,14 +496,18 @@ export default class TableBasePage extends BasePage {
});
}
handleClickButtonRowDelete(event, element, selectorButtonDelete, selectorButtonUndelete) {
let row = DOM.getRowFromElement(element);
row.classList.add(flagDelete);
let buttonAdd = document.createElement("button");
// let row = DOM.getRowFromElement(element);
// row.classList.add(flagDelete);
let buttonAdd = element.cloneNode(false); // document.createElement("button");
buttonAdd.classList.remove(flagInitialised);
buttonAdd.classList.remove(flagDelete);
buttonAdd.classList.add(flagAdd);
buttonAdd.textContent = '+';
// DOM.setElementAttributeValueCurrent(buttonAdd, false);
element.replaceWith(buttonAdd);
this.handleChangeNestedElementCellTable(null, buttonAdd);
this.hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete);
this.updateAndToggleShowButtonsSaveCancel();
}
hookupButtonsRowUndelete(selectorButtonDelete, selectorButtonUndelete) {
this.hookupEventHandler("click", selectorButtonUndelete, (event, element) => {
@@ -504,14 +515,18 @@ export default class TableBasePage extends BasePage {
});
}
handleClickButtonRowUndelete(event, element, selectorButtonDelete, selectorButtonUndelete) {
let row = DOM.getRowFromElement(element);
row.classList.add(flagDelete);
let buttonAdd = document.createElement("button");
buttonAdd.classList.add(flagAdd);
buttonAdd.textContent = '+';
element.replaceWith(buttonAdd);
// let row = DOM.getRowFromElement(element);
// row.classList.remove(flagDelete);
let buttonDelete = element.cloneNode(false); // document.createElement("button");
buttonDelete.classList.remove(flagInitialised);
buttonDelete.classList.remove(flagAdd);
buttonDelete.classList.add(flagDelete);
buttonDelete.textContent = 'x';
// DOM.setElementAttributeValueCurrent(buttonDelete, true);
element.replaceWith(buttonDelete);
this.handleChangeNestedElementCellTable(null, buttonDelete);
this.hookupButtonsRowDelete(selectorButtonDelete, selectorButtonUndelete);
this.updateAndToggleShowButtonsSaveCancel();
}
hookupTdsAccessLevel() {
let cellSelector = idTableMain + ' tbody td.' + flagAccessLevel;
@@ -571,7 +586,7 @@ export default class TableBasePage extends BasePage {
let row = DOM.getRowFromElement(ddl);
let td = DOM.getCellFromElement(ddl);
console.log("td: ", td);
let wasDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let wasDirtyRow = DOM.hasDirtyChildrenContainer(row);
let wasDirtyElement = ddl.classList.contains(flagDirty);
let isDirtyElement = DOM.updateAndCheckIsElementDirty(ddl);
console.log("isDirtyElement: ", isDirtyElement);
@@ -580,7 +595,7 @@ export default class TableBasePage extends BasePage {
DOM.handleDirtyElement(td, isDirtyElement);
let optionSelected = ddl.options[ddl.selectedIndex];
DOM.setElementAttributeValueCurrent(td, optionSelected.value);
let isNowDirtyRow = DOM.hasDirtyChildrenNotDeletedContainer(row);
let isNowDirtyRow = DOM.hasDirtyChildrenContainer(row);
console.log("isNowDirtyRow: ", isNowDirtyRow);
console.log("wasDirtyRow: ", wasDirtyRow);
if (isNowDirtyRow != wasDirtyRow) {
@@ -885,16 +900,24 @@ export default class TableBasePage extends BasePage {
let columnThHasFlag = columnTh.classList.contains(classnameFlag);
if (isRequiredFlag == columnThHasFlag) return;
DOM.toggleElementHasClassnameFlag(columnTh, isRequiredFlag, classnameFlag);
/*
let columnTds = table.querySelectorAll('td.' + columnFlag);
columnTds.forEach((columnTd) => {
DOM.toggleElementHasClassnameFlag(columnTd, isRequiredFlag, classnameFlag);
});
*/
}
toggleColumnHeaderHasClassnameFlag(columnFlag, isRequiredFlag, classnameFlag) {
let table = TableBasePage.getTableMain();
let columnTh = table.querySelector('th.' + columnFlag);
DOM.toggleElementHasClassnameFlag(columnTh, isRequiredFlag, classnameFlag);
}
updateAndToggleShowButtonsSaveCancel() {
let records = this.getTableRecords(true);
let existsDirtyRecord = records.length > 0;
this.toggleShowButtonsSaveCancel(existsDirtyRecord);
}
}

View File

@@ -92,7 +92,7 @@ export default class PageStoreManufacturingPurchaseOrders extends TableBasePage
this.hookupCurrencyFields();
this.hookupCostAndPriceInputs();
this.hookupOrderItemsFields();
this.hookupInputsActiveTable();
this.hookupFieldsActive();
}
hookupCostAndPriceInputs() {
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagCostTotalLocalVatExcl + ' input');

View File

@@ -102,7 +102,7 @@ export default class PageStoreProductCategories extends TableBasePage {
this.hookupTextareasNameTable();
this.hookupTextareasDescriptionTable();
this.hookupTdsAccessLevel();
this.hookupInputsActiveTable();
this.hookupFieldsActive();
}
/*

View File

@@ -0,0 +1,245 @@
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 TableBasePage from "../base_table.js";
import Utils from "../../lib/utils.js";
import Validation from "../../lib/validation.js";
import StoreTableMixinPage from "./mixin_table.js";
export default class PageStoreProductVariations extends TableBasePage {
static hash = hashPageStoreProductVariations;
static attrIdRowObject = attrIdProductVariation;
callFilterTableContent = API.getProductVariationsByFilters;
callSaveTableContent = API.saveProductVariations;
constructor(router) {
super(router);
this.storeMixin = new StoreTableMixinPage(this);
}
initialize() {
this.sharedInitialize();
}
hookupFilters() {
this.sharedHookupFilters();
this.hookupFilterActive();
this.hookupFilterIsNotEmpty();
}
loadRowTable(rowJson) {
}
getJsonRow(row) {
if (row == null) return;
let inputDisplayOrder = row.querySelector('td.' + flagDisplayOrder + ' input');
let textareaCode = row.querySelector('td.' + flagCode + ' textarea');
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 jsonRow = {};
jsonRow[attrIdProductVariationType] = row.getAttribute(attrIdProductVariationType);
if (Validation.isEmpty(jsonRow[attrIdProductVariationType])) jsonRow[attrIdProductVariationType] = -1;
jsonRow[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(inputDisplayOrder);
jsonRow[flagCode] = DOM.getElementAttributeValueCurrent(textareaCode);
jsonRow[flagName] = DOM.getElementAttributeValueCurrent(textareaName);
jsonRow[flagNamePlural] = DOM.getElementAttributeValueCurrent(textareaNamePlural);
let variations = [];
if (tdProductVariations.classList.contains(flagDirty)) {
let trsProductVariation = tdProductVariations.querySelectorAll('tr.' + flagProductVariation + '.' + flagDirty);
if (trsProductVariation != null) {
trsProductVariation.forEach((tr, indexRow) => {
variations.push(this.getJsonRowProductVariation(tr, indexRow));
});
}
}
else {
// variations = BusinessObjects.getListObjectsFromIdDictAndCsv(productVariationTypes, DOM.getElementAttributeValueCurrent(tdProductVariations));
}
jsonRow[flagProductVariations] = variations;
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
return jsonRow;
}
getJsonRowProductVariation(tr, indexRow) {
let inputDisplayOrder = tr.querySelector('td.' + flagDisplayOrder + ' input');
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 jsonRow = {};
jsonRow[attrIdProductVariation] = tr.getAttribute(attrIdProductVariation);
if (Validation.isEmpty(jsonRow[attrIdProductVariation])) jsonRow[attrIdProductVariation] = -1 - indexRow;
jsonRow[attrIdProductVariationType] = tr.getAttribute(attrIdProductVariationType);
jsonRow[flagDisplayOrder] = DOM.getElementAttributeValueCurrent(inputDisplayOrder);
jsonRow[flagCode] = DOM.getElementAttributeValueCurrent(textareaCode);
jsonRow[flagName] = DOM.getElementAttributeValueCurrent(textareaName);
jsonRow[flagActive] = buttonActive.classList.contains(flagDelete);
return jsonRow;
}
initialiseRowNew(row) {
super.initialiseRowNew(row);
}
hookupTableMain() {
super.hookupTableMain();
this.hookupSlidersDisplayOrderTable();
this.hookupTextareasCodeTable();
this.hookupTextareasNameTable();
this.hookupTextareasNamePluralTable();
this.hookupFieldsProductVariation();
this.hookupFieldsActive();
}
hookupTextareasNamePluralTable() {
this.hookupChangeHandlerTableCells(idTableMain + ' tbody tr td.' + flagNamePlural + ' textarea');
}
hookupFieldsProductVariation() {
this.hookupProductVariationsPreviews();
this.hookupFieldsProductVariationDisplayOrder();
this.hookupFieldsProductVariationCode();
this.hookupFieldsProductVariationName();
this.hookupFieldsProductVariationActive();
}
hookupProductVariationsPreviews() {
this.hookupEventHandler("click", idTableMain + ' td.' + flagProductVariations, (event, td) => {
if (!td.classList.contains(flagCollapsed)) return;
this.handleClickProductVariationsPreview(event, td);
});
}
handleClickProductVariationsPreview(event, element) {
if (_verbose) { console.log("click order items preview"); }
this.toggleColumnHeaderCollapsed(flagProductVariations, false);
element.classList.remove(flagCollapsed);
let row = DOM.getRowFromElement(element);
let idProductVariationType = row.getAttribute(attrIdProductVariationType);
if (idProductVariationType == null || idProductVariationType < 1) return;
let productVariationType = productVariationTypes[idProductVariationType];
let tblProductVariations = document.createElement("table");
tblProductVariations.classList.add(flagProductVariations);
let thead = document.createElement("thead");
let tr = document.createElement("tr");
let thDisplayOrder = document.createElement("th");
thDisplayOrder.classList.add(flagDisplayOrder);
thDisplayOrder.textContent = 'Display Order';
let thCode = document.createElement("th");
thCode.classList.add(flagCode);
thCode.textContent = 'Code';
let thName = document.createElement("th");
thName.classList.add(flagName);
thName.textContent = 'Name';
let thActive = document.createElement("th");
thActive.classList.add(flagActive);
// thActive.textContent = 'Active';
let buttonAdd = document.createElement("button");
buttonAdd.classList.add(flagActive);
buttonAdd.classList.add(flagAdd);
buttonAdd.textContent = '+';
thActive.appendChild(buttonAdd);
tr.appendChild(thDisplayOrder);
tr.appendChild(thCode);
tr.appendChild(thName);
tr.appendChild(thActive);
thead.appendChild(tr);
tblProductVariations.appendChild(thead);
let tbody = document.createElement("tbody");
productVariationType[flagProductVariations].forEach((productVariation, index) => {
this.addRowProductVariation(tbody, productVariation);
});
tblProductVariations.appendChild(tbody);
let cell = DOM.getCellFromElement(element);
let cellNew = cell.cloneNode(false);
cellNew.appendChild(tblProductVariations);
row.replaceChild(cellNew, cell);
if (_verbose) { console.log("tblProductVariations: ", tblProductVariations); }
this.hookupFieldsProductVariation();
}
addRowProductVariation(tbody, productVariation) {
if (_verbose) { console.log("addRowProductVariation: ", productVariation); }
let tdDisplayOrder = document.createElement("td");
tdDisplayOrder.classList.add(flagDisplayOrder);
let inputDisplayOrder = document.createElement("input");
inputDisplayOrder.classList.add(flagDisplayOrder);
inputDisplayOrder.type = 'number';
inputDisplayOrder.step = 1;
DOM.setElementValuesCurrentAndPrevious(inputDisplayOrder, productVariation[flagDisplayOrder]);
tdDisplayOrder.appendChild(inputDisplayOrder);
let tdCode = document.createElement("td");
tdCode.classList.add(flagCode);
let textareaCode = document.createElement("textarea");
textareaCode.classList.add(flagCode);
DOM.setElementValuesCurrentAndPrevious(textareaCode, productVariation[flagCode]);
tdCode.appendChild(textareaCode);
let tdName = document.createElement("td");
tdName.classList.add(flagName);
let textareaName = document.createElement("textarea");
textareaName.classList.add(flagName);
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 tr = document.createElement("tr");
tr.classList.add(flagProductVariation);
tr.setAttribute(attrIdProductVariationType, productVariation[attrIdProductVariationType]);
tr.setAttribute(attrIdProductVariation, productVariation[attrIdProductVariation]);
tr.appendChild(tdDisplayOrder);
tr.appendChild(tdCode);
tr.appendChild(tdName);
tr.appendChild(tdActive);
tbody.appendChild(tr);
}
hookupFieldsProductVariationDisplayOrder() {
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagProductVariations + ' td.' + flagDisplayOrder + ' input');
}
hookupFieldsProductVariationCode() {
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagProductVariations + ' textarea.' + flagCode);
}
hookupFieldsProductVariationName() {
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagProductVariations + ' textarea.' + flagName);
}
hookupFieldsProductVariationActive() {
this.hookupFieldsActive(flagProductVariations, (event, element) => { this.hookupButtonsProductVariationAdd(event, element); });
}
hookupButtonsProductVariationAdd(event, element) {
let row = element.closest(idTableMain + ' > tbody > tr');
let idProductVariationType = row.getAttribute(attrIdProductVariationType);
let idProductVariation = row.getAttribute(attrIdProductVariation);
let countProductVariations = row.querySelectorAll('td.' + flagProductVariations + ' tr').length;
let productVariation = {
[attrIdProductVariationType]: idProductVariationType,
[attrIdProductVariation]: idProductVariation,
[flagCode]: '',
[flagName]: '',
[flagDisplayOrder]: countProductVariations,
[flagActive]: true,
};
let tbody = row.querySelector('td.' + flagProductVariations + ' table tbody');
this.addRowProductVariation(tbody, productVariation);
this.hookupFieldsProductVariation();
}
leave() {
super.leave();
}
}

View File

@@ -105,7 +105,7 @@ export default class PageStoreProducts extends TableBasePage {
this.hookupTextareasNameTable();
this.hookupInputsHasVariationsTable();
this.hookupTdsAccessLevel();
this.hookupInputsActiveTable();
this.hookupFieldsActive();
}
hookupTdsProductCategory() {
let cellSelector = idTableMain + ' tbody td.' + flagProductCategory;

View File

@@ -97,7 +97,7 @@ export default class PageStoreSupplierPurchaseOrders extends TableBasePage {
this.hookupCurrencyFields();
this.hookupCostInputs();
this.hookupOrderItemsFields();
this.hookupInputsActiveTable();
this.hookupFieldsActive();
}
hookupSupplierFields() {
this.hookupTableCellDdlPreviews(idTableMain + ' td.' + flagSupplier, Utils.getListFromDict(suppliers));

View File

@@ -100,7 +100,7 @@ export default class PageStoreSuppliers extends TableBasePage {
this.hookupEmailInputs();
this.hookupWebsiteInputs();
this.hookupCurrencyFields();
this.hookupInputsActiveTable();
this.hookupFieldsActive();
}
hookupNameCompanyInputs() {
this.hookupChangeHandlerTableCells(idTableMain + ' td.' + flagNameCompany + ' textarea');

View File

@@ -17,7 +17,7 @@ import PageStoreProductCategories from './pages/store/product_categories.js';
import PageStoreProductPermutations from './pages/store/product_permutations.js';
// import PageStoreProductPrices from './pages/store/product_prices.js';
import PageStoreProducts from './pages/store/products.js';
// import PageStoreProductVariations from './pages/store/product_variations.js';
import PageStoreProductVariations from './pages/store/product_variations.js';
import PageStoreStockItems from './pages/store/stock_items.js';
import PageStoreSuppliers from './pages/store/suppliers.js';
import PageStoreSupplierPurchaseOrders from './pages/store/supplier_purchase_orders.js';
@@ -85,7 +85,7 @@ export default class Router {
this.pages[hashPageStoreProductPermutations] = { name: 'PageStoreProductPermutations', module: PageStoreProductPermutations }; // pathModule: './pages/store/product_permutations.js' };
// this.pages[hashPageStoreProductPrices] = { name: 'PageStoreProductPrices', module: PageStoreProductPrices }; // pathModule: './pages/store/product_prices.js' };
this.pages[hashPageStoreProducts] = { name: 'PageStoreProducts', module: PageStoreProducts }; // pathModule: './pages/store/products.js' };
// this.pages[hashPageStoreProductVariations] = { name: 'PageStoreProductVariations', module: PageStoreProductVariations }; // pathModule: './pages/store/product_variations.js' };
this.pages[hashPageStoreProductVariations] = { name: 'PageStoreProductVariations', module: PageStoreProductVariations }; // pathModule: './pages/store/product_variations.js' };
this.pages[hashPageStoreStockItems] = { name: 'PageStoreStockItems', module: PageStoreStockItems };
this.pages[hashPageStoreSuppliers] = { name: 'PageStoreSuppliers', module: PageStoreSuppliers };
this.pages[hashPageStoreSupplierPurchaseOrders] = { name: 'PageSupplierPurchaseOrders', module: PageStoreSupplierPurchaseOrders };
@@ -112,7 +112,7 @@ export default class Router {
this.routes[hashPageStoreProductPermutations] = (isPopState = false) => this.navigateToHash(hashPageStoreProductPermutations, isPopState);
// this.routes[hashPageStoreProductPrices] = (isPopState = false) => this.navigateToHash(hashPageStoreProductPrices, isPopState);
this.routes[hashPageStoreProducts] = (isPopState = false) => this.navigateToHash(hashPageStoreProducts, isPopState);
// this.routes[hashPageStoreProductVariations] = (isPopState = false) => this.navigateToHash(hashPageStoreProductVariations, isPopState);
this.routes[hashPageStoreProductVariations] = (isPopState = false) => this.navigateToHash(hashPageStoreProductVariations, isPopState);
this.routes[hashPageStoreStockItems] = (isPopState = false) => this.navigateToHash(hashPageStoreStockItems, isPopState);
this.routes[hashPageStoreSuppliers] = (isPopState = false) => this.navigateToHash(hashPageStoreSuppliers, isPopState);
this.routes[hashPageStoreSupplierPurchaseOrders] = (isPopState = false) => this.navigateToHash(hashPageStoreSupplierPurchaseOrders, isPopState);

View File

@@ -0,0 +1,21 @@
{% with _is_blank_row = (is_blank_row or variation_type is not defined or variation_type.variations is none or variation_type.variations == [] or is_blank_row is not defined) %}
{% if not _is_blank_row %}
{# {% set ids_variation = variation_type.get_str_list_ids_variation() %} #}
<div class="{{ model.FLAG_PRODUCT_VARIATIONS }}"
{#
{{ model.ATTR_VALUE_CURRENT }}="{{ ids_variation }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ ids_variation }}"
#}
>
{#
{{ variation_type.get_preview_variations() }}
#}
{% for variation in variation_type.variations %}
{{ variation.name }}<br>
{% endfor %}
</div>
{% else %}
<div class="{{ model.FLAG_PRODUCT_VARIATIONS }}"></div>
{% endif %}
{% endwith %}

View File

@@ -1,6 +1,6 @@
{% with _is_blank_row = (is_blank_row or variation_tree is not defined or is_blank_row is not defined) %}
{% if not is_blank_row %}
{% if not _is_blank_row %}
{# % set json_str_variation_types = product.get_json_str_types_variation_trees() % #}
{% set names_variation_type = product.get_variation_types_unique() %}
{% set json_str_variation_types = jsonify(names_variation_type) %}

View File

@@ -1,5 +1,5 @@
{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_PRODUCT }}" {{ model.ATTR_ID_PRODUCT_CATEGORY }}>
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_PRODUCT }}" {{ model.ATTR_ID_PRODUCT }}>
<td class="{{ model.FLAG_DISPLAY_ORDER }}">
{% include 'components/common/buttons/_slider_display_order.html' %}
</td>

Some files were not shown because too many files have changed in this diff Show More