feat(UI): Stock Items page added with getting, filtering, and saving data.
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ product.id_product }}"
|
||||
>{{ product.name }}</div>
|
||||
{% else %}
|
||||
<div
|
||||
class="{{ model.FLAG_PRODUCT }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}=""
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}=""
|
||||
></div>
|
||||
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/common/inputs/_option_blank.html' %}
|
||||
{% for product in model.category_list_filters.categories[0].products %}
|
||||
<option value="{{ product.id_product }}">{{ product.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
@@ -6,9 +6,10 @@
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ category.id_category }}"
|
||||
>{{ category.name }}</div>
|
||||
{% else %}
|
||||
<div
|
||||
class="{{ model.FLAG_PRODUCT_CATEGORY }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}=""
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}=""
|
||||
></div>
|
||||
<select class="{{ model.FLAG_PRODUCT_CATEGORY}}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/common/inputs/_option_blank.html' %}
|
||||
{% for cat in model.category_list_filters.categories %}
|
||||
<option value="{{ cat.id_category }}">{{ cat.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
{% with _is_blank_row = (is_blank_row or storage_location is not defined or storage_location is none or is_blank_row is not defined) %}
|
||||
{% if not _is_blank_row %}
|
||||
{% set name = storage_location.get_full_name() %}
|
||||
<div
|
||||
class="{{ model.FLAG_STORAGE_LOCATION }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ name }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ name }}"
|
||||
>{{ name }}</div>
|
||||
{% else %}
|
||||
<div class="{{ model.FLAG_STORAGE_LOCATION }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
@@ -4,12 +4,7 @@
|
||||
{% include 'components/common/buttons/_slider_display_order.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
<select class="{{ model.FLAG_PRODUCT_CATEGORY}}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/common/inputs/_option_blank.html' %}
|
||||
{% for cat in model.category_list_filters.categories %}
|
||||
<option value="{{ cat.id_category }}">{{ cat.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% include 'components/store/_preview_DDL_product_category.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_NAME }}">
|
||||
<textarea class="{{ model.FLAG_NAME }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></textarea>
|
||||
@@ -20,13 +15,13 @@
|
||||
</td>
|
||||
#}
|
||||
<td class="{{ model.FLAG_HAS_VARIATIONS }}">
|
||||
<input class="{{ model.FLAG_HAS_VARIATIONS }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="false" {{ model.ATTR_VALUE_PREVIOUS }}="false">
|
||||
<input class="{{ model.FLAG_HAS_VARIATIONS }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_FALSE }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACCESS_LEVEL }}" {{ model.ATTR_ID_ACCESS_LEVEL }}="1" {{ model.FLAG_ACCESS_LEVEL_REQUIRED }}="View">
|
||||
<div class="{{ model.FLAG_ACCESS_LEVEL}}" {{ model.ATTR_ID_ACCESS_LEVEL }}="1">View</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}">
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="{{ model.FLAG_ACCESS_LEVEL}}" {{ model.ATTR_VALUE_CURRENT }}="1" {{ model.ATTR_VALUE_PREVIOUS }}="1">View</div>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" checked {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}">
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
|
||||
@@ -2,20 +2,10 @@
|
||||
{% if is_blank_row %}
|
||||
<tr class="{{ model.FLAG_ROW_NEW }}" {{ model.ATTR_ID_PERMUTATION }}>
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
<select class="{{ model.FLAG_PRODUCT_CATEGORY}}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/common/inputs/_option_blank.html' %}
|
||||
{% for cat in model.category_list_filters.categories %}
|
||||
<option value="{{ cat.id_category }}">{{ cat.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% include 'components/store/_preview_DDL_product_category.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/common/inputs/_option_blank.html' %}
|
||||
{% for product in model.category_list_filters.categories[0].products %}
|
||||
<option value="{{ product.id_product }}">{{ product.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% include 'components/store/_preview_DDL_product.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT_VARIATIONS }} {{ model.FLAG_COLLAPSED}}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
{% include 'components/store/_preview_product_permutation_variations.html' %}
|
||||
@@ -40,7 +30,7 @@
|
||||
{% include 'components/store/_preview_DDL_product_permutation_unit_measurement_quantity.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_IS_SUBSCRIPTION }}">
|
||||
<input class="{{ model.FLAG_IS_SUBSCRIPTION }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="false" {{ model.ATTR_VALUE_PREVIOUS }}="false">
|
||||
<input class="{{ model.FLAG_IS_SUBSCRIPTION }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_FALSE }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}">
|
||||
<input class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }} {{ model.FLAG_COLLAPSED }}"
|
||||
@@ -53,7 +43,7 @@
|
||||
<input class="{{ model.FLAG_ID_STRIPE_PRODUCT }}" type="text" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}">
|
||||
<input class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="false" {{ model.ATTR_VALUE_PREVIOUS }}="false">
|
||||
<input class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_FALSE }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}">
|
||||
<input class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }} {{ model.FLAG_COLLAPSED }}"
|
||||
@@ -77,7 +67,7 @@
|
||||
<input class="{{ model.FLAG_LATENCY_MANUFACTURE_DAYS }}" type="number" min="0" value="1" {{ model.ATTR_VALUE_CURRENT }}="1" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true" checked>
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}" checked>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
@@ -113,12 +103,16 @@
|
||||
{% include 'components/store/_preview_DDL_product_permutation_unit_measurement_quantity.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_IS_SUBSCRIPTION }}">
|
||||
<input class="{{ model.FLAG_IS_SUBSCRIPTION }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.is_subscription }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.is_subscription }}">
|
||||
<input class="{{ model.FLAG_IS_SUBSCRIPTION }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.is_subscription | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.is_subscription | lower }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}">
|
||||
{% set value = permutation.count_interval_recurrence if permutation.count_interval_recurrence is not none else '' %}
|
||||
{% set value = permutation.count_interval_recurrence if permutation.count_interval_recurrence is not none else 1 %}
|
||||
<input class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }} {% if not permutation.is_subscription %}{{ model.FLAG_COLLAPSED }}{% endif %}"
|
||||
type="number" min="0" value="{{ value }}" {{ model.ATTR_VALUE_CURRENT }}="{{ value }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}">
|
||||
type="number" min="0"
|
||||
value="{% if value is not none %}{{ value }}{% else %}{{ 1 }}{% endif %}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{% if value is not none %}{{ value }}{% else %}{{ 1 }}{% endif %}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}"
|
||||
/>
|
||||
</td>
|
||||
|
||||
{% set value = permutation.id_unit_measurement_interval_recurrence if permutation.id_unit_measurement_interval_recurrence is not none else '' %}
|
||||
@@ -130,12 +124,16 @@
|
||||
<input class="{{ model.FLAG_ID_STRIPE_PRODUCT }}" type="text" value="{{ value }}" {{ model.ATTR_VALUE_CURRENT }}="{{ value }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}">
|
||||
<input class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.does_expire_faster_once_unsealed }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.does_expire_faster_once_unsealed }}">
|
||||
<input class="{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.does_expire_faster_once_unsealed | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.does_expire_faster_once_unsealed | lower }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}">
|
||||
{% set value = permutation.count_interval_expiration_unsealed if permutation.count_interval_expiration_unsealed is not none else '' %}
|
||||
{% set value = permutation.count_interval_expiration_unsealed if permutation.count_interval_expiration_unsealed is not none else 1 %}
|
||||
<input class="{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }} {% if not permutation.does_expire_faster_once_unsealed %}{{ model.FLAG_COLLAPSED }}{% endif %}"
|
||||
type="number" min="0" value="{{ value }}" {{ model.ATTR_VALUE_CURRENT }}="{{ value }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}">
|
||||
type="number" min="0"
|
||||
value="{% if value is not none %}{{ value }}{% else %}{{ 1 }}{% endif %}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{% if value is not none %}{{ value }}{% else %}{{ 1 }}{% endif %}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ value }}"
|
||||
/>
|
||||
</td>
|
||||
|
||||
{% set value = permutation.id_unit_measurement_interval_expiration_unsealed if permutation.id_unit_measurement_interval_expiration_unsealed is not none else '' %}
|
||||
@@ -157,7 +155,7 @@
|
||||
<input class="{{ model.FLAG_LATENCY_MANUFACTURE_DAYS }}" type="number" min="0" value="{{ permutation.latency_manufacture_days }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.latency_manufacture_days }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.latency_manufacture_days }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.active }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.active }}" {% if permutation.active %}checked{% endif %}>
|
||||
<input class="{{ model.FLAG_ACTIVE }}" type="checkbox" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.active | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.active | lower }}" {% if permutation.active %}checked{% endif %}>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,108 +1,149 @@
|
||||
|
||||
{% if date_time_now is not defined %}
|
||||
{% set date_time_now = model.format_date(datetime.now()) %}
|
||||
{% endif %}
|
||||
{% if is_blank_row %}
|
||||
<tr class="{{ model.FLAG_ROW_NEW }}" {{ model.ATTR_ID_STOCK_ITEM }}>
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}">
|
||||
<select class="{{ model.FLAG_PRODUCT_CATEGORY}}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
{% for cat in model.category_list.categories %}
|
||||
<option value="{{ cat.id_category }}">{{ cat.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/store/_preview_DDL_product_category.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT }}">
|
||||
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></select>
|
||||
<td class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">
|
||||
{% include 'components/store/_preview_DDL_product.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT_VARIATIONS }}">
|
||||
<textarea class="{{ model.FLAG_PRODUCT_VARIATIONS }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }}></textarea>
|
||||
<td class="{{ model.FLAG_PRODUCT_VARIATIONS }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_ID_PRODUCT_PERMUTATION }}="0">
|
||||
{% include 'components/store/_preview_product_permutation_variations.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_CURRENCY_COST }}">
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_EXCL }}">
|
||||
<input class="{{ model.FLAG_COST_LOCAL_VAT_EXCL }}" type="number" min="0" value="" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
|
||||
<input class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}" type="number" min="0" value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
<input class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}" type="number" min="0" value="" {{ model.ATTR_VALUE_CURRENT }}="" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_PURCHASED }}">
|
||||
<input class="{{ model.FLAG_DATE_PURCHASED }}" type="date" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input class="{{ model.FLAG_DATE_PURCHASED }}" type="datetime-local" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_RECEIVED }}">
|
||||
<input type="date" class="{{ model.FLAG_DATE_RECEIVED }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="datetime-local" class="{{ model.FLAG_DATE_RECEIVED }} {{ model.FLAG_COLLAPSED }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
</td>
|
||||
<td class="{{ model.FLAG_STORAGE_LOCATION }}">
|
||||
{% include 'components/store/_preview_DDL_stock_item_storage_location.html' %}
|
||||
</td>
|
||||
<!--
|
||||
<td class="{{ model.FLAG_IS_SEALED }}">
|
||||
<input type="checkbox" class="{{ model.FLAG_IS_SEALED }}" "checked" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="checkbox" class="{{ model.FLAG_IS_SEALED }}" checked
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}" />
|
||||
</td>
|
||||
-->
|
||||
<td class="{{ model.FLAG_DATE_UNSEALED }}">
|
||||
<input type="date" class="{{ model.FLAG_DATE_UNSEALED }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="datetime-local" class="{{ model.FLAG_DATE_UNSEALED }} {{ model.FLAG_COLLAPSED }}"
|
||||
value = "{{ date_time_now }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }} = "{{ date_time_now }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}
|
||||
/>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_EXPIRATION }}">
|
||||
<input type="date" class="{{ model.FLAG_DATE_EXPIRATION }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="datetime-local" class="{{ model.FLAG_DATE_EXPIRATION }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
</td>
|
||||
<!--
|
||||
<td class="{{ model.FLAG_IS_CONSUMED }}">
|
||||
<input type="checkbox" class="{{ model.FLAG_IS_CONSUMED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="checkbox" class="{{ model.FLAG_IS_CONSUMED }}" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_FALSE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_FALSE }}" />
|
||||
</td>
|
||||
-->
|
||||
<td class="{{ model.FLAG_DATE_CONSUMED }}">
|
||||
<input type="date" class="{{ model.FLAG_DATE_CONSUMED }}" {{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="datetime-local" class="{{ model.FLAG_DATE_CONSUMED }} {{ model.FLAG_COLLAPSED }}"
|
||||
value = "{{ date_time_now }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }} = "{{ date_time_now }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}
|
||||
/>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input type="checkbox" class="{{ model.FLAG_ACTIVE }}" "checked" {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }} />
|
||||
<input type="checkbox" class="{{ model.FLAG_ACTIVE }}" checked {{ model.ATTR_VALUE_CURRENT }}="{{ model.FLAG_BOOL_TRUE }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.FLAG_BOOL_TRUE }}" />
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr {{ model.ATTR_ID_STOCK_ITEM }}="{{ stock_item.id_stock_item }}">
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}">
|
||||
<select class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ category.id_category }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ category.id_category }}"> <!-- {{ model.ATTR_ID_PRODUCT_CATEGORY }}="{{ category.id_category }}" -->
|
||||
{% for c in model.category_list.categories %}
|
||||
<option value="{{ c.id_category }}" {% if c.id_category == category.id_category %}selected{% endif %}>{{ c.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<tr {{ model.ATTR_ID_STOCK_ITEM }}="{{ stock_item.id_stock }}">
|
||||
<td class="{{ model.FLAG_PRODUCT_CATEGORY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.id_category }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.id_category }}">
|
||||
{% include 'components/store/_preview_DDL_product_category.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT }}">
|
||||
<select class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="{{ product.id_product }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ product.id_product }}"> <!-- {{ model.ATTR_ID_PRODUCT }}="{{ product.id_product }} -->
|
||||
{% for p in model.category_list.categories[model.category_list.get_index_category_from_id(category.id_category)].products %}
|
||||
<option value="{{ p.id_product }}" {% if p.id_product == product.id_product %}selected{% endif %}>{{ p.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<td class="{{ model.FLAG_PRODUCT }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.id_product }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.id_product }}">
|
||||
{% include 'components/store/_preview_DDL_product.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_PRODUCT_VARIATIONS }}">
|
||||
{% set variation_tree = permutation.variation_tree %}
|
||||
{% set str_ids_variations = variation_tree.to_variation_id_pairs_str() if not (variation_tree is none) else '' %}
|
||||
<td class="{{ model.FLAG_PRODUCT_VARIATIONS }} {{ model.FLAG_COLLAPSED }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ str_ids_variations }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ str_ids_variations }}"
|
||||
{{ model.ATTR_ID_PRODUCT_PERMUTATION }}="{{ permutation.id_permutation }}"
|
||||
>
|
||||
{% include 'components/store/_preview_product_permutation_variations.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_CURRENCY }}">
|
||||
{{ permutation.output_currency() }}
|
||||
<select class="{{ model.FLAG_CURRENCY }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.id_currency }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.id_currency }}">
|
||||
{% for currency in model.currency_list.currencies %}
|
||||
<option value="{{ currency.id_currency }}" {% if currency.id_currency == permutation.id_currency %}selected{% endif %}>{{ currency.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% set currency = stock_item.currency_cost %}
|
||||
<td class="{{ model.FLAG_CURRENCY_COST }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ currency.id_currency }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ currency.id_currency }}"
|
||||
>
|
||||
{% include 'components/store/_preview_DDL_currency.html' %}
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_EXCL }}">
|
||||
<input class="{{ model.FLAG_COST_LOCAL_VAT_EXCL }}" type="number" step="0.001"
|
||||
value="{{ stock_item.cost_local_VAT_excl }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.cost_local_VAT_excl }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.cost_local_VAT_excl }}"
|
||||
>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
|
||||
<input type="number" step="0.001" value="{{ stock_item.cost_local_VAT_incl }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.cost_local_VAT_incl }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.cost_local_VAT_incl }}" >
|
||||
<input class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}" type="number" step="0.001"
|
||||
value="{{ stock_item.cost_local_VAT_incl }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.cost_local_VAT_incl }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.cost_local_VAT_incl }}"
|
||||
>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_PURCHASED }}">
|
||||
<input type="date" value="{{ stock_item.date_purchased }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.date_purchased }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.date_purchased }}" />
|
||||
<input type="datetime-local" value="{{ model.format_datetime(stock_item.date_purchased) }}" {{ model.ATTR_VALUE_CURRENT }}="{{ model.format_datetime(stock_item.date_purchased) }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_datetime(stock_item.date_purchased) }}" />
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_RECEIVED }}">
|
||||
<input type="date" value="{{ stock_item.date_received }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.date_received }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.date_received }}" />
|
||||
<input type="datetime-local"
|
||||
class="{{ model.FLAG_DATE_RECEIVED }} {% if stock_item.date_purchased is none %}{{ model.FLAG_COLLAPSED }}{% endif %}"
|
||||
value="{{ model.format_datetime(stock_item.date_received) }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_datetime(stock_item.date_received) }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_datetime(stock_item.date_received) }}"
|
||||
/>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_STORAGE_LOCATION }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.id_location_storage }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.id_location_storage }}"
|
||||
>
|
||||
{% set storage_location = stock_item.storage_location %}
|
||||
{% include 'components/store/_preview_DDL_stock_item_storage_location.html' %}
|
||||
</td>
|
||||
<!--
|
||||
<td class="{{ model.FLAG_IS_SEALED }}">
|
||||
<input type="checkbox" {{ "checked" if stock_item.is_sealed else "" }} {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.is_sealed }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.is_sealed }}" />
|
||||
<input type="checkbox" {{ "checked" if stock_item.is_sealed else "" }}
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.is_sealed | lower }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.is_sealed | lower }}"
|
||||
/>
|
||||
</td>
|
||||
-->
|
||||
<td class="{{ model.FLAG_DATE_UNSEALED }}">
|
||||
<input type="date" value="{{ stock_item.date_unsealed }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.date_unsealed }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.date_unsealed }}" />
|
||||
<input type="datetime-local"
|
||||
class="{{ model.FLAG_DATE_UNSEALED }} {% if stock_item.is_sealed %}{{ model.FLAG_COLLAPSED }}{% endif %}"
|
||||
value="{{ model.format_datetime(stock_item.date_unsealed) }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_datetime(stock_item.date_unsealed) }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_datetime(stock_item.date_unsealed) }}"
|
||||
/>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_DATE_EXPIRATION }}">
|
||||
<input type="date" value="{{ stock_item.date_expiration }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.date_expiration }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.date_expiration }}" />
|
||||
<input type="datetime-local" value="{{ model.format_datetime(stock_item.date_expiration) }}" {{ model.ATTR_VALUE_CURRENT }}="{{ model.format_datetime(stock_item.date_expiration) }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_datetime(stock_item.date_expiration) }}" />
|
||||
</td>
|
||||
<!--
|
||||
<td class="{{ model.FLAG_IS_CONSUMED }}">
|
||||
<input type="checkbox" {{ "checked" if stock_item.is_consumed else "" }} {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.is_consumed }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.is_consumed }}" />
|
||||
<input type="checkbox" {{ "checked" if stock_item.is_consumed else "" }} {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.is_consumed | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.is_consumed | lower }}" />
|
||||
</td>
|
||||
-->
|
||||
<td class="{{ model.FLAG_DATE_CONSUMED }}">
|
||||
<input type="date" value="{{ stock_item.date_consumed }}" {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.date_consumed }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.date_consumed }}" />
|
||||
<input type="datetime-local"
|
||||
class="{{ model.FLAG_DATE_CONSUMED }} {% if not stock_item.is_consumed %}{{ model.FLAG_COLLAPSED }}{% endif %}"
|
||||
value="{{ model.format_datetime(stock_item.date_consumed) }}"
|
||||
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_datetime(stock_item.date_consumed) }}"
|
||||
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_datetime(stock_item.date_consumed) }}"
|
||||
/>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_ACTIVE }}">
|
||||
<input type="checkbox" {{ "checked" if stock_item.active else "" }} {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.active }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.active }}" />
|
||||
<input type="checkbox" {{ "checked" if stock_item.active else "" }} {{ model.ATTR_VALUE_CURRENT }}="{{ stock_item.active | lower }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ stock_item.active | lower }}" />
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -1,42 +1,61 @@
|
||||
|
||||
var attrFormType = "{{ model.ATTR_FORM_TYPE }}";
|
||||
var attrIdDiscount = "{{ model.ATTR_ID_DISCOUNT }}";
|
||||
var attrIdPlant = "{{ model.ATTR_ID_PLANT }}";
|
||||
var attrIdProduct = "{{ model.ATTR_ID_PRODUCT }}";
|
||||
var attrIdProductCategory = "{{ model.ATTR_ID_PRODUCT_CATEGORY }}";
|
||||
var attrIdProductPermutation = "{{ model.ATTR_ID_PRODUCT_PERMUTATION }}";
|
||||
var attrIdProductPrice = "{{ model.ATTR_ID_PRODUCT_PRICE }}";
|
||||
var attrIdProductVariation = "{{ model.ATTR_ID_PRODUCT_VARIATION }}";
|
||||
var attrIdProductVariationType = "{{ model.ATTR_ID_PRODUCT_VARIATION_TYPE }}";
|
||||
var attrIdStockItem = "{{ model.ATTR_ID_STOCK_ITEM }}";
|
||||
var attrIdStorageLocation = "{{ model.ATTR_ID_STORAGE_LOCATION }}";
|
||||
var flagButtonBasketAdd = "{{ model.FLAG_BUTTON_BASKET_ADD }}";
|
||||
var flagButtonBuyNow = "{{ model.FLAG_BUTTON_BUY_NOW }}";
|
||||
var flagCostLocal = "{{ model.FLAG_COST_LOCAL }}";
|
||||
var flagCostLocalVatExcl = "{{ model.FLAG_COST_LOCAL_VAT_EXCL }}";
|
||||
var flagCostLocalVatIncl = "{{ model.FLAG_COST_LOCAL_VAT_INCL }}";
|
||||
var flagCountUnitMeasurementIntervalExpirationUnsealed = "{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}";
|
||||
var flagCountUnitMeasurementIntervalRecurrence = "{{ model.FLAG_COUNT_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}";
|
||||
var flagCountUnitMeasurementPerQuantityStep = "{{ model.FLAG_COUNT_UNIT_MEASUREMENT_PER_QUANTITY_STEP }}";
|
||||
var flagCurrencyCost = "{{ model.FLAG_CURRENCY_COST }}";
|
||||
var flagDateConsumed = "{{ model.FLAG_DATE_CONSUMED }}";
|
||||
var flagDateExpiration = "{{ model.FLAG_DATE_EXPIRATION }}";
|
||||
var flagDatePurchased = "{{ model.FLAG_DATE_PURCHASED }}";
|
||||
var flagDateReceived = "{{ model.FLAG_DATE_RECEIVED }}";
|
||||
var flagDateUnsealed = "{{ model.FLAG_DATE_UNSEALED }}";
|
||||
var flagDiscount = "{{ model.FLAG_DISCOUNT }}";
|
||||
var flagDoesExpireFasterOnceUnsealed = "{{ model.FLAG_DOES_EXPIRE_FASTER_ONCE_UNSEALED }}";
|
||||
var flagHasVariations = "{{ model.FLAG_HAS_VARIATIONS }}";
|
||||
var flagIdStripeProduct = "{{ model.FLAG_ID_STRIPE_PRODUCT }}";
|
||||
var flagIsConsumed = "{{ model.FLAG_IS_CONSUMED }}";
|
||||
var flagIsNotEmpty = "{{ model.FLAG_IS_NOT_EMPTY }}";
|
||||
var flagIsOutOfStock = "{{ model.FLAG_IS_OUT_OF_STOCK }}";
|
||||
var flagIsSealed = "{{ model.FLAG_IS_SEALED }}";
|
||||
var flagIsSubscription = "{{ model.FLAG_IS_SUBSCRIPTION }}";
|
||||
var flagLatencyManufactureDays = "{{ model.FLAG_LATENCY_MANUFACTURE_DAYS }}";
|
||||
var flagLocationStorage = "{{ model.FLAG_LOCATION_STORAGE }}";
|
||||
var flagNamePluralUnitMeasurementIntervalExpirationUnsealed = "{{ model.FLAG_NAME_PLURAL_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}";
|
||||
var flagNamePluralUnitMeasurementIntervalRecurrence = "{{ model.FLAG_NAME_PLURAL_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}";
|
||||
var flagNamePluralUnitMeasurementQuantity = "{{ model.FLAG_NAME_PLURAL_UNIT_MEASUREMENT_QUANTITY }}";
|
||||
var flagNameSingularUnitMeasurementIntervalExpirationUnsealed = "{{ model.FLAG_NAME_SINGULAR_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}";
|
||||
var flagNameSingularUnitMeasurementIntervalRecurrence = "{{ model.FLAG_NAME_SINGULAR_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}";
|
||||
var flagNameSingularUnitMeasurementQuantity = "{{ model.FLAG_NAME_SINGULAR_UNIT_MEASUREMENT_QUANTITY }}";
|
||||
var flagPlant = "{{ model.FLAG_PLANT }}";
|
||||
var flagProduct = "{{ model.FLAG_PRODUCT }}";
|
||||
var flagProductCategory = "{{ model.FLAG_PRODUCT_CATEGORY }}";
|
||||
var flagProductPermutation = "{{ model.FLAG_PRODUCT_PERMUTATION }}";
|
||||
var flagProductPrice = "{{ model.FLAG_PRODUCT_PRICE }}";
|
||||
var flagProductVariation = "{{ model.FLAG_PRODUCT_VARIATION }}";
|
||||
var flagProductVariations = "{{ model.FLAG_PRODUCT_VARIATIONS }}";
|
||||
var flagProductVariationType = "{{ model.FLAG_PRODUCT_VARIATION_TYPE }}";
|
||||
var flagProfitLocalMin = "{{ model.FLAG_PROFIT_LOCAL_MIN }}";
|
||||
var flagQuantity = "{{ model.FLAG_QUANTITY }}";
|
||||
var flagQuantityMin = "{{ model.FLAG_QUANTITY_MIN }}";
|
||||
var flagQuantityMax = "{{ model.FLAG_QUANTITY_MAX }}";
|
||||
var flagQuantityStock = "{{ model.FLAG_QUANTITY_STOCK }}";
|
||||
var flagRegionStorage = "{{ model.FLAG_REGION_STORAGE }}";
|
||||
var flagRegion = "{{ model.FLAG_REGION }}";
|
||||
var flagStockItem = "{{ model.FLAG_STOCK_ITEM }}";
|
||||
var flagStorageLocation = "{{ model.FLAG_STORAGE_LOCATION }}";
|
||||
var flagSymbolCurrencyCost = "{{ model.FLAG_SYMBOL_CURRENCY_COST }}";
|
||||
var flagSymbolIsSuffixNotPrefixUnitMeasurementIntervalExpirationUnsealed = "{{ model.FLAG_SYMBOL_IS_SUFFIX_NOT_PREFIX_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}";
|
||||
var flagSymbolIsSuffixNotPrefixUnitMeasurementIntervalRecurrence = "{{ model.FLAG_SYMBOL_IS_SUFFIX_NOT_PREFIX_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}";
|
||||
@@ -47,7 +66,6 @@ var flagSymbolUnitMeasurementQuantity = "{{ model.FLAG_SYMBOL_UNIT_MEASUREMENT_Q
|
||||
var flagUnitMeasurementIntervalExpirationUnsealed = "{{ model.FLAG_UNIT_MEASUREMENT_INTERVAL_EXPIRATION_UNSEALED }}";
|
||||
var flagUnitMeasurementIntervalRecurrence = "{{ model.FLAG_UNIT_MEASUREMENT_INTERVAL_RECURRENCE }}";
|
||||
var flagUnitMeasurementQuantity = "{{ model.FLAG_UNIT_MEASUREMENT_QUANTITY }}";
|
||||
var flagProductVariations = "{{ model.FLAG_PRODUCT_VARIATIONS }}";
|
||||
var hashGetStoreProduct = "{{ model.HASH_GET_STORE_PRODUCT }}";
|
||||
var hashGetStoreProductCategory = "{{ model.HASH_GET_STORE_PRODUCT_CATEGORY }}";
|
||||
var hashGetStoreProductPermutation = "{{ model.HASH_GET_STORE_PRODUCT_PERMUTATION }}";
|
||||
@@ -67,17 +85,22 @@ var hashPageStoreBasket = "{{ model.HASH_PAGE_STORE_BASKET }}";
|
||||
var idBasket = "#{{ model.ID_BASKET }}";
|
||||
var idBasketContainer = "#{{ model.ID_BASKET_CONTAINER }}";
|
||||
var idBasketTotal = "#{{ model.ID_BASKET_TOTAL }}";
|
||||
var idButtonBasketAdd = "#{{ model.ID_BUTTON_BASKET_ADD }}";
|
||||
var idButtonBuyNow = "#{{ model.ID_BUTTON_BUY_NOW }}";
|
||||
var idButtonCheckout = "#{{ model.ID_BUTTON_CHECKOUT }}";
|
||||
var idProductCategoryDefault = "{{ model.ID_PRODUCT_CATEGORY_DEFAULT }}";
|
||||
var idCurrency = "#{{ model.ID_CURRENCY }}";
|
||||
var idCurrencyDefault = "#{{ model.ID_CURRENCY_DEFAULT }}";
|
||||
var idLabelBasketEmpty = "#{{ model.ID_LABEL_BASKET_EMPTY }}";
|
||||
var idRegionDelivery = "#{{ model.ID_REGION_DELIVERY }}";
|
||||
var keyIdCurrency = "{{ model.KEY_ID_CURRENCY }}";
|
||||
var keyItems = "{{ model.KEY_ITEMS }}";
|
||||
var keyIdRegionDelivery = "{{ model.KEY_ID_REGION_DELIVERY }}";
|
||||
var keyIsIncludedVAT = "{{ model.KEY_IS_INCLUDED_VAT }}";
|
||||
var keyNameVariation = "{{ model.KEY_NAME_VARIATION }}";
|
||||
var keyNameVariationType = "{{ model.KEY_NAME_VARIATION_TYPE }}";
|
||||
var idProductCategoryDefault = "{{ model.ID_PRODUCT_CATEGORY_DEFAULT }}";
|
||||
var idRegionDeliveryDefault = "{{ model.ID_REGION_DELIVERY_DEFAULT }}";
|
||||
{#
|
||||
var keyIdCurrency = "{{ model.KEY_ID_CURRENCY }}";
|
||||
var keyItems = "{{ model.KEY_ITEMS }}";
|
||||
var keyIdRegionDelivery = "{{ model.KEY_ID_REGION_DELIVERY }}";
|
||||
var keyIsIncludedVAT = "{{ model.KEY_IS_INCLUDED_VAT }}";
|
||||
var keyNameVariation = "{{ model.KEY_NAME_VARIATION }}";
|
||||
var keyNameVariationType = "{{ model.KEY_NAME_VARIATION_TYPE }}";
|
||||
#}
|
||||
var typeFormBasketAdd = "{{ model.TYPE_FORM_BASKET_ADD }}";
|
||||
var typeFormBasketEdit = "{{ model.TYPE_FORM_BASKET_EDIT }}";
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
<script>
|
||||
// var attrFor = "{{ model.ATTR_FOR }}";
|
||||
var attrIdAccessLevel = "{{ model.ATTR_ID_ACCESS_LEVEL }}";
|
||||
var attrIdAddress = "{{ model.ATTR_ID_ADDRESS }}";
|
||||
var attrIdCurrency = "{{ model.ATTR_ID_CURRENCY }}";
|
||||
var attrIdRegion = "{{ model.ATTR_ID_REGION }}";
|
||||
var attrTextCollapsed = "{{ model.ATTR_TEXT_COLLAPSED }}";
|
||||
var attrTextExpanded = "{{ model.ATTR_TEXT_EXPANDED }}";
|
||||
var attrValueCurrent = "{{ model.ATTR_VALUE_CURRENT }}";
|
||||
@@ -60,6 +63,7 @@
|
||||
var flagAdd = "{{ model.FLAG_ADD }}";
|
||||
var flagCancel = "{{ model.FLAG_CANCEL }}";
|
||||
var flagCard = "{{ model.FLAG_CARD }}";
|
||||
var flagCloseTemporaryElement = "{{ model.FLAG_CLOSE_TEMPORARY_ELEMENT }}";
|
||||
var flagCode = "{{ model.FLAG_CODE }}";
|
||||
var flagCollapsed = "{{ model.FLAG_COLLAPSED }}";
|
||||
var flagCollapsible = "{{ model.FLAG_COLLAPSIBLE }}";
|
||||
@@ -72,19 +76,21 @@
|
||||
var flagDelete = "{{ model.FLAG_DELETE }}";
|
||||
var flagDescription = "{{ model.FLAG_DESCRIPTION }}";
|
||||
var flagDetail = "{{ model.FLAG_DETAIL }}";
|
||||
var flagDialog = "{{ model.FLAG_DIALOG }}";
|
||||
var flagDirty = "{{ model.FLAG_DIRTY }}";
|
||||
var flagDisplayOrder = "{{ model.FLAG_DISPLAY_ORDER }}";
|
||||
var flagDragging = "dragging";
|
||||
var flagDragOver = "drag-over";
|
||||
var flagError = "{{ model.FLAG_ERROR }}";
|
||||
var flagExpanded = "{{ model.FLAG_EXPANDED }}";
|
||||
var flagFailure = "{{ model.FLAG_FAILURE }}";
|
||||
var flagFilter = "{{ model.FLAG_FILTER }}";
|
||||
var flagFormFilters = "{{ model.FLAG_FORM_FILTERS }}";
|
||||
var flagAccessLevelRequired = "{{ model.FLAG_ACCESS_LEVEL_REQUIRED }}";
|
||||
var flagImageLogo = "{{ model.FLAG_IMAGE_LOGO }}";
|
||||
var flagInitialised = "{{ model.FLAG_INITIALISED }}";
|
||||
// var flagKeyPrimary = "{{ model.FLAG_KEY_PRIMARY }}";
|
||||
var flagMessage = "{{ model.FLAG_MESSAGE }}";
|
||||
var flagModal = "{{ model.FLAG_MODAL }}";
|
||||
var flagMove = "move";
|
||||
var flagName = "{{ model.FLAG_NAME }}";
|
||||
var flagNameAttrOptionText = "{{ model.FLAG_NAME_ATTR_OPTION_TEXT}}";
|
||||
@@ -108,6 +114,7 @@
|
||||
var flagNavUserLogout = "{{ model.FLAG_NAV_USER_LOGOUT }}";
|
||||
var flagOverlay = "{{ model.FLAG_OVERLAY }}";
|
||||
var flagOverlayClose = "{{ model.FLAG_OVERLAY_CLOSE }}";
|
||||
var flagPageBody = "{{ model.FLAG_PAGE_BODY }}";
|
||||
var flagRow = "{{ model.FLAG_ROW }}";
|
||||
var flagRowNew = "{{ model.FLAG_ROW_NEW }}";
|
||||
var flagRows = "{{ model.FLAG_ROWS }}";
|
||||
@@ -118,6 +125,7 @@
|
||||
var flagSubmit = "{{ model.FLAG_SUBMIT }}";
|
||||
var flagSubmitted = "{{ model.FLAG_SUBMITTED }}";
|
||||
var flagSuccess = "{{ model.FLAG_SUCCESS }}";
|
||||
var flagTemporaryElement = "{{ model.FLAG_TEMPORARY_ELEMENT }}";
|
||||
var hashApplyFiltersStoreProductPermutation = "{{ model.HASH_APPLY_FILTERS_STORE_PRODUCT_PERMUTATION }}";
|
||||
var hashPageAccessibilityReport = "{{ model.HASH_PAGE_ACCESSIBILITY_REPORT }}";
|
||||
var hashPageAccessibilityStatement = "{{ model.HASH_PAGE_ACCESSIBILITY_STATEMENT }}";
|
||||
@@ -126,13 +134,14 @@
|
||||
var hashPageDataRetentionSchedule = "{{ model.HASH_PAGE_DATA_RETENTION_SCHEDULE }}";
|
||||
// var hashPageCurrent = "{{ model.hash_page_current }}";
|
||||
var hashPageErrorNoPermission = "{{ model.HASH_PAGE_ERROR_NO_PERMISSION }}";
|
||||
var hashPageAdminHome = "{{ model.HASH_PAGE_ADMIN_HOME }}";
|
||||
var hashPageHome = "{{ model.HASH_PAGE_HOME }}";
|
||||
var hashPageLicense = "{{ model.HASH_PAGE_LICENSE }}";
|
||||
var hashPagePrivacyPolicy = "{{ model.HASH_PAGE_PRIVACY_POLICY }}";
|
||||
var hashPageServices = "{{ model.HASH_PAGE_SERVICES }}";
|
||||
var hashPageStoreAdminStripePrices = "{{ model.HASH_PAGE_STORE_ADMIN_STRIPE_PRICES }}";
|
||||
var hashPageStoreAdminStripeProducts = "{{ model.HASH_PAGE_STORE_ADMIN_STRIPE_PRODUCTS }}";
|
||||
{#
|
||||
var hashPageStoreAdminStripePrices = "{{ model.HASH_PAGE_STORE_ADMIN_STRIPE_PRICES }}";
|
||||
var hashPageStoreAdminStripeProducts = "{{ model.HASH_PAGE_STORE_ADMIN_STRIPE_PRODUCTS }}";
|
||||
#}
|
||||
var hashPageStoreBasket = "{{ model.HASH_PAGE_STORE_BASKET }}";
|
||||
var hashPageStoreHome = "{{ model.HASH_PAGE_STORE_HOME }}";
|
||||
var hashPageStoreProductCategories = "{{ model.HASH_PAGE_STORE_PRODUCT_CATEGORIES }}";
|
||||
@@ -141,6 +150,7 @@
|
||||
var hashPageStoreProductPrices = "{{ model.HASH_PAGE_STORE_PRODUCT_PRICES }}";
|
||||
var hashPageStoreProductVariations = "{{ model.HASH_PAGE_STORE_PRODUCT_VARIATIONS }}";
|
||||
var hashPageStoreStockItems = "{{ model.HASH_PAGE_STORE_STOCK_ITEMS }}";
|
||||
var hashPageSuppliers = "{{ model.HASH_PAGE_SUPPLIERS }}";
|
||||
var hashPageUserAccount = "{{ model.HASH_PAGE_USER_ACCOUNT }}";
|
||||
var hashPageUserAdmin = "{{ model.HASH_PAGE_USER_ADMIN }}";
|
||||
var hashPageUserLogin = "{{ model.HASH_PAGE_USER_LOGIN }}";
|
||||
@@ -171,10 +181,14 @@
|
||||
var idButtonSave = "#{{ model.ID_BUTTON_SAVE }}";
|
||||
*/
|
||||
var idCSRFToken = "#{{ model.ID_CSRF_TOKEN }}";
|
||||
{#
|
||||
var idFormCurrency = "#{{ model.ID_FORM_CURRENCY }}";
|
||||
var idFormDeliveryRegion = "#{{ model.ID_FORM_DELIVERY_REGION }}";
|
||||
#}
|
||||
var idFormFilters = "#{{ model.ID_FORM_FILTERS }}";
|
||||
var idFormIsIncludedVAT = "#{{ model.ID_FORM_IS_INCLUDED_VAT }}";
|
||||
{#
|
||||
var idFormIsIncludedVAT = "#{{ model.ID_FORM_IS_INCLUDED_VAT }}";
|
||||
#}
|
||||
var idLabelError = "#{{ model.ID_LABEL_ERROR }}";
|
||||
var idOverlayConfirm = "#{{ model.ID_OVERLAY_CONFIRM }}";
|
||||
var idOverlayError = "#{{ model.ID_OVERLAY_ERROR }}";
|
||||
@@ -183,16 +197,12 @@
|
||||
var idTableMain = "#{{ model.ID_TABLE_MAIN }}";
|
||||
var idTextareaConfirm = "#{{ model.ID_TEXTAREA_CONFIRM }}";
|
||||
var isUserLoggedIn = "{{ model.output_bool(model.IS_USER_LOGGED_IN) }}";
|
||||
var keyBasket = "{{ model.KEY_BASKET }}";
|
||||
{# var keyBasket = "{{ model.KEY_BASKET }}"; #}
|
||||
var keyCallback = "{{ model.KEY_CALLBACK }}";
|
||||
var keyCSRFToken = "{{ model.ID_CSRF_TOKEN }}";
|
||||
{# var keyCSRFToken = "{{ model.ID_CSRF_TOKEN }}"; #}
|
||||
var keyData = "{{ model.KEY_DATA }}";
|
||||
var keyForm = "{{ model.KEY_FORM }}";
|
||||
var keyPrice = "{{ model.KEY_PRICE }}";
|
||||
var keyQuantity = "{{ model.KEY_QUANTITY }}";
|
||||
var keyShared = "shared";
|
||||
var nameAttrOptionText = "{{ model.NAME_ATTR_OPTION_TEXT }}";
|
||||
var nameAttrOptionValue = "{{ model.NAME_ATTR_OPTION_VALUE }}";
|
||||
var nameCSRFToken = "{{ model.NAME_CSRF_TOKEN }}";
|
||||
var _pathHost = "{{ model.get_url_host() }}";
|
||||
var _rowBlank = null;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_product_categories.bundle.css') }}">
|
||||
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product_category.save_category') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product_category.filter_category') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
{{ model.form_filters.hidden_tag() }}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }} {{ model.FLAG_IS_NOT_EMPTY }}">
|
||||
@@ -91,10 +91,7 @@
|
||||
{% include 'components/common/temporary/_overlay_confirm.html' %}
|
||||
{% include 'components/common/temporary/_overlay_error.html' %}
|
||||
|
||||
<!-- Include JavaScript
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/pages/store/product_categories.js') }}"></script>
|
||||
-->
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_product_permutations.bundle.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product_permutation.save_permutation') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product_permutation.filter_permutation') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
{{ model.form_filters.hidden_tag() }}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
@@ -140,9 +140,7 @@
|
||||
{% include 'components/common/temporary/_overlay_confirm.html' %}
|
||||
{% include 'components/common/temporary/_overlay_error.html' %}
|
||||
|
||||
<!-- Include JavaScript
|
||||
<script type="module" src="{{ url_for('static', filename='dist/js/store_product_permutations.bundle.js') }}"></script>
|
||||
-->
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
|
||||
<script>
|
||||
@@ -154,23 +152,5 @@
|
||||
var unitMeasurements = {{ units_measurement_dict | tojson | safe }};
|
||||
var unitMeasurementsTime = {{ units_measurement_time_dict | tojson | safe }};
|
||||
var _rowBlankProductVariation = null;
|
||||
{#
|
||||
var productsByCategory = {{ model.category_list.get_product_option_lists_by_category() | tojson | safe }};
|
||||
var listCategories = {{ model.category_list.to_list_categories() | tojson | safe }};
|
||||
var listProducts = {{ model.category_list.to_product_option_list() | tojson | safe }};
|
||||
var listVariations = {{ model.variations.to_list_variations() | tojson | safe }};
|
||||
var listVariationTypes = {{ model.variations.to_list_variation_types() | tojson | safe }};
|
||||
var dictVariations = Object.fromEntries(listVariations.map((variation, index) => [variation[attrIdProductVariation], variation]));
|
||||
var dictVariationTypes = Object.fromEntries(listVariationTypes.map((variationType, index) => [variationType[attrIdProductVariationType], variationType]));
|
||||
listVariations = listVariations.map((variation, index) => { return variation[attrIdProductVariation]; });
|
||||
listVariationTypes = listVariationTypes.map((variationType, index) => { return variationType[attrIdProductVariationType]; });
|
||||
#}
|
||||
/*
|
||||
// hookup elements
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up store product permutation page...');
|
||||
hookupStorePageProductPermutation();
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_products.bundle.css') }}">
|
||||
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product.save_product') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_product.filter_product') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
{{ model.form_filters.hidden_tag() }}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_FILTER }}">
|
||||
@@ -44,24 +44,8 @@
|
||||
</div>
|
||||
<!--
|
||||
-->
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{% set block_id = 'button_add' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{% set block_id = 'button_save' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{% set block_id = 'button_cancel' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
{% set block_id = 'buttons_table_default' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
<!--
|
||||
<div class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
@@ -98,10 +82,7 @@
|
||||
{% include 'components/common/temporary/_overlay_confirm.html' %}
|
||||
{% include 'components/common/temporary/_overlay_error.html' %}
|
||||
|
||||
<!-- Include JavaScript
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/pages/store/products.js') }}"></script>
|
||||
-->
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/sections/store.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/store/stock_items.css') }}">
|
||||
-->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_stock_items.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='dist/css/store_stock_items.bundle.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<form id="{{ model.ID_FORM_FILTERS_STOCK }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store.stock_filter') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
<form id="{{ model.ID_FORM_FILTERS }}" class="{{ model.FLAG_FILTER }} {{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('routes_store_stock_item.filter_stock_item') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
{{ model.form_filters.hidden_tag() }}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
{{ model.form_filters.id_category.label }}
|
||||
{{ model.form_filters.id_category() }}
|
||||
{% for error in model.form_filters.id_category.errors %}
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
{{ model.form_filters.id_product.label }}
|
||||
{{ model.form_filters.id_product() }}
|
||||
{% for error in model.form_filters.id_product.errors %}
|
||||
@@ -30,21 +30,25 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
{{ model.form_filters.is_out_of_stock.label }}
|
||||
{{ model.form_filters.is_out_of_stock() }}
|
||||
{% for error in model.form_filters.is_out_of_stock.errors %}
|
||||
<p class="error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
{{ model.form_filters.quantity_min.label }}
|
||||
{{ model.form_filters.quantity_min() }}
|
||||
{% for error in model.form_filters.quantity_min.errors %}
|
||||
<p class="error">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
</div>
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }} {{ model.FLAG_ROW }} {{ model.FLAG_FILTER }}">
|
||||
{{ model.form_filters.quantity_max.label }}
|
||||
{{ model.form_filters.quantity_max() }}
|
||||
{% for error in model.form_filters.quantity_max.errors %}
|
||||
@@ -57,89 +61,79 @@
|
||||
{ { model.form_filters.submit() }}
|
||||
</div>
|
||||
-->
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{% set block_id = 'button_save' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
{% set block_id = 'button_cancel' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
{% set block_id = 'button_add' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
{% set block_id = 'buttons_table_default' %}
|
||||
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
||||
<!--
|
||||
<div class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
</form>
|
||||
<!--
|
||||
<div class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<table id="{{ model.ID_TABLE_MAIN }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="{{ model.FLAG_PRODUCT_CATEGORY }}">Category</th>
|
||||
<th class="{{ model.FLAG_PRODUCT }}">Product</th>
|
||||
<th class="{{ model.FLAG_PRODUCT_VARIATIONS }}">Variations</th>
|
||||
<th class="{{ model.FLAG_CURRENCY }}">Currency</th>
|
||||
<th class="{{ model.FLAG_PRODUCT_VARIATIONS }} {{ model.FLAG_COLLAPSED }}">Variations</th>
|
||||
<th class="{{ model.FLAG_CURRENCY_COST }}">Currency</th>
|
||||
<th class="{{ model.FLAG_COST_LOCAL_VAT_EXCL }}">Cost Local (VAT excl.)</th>
|
||||
<th class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">Cost Local (VAT incl.)</th>
|
||||
<th class="{{ model.FLAG_DATE_PURCHASED}}">Date Purchased</th>
|
||||
<th class="{{ model.FLAG_DATE_RECEIVED }}">Date Received</th>
|
||||
<th class="{{ model.FLAG_LOCATION_STORAGE }}">Storage Location</th>
|
||||
<!--<th class="{{ model.FLAG_IS_SEALED }}">Is Sealed</th>-->
|
||||
<th class="{{ model.FLAG_STORAGE_LOCATION }}">Storage Location</th>
|
||||
<th class="{{ model.FLAG_IS_SEALED }}">Is Sealed</th>
|
||||
<th class="{{ model.FLAG_DATE_UNSEALED }}">Date Unsealed</th>
|
||||
<th class="{{ model.FLAG_DATE_EXPIRATION }}">Date Expiration</th>
|
||||
<!--<th class="{{ model.FLAG_IS_CONSUMED }}">Is Consumed</th>-->
|
||||
<th class="{{ model.FLAG_IS_CONSUMED }}">Is Consumed</th>
|
||||
<th class="{{ model.FLAG_DATE_CONSUMED }}">Date Consumed</th>
|
||||
<th class="{{ model.FLAG_ACTIVE }}">Active</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set date_time_now = model.format_date(datetime.now()) %}
|
||||
{% set is_blank_row = False %}
|
||||
{% for category in model.category_list.categories %}
|
||||
{% for product in category.products %}
|
||||
{% for permutation in product.permutations %}
|
||||
{% for stock_item in permutation.stock_items %}
|
||||
{% set is_blank_row = False %}
|
||||
{% include 'components/store/_stock_item.html' %}
|
||||
{% include 'components/store/_row_stock_item.html' %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% set is_blank_row = True %}
|
||||
{% include 'components/store/_stock_item.html' %}
|
||||
{% include 'components/store/_row_stock_item.html' %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% include 'components/common/temporary/_overlay_confirm.html' %}
|
||||
{% include 'components/common/temporary/_overlay_error.html' %}
|
||||
|
||||
<!-- Include JavaScript
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/pages/store/stock_items.js') }}"></script>
|
||||
-->
|
||||
|
||||
<script>
|
||||
// pass arguments from model to JS
|
||||
/*
|
||||
var idFilterCategory = "#{{ model.ID_FILTER_CATEGORY }}";
|
||||
var idFilterProduct = "#{{ model.ID_FILTER_PRODUCT }}";
|
||||
var idFilterIsOutOfStock = "#{{ model.ID_FILTER_IS_OUT_OF_STOCK }}";
|
||||
var idFilterQuantityMin = "#{{ model.ID_FILTER_QUANTITY_MIN }}";
|
||||
var idFilterQuantityMax = "#{{ model.ID_FILTER_QUANTITY_MAX }}";
|
||||
*/
|
||||
var idFormFiltersPermutations = "#{{ model.ID_FORM_FILTERS_PERMUTATIONS }}";
|
||||
var keyPermutations = "{{ model.KEY_PERMUTATIONS }}";
|
||||
var dictListsProducts = {{ model.category_list.get_product_option_lists_by_category() | tojson | safe }};
|
||||
var listCategories = {{ model.category_list.to_list_categories() | tojson | safe }};
|
||||
var listProducts = {{ model.category_list.to_product_option_list() | tojson | safe }};
|
||||
{#
|
||||
var dictListsProducts = {{ model.category_list.get_product_option_lists_by_category() | tojson | safe }};
|
||||
var listCategories = {{ model.category_list.to_category_option_list() | tojson | safe }};
|
||||
{{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list.categories) | tojson | safe }};
|
||||
var listProducts = {{ model.category_list.to_product_option_list() | tojson | safe }};
|
||||
#}
|
||||
|
||||
/*
|
||||
// hookup elements
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up store stock page...');
|
||||
hookupStorePageStockItem();
|
||||
});
|
||||
*/
|
||||
var currencies = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.currencies) | tojson | safe }};
|
||||
var products = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.get_list_products()) | tojson | safe }};
|
||||
var productCategories = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.category_list_filters.categories) | tojson | safe }};
|
||||
var productVariations = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.variations) | tojson | safe }};
|
||||
var productVariationTypes = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.variation_types) | tojson | safe }};
|
||||
{#
|
||||
var unitMeasurements = {{ units_measurement_dict | tojson | safe }};
|
||||
var unitMeasurementsTime = {{ units_measurement_time_dict | tojson | safe }};
|
||||
#}
|
||||
var unitMeasurements = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.units_measurement) | tojson | safe }};
|
||||
var unitMeasurementsTime = {{ model.convert_list_objects_to_dict_json_by_attribute_key_default(model.units_measurement_time) | tojson | safe }};
|
||||
var _rowBlankProductVariation = null;
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -103,7 +103,7 @@
|
||||
<!--
|
||||
<script>
|
||||
// pass arguments from model to JS
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_SUPPLIER }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_SUPPLIERS }}";
|
||||
|
||||
/*
|
||||
// hookup elements
|
||||
|
||||
Reference in New Issue
Block a user