1. Logout callback fix.\n 2. Store permutations report improvement for demo.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
{% else %}
|
||||
<h3 style="white-space: nowrap;">Product not available</h3>
|
||||
{% endif %}
|
||||
<a class="{{ model.flag_basket_item_delete }}">Delete</a>
|
||||
<a class="{{ model.FLAG_DELETE }}">Delete</a>
|
||||
{% if show_delivery_option %}
|
||||
<div class="{{ model.flag_container_input }}">
|
||||
{{ product.form_delivery_option.label }}
|
||||
|
||||
@@ -23,9 +23,12 @@
|
||||
<td class="{{ model.FLAG_QUANTITY_MAX }}">
|
||||
<input class="{{ model.FLAG_QUANTITY_MAX }}" type="number" min="0" value="0" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}>
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL }}">
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
|
||||
</td>
|
||||
<!-- <td><strong>{ { permutation.output_currency() }}</strong>{ { permutation.get_price_local() }}</td> -->
|
||||
<td class="{{ model.FLAG_DETAIL }}">
|
||||
<a>Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr {{ model.ATTR_ID_PERMUTATION }}="{{ permutation.id_permutation }}">
|
||||
@@ -56,9 +59,12 @@
|
||||
<td class="{{ model.FLAG_QUANTITY_MAX }}">
|
||||
<input class="{{ model.FLAG_QUANTITY_MAX }}" type="number" min="0" value="{{ permutation.quantity_max }}" {{ model.ATTR_VALUE_CURRENT }}="{{ permutation.quantity_max }}" {{ model.ATTR_VALUE_PREVIOUS }}="{{ permutation.quantity_max }}">
|
||||
</td>
|
||||
<td class="{{ model.FLAG_COST_LOCAL }}">
|
||||
<td class="{{ model.FLAG_COST_LOCAL_VAT_INCL }}">
|
||||
<strong>{{ permutation.output_currency() }}</strong>{{ permutation.cost_local }}
|
||||
</td>
|
||||
<!-- <td><strong>{{ permutation.output_currency() }}</strong>{ { permutation.get_price_local() }}</td> -->
|
||||
<td class="{{ model.FLAG_DETAIL }}">
|
||||
<a>Detail</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
@@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/store_product_permutation.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<form id="{{ model.ID_FORM_FILTERS_PERMUTATIONS }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('permutations_post') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
<form id="{{ model.ID_FORM_FILTERS_PERMUTATIONS }}" class="{{ model.FLAG_ROW }} {{ model.FLAG_CARD }}" action="{{ url_for('permutation_save') }}" method="POST"> <!-- {{ model.FLAG_CONTAINER }} -->
|
||||
{{ model.form_filters.hidden_tag() }}
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
@@ -32,21 +32,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.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.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.form_filters.quantity_max.label }}
|
||||
{{ model.form_filters.quantity_max() }}
|
||||
{% for error in model.form_filters.quantity_max.errors %}
|
||||
@@ -59,14 +63,22 @@
|
||||
{ { model.form_filters.submit() }}
|
||||
</div>
|
||||
-->
|
||||
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_COLUMN }}">
|
||||
<div class="{{ model.FLAG_CONTAINER_INPUT }}">
|
||||
{% set block_id = 'button_add' %}
|
||||
{% include '_blocks_button_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 '_blocks_button_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 '_blocks_button_save_cancel.html' %}
|
||||
{% set block_id = 'button_add' %}
|
||||
{% include '_blocks_button_save_cancel.html' %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -87,6 +99,7 @@
|
||||
<th class="{{ model.FLAG_QUANTITY_MAX }}">Quantity Max</th>
|
||||
<th class="{{ model.FLAG_COST_LOCAL }}">Cost</th>
|
||||
<!-- <th>Price</th> -->
|
||||
<th class="{{ model.FLAG_DETAIL }}">Link</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -123,7 +136,7 @@
|
||||
var flagQuantityStock = "{{ model.FLAG_QUANTITY_STOCK }}";
|
||||
var flagQuantityMin = "{{ model.FLAG_QUANTITY_MIN }}";
|
||||
var flagQuantityMax = "{{ model.FLAG_QUANTITY_MAX }}";
|
||||
var flagCostLocal = "{{ model.FLAG_COST_LOCAL }}";
|
||||
var flagCostLocalVATIncl = "{{ model.FLAG_COST_LOCAL_VAT_INCL }}";
|
||||
var flagIsOutOfStock = "{{ model.FLAG_IS_OUT_OF_STOCK }}";
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_PRODUCT_PERMUTATION }}";
|
||||
var idFilterCategory = "#{{ model.ID_FILTER_CATEGORY }}";
|
||||
@@ -136,6 +149,12 @@
|
||||
var dictListsProducts = {{ model.category_list.to_dict_lists_products() | tojson | safe }};
|
||||
var listCategories = {{ model.category_list.to_list_categories() | tojson | safe }};
|
||||
var listProducts = {{ model.category_list.to_list_products() | 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[attrIdVariation], variation]));
|
||||
var dictVariationTypes = Object.fromEntries(listVariationTypes.map((variationType, index) => [variationType[attrIdVariationType], variationType]));
|
||||
listVariations = listVariations.map((variation, index) => { return variation[attrIdVariation]; });
|
||||
listVariationTypes = listVariationTypes.map((variationType, index) => { return variationType[attrIdVariationType]; });
|
||||
|
||||
// hookup elements
|
||||
$(document).ready(function() {
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
var attrIdPermutation = "{{ model.ATTR_ID_PERMUTATION }}";
|
||||
var attrIdProduct = "{{ model.ATTR_ID_PRODUCT }}";
|
||||
var attrIdProductCategory = "{{ model.ATTR_ID_PRODUCT_CATEGORY }}";
|
||||
var flagBasketItemDelete = "{{ model.FLAG_BASKET_ITEM_DELETE }}";
|
||||
var attrIdVariation = "{{ model.ATTR_ID_VARIATION }}";
|
||||
var attrIdVariationType = "{{ model.ATTR_ID_VARIATION_TYPE }}";
|
||||
var flagBtnBasketAdd = "{{ model.FLAG_BTN_BASKET_ADD }}";
|
||||
var flagBtnBuyNow = "{{ model.FLAG_BTN_BUY_NOW }}";
|
||||
var hashStoreBasketAdd = "{{ model.HASH_STORE_BASKET_ADD }}";
|
||||
@@ -38,6 +39,8 @@
|
||||
var keyIdProduct = "{{ model.KEY_ID_PRODUCT }}";
|
||||
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 }}";
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
var attrValueCurrent = "{{ model.ATTR_VALUE_CURRENT }}";
|
||||
var attrValuePrevious = "{{ model.ATTR_VALUE_PREVIOUS }}";
|
||||
var attrValueNew = "{{ model.ATTR_VALUE_NEW }}";
|
||||
var flagAdd = "{{ model.FLAG_ADD }}";
|
||||
var flagBtnOverlayClose = "{{ model.FLAG_BTN_OVERLAY_CLOSE }}";
|
||||
var flagBtnSubmit = "{{ model.FLAG_BTN_SUBMIT }}";
|
||||
var flagCard = "{{ model.FLAG_CARD }}";
|
||||
@@ -54,6 +55,8 @@
|
||||
var flagColumn = "{{ model.FLAG_COLUMN }}";
|
||||
var flagContainer = "{{ model.FLAG_CONTAINER }}";
|
||||
var flagContainerInput = "{{ model.FLAG_CONTAINER_INPUT }}";
|
||||
var flagDelete = "{{ model.FLAG_DELETE }}";
|
||||
var flagDetail = "{{ model.FLAG_DETAIL }}";
|
||||
var flagDirty = "{{ model.FLAG_DIRTY }}";
|
||||
var flagExpanded = "{{ model.FLAG_EXPANDED }}";
|
||||
var flagInitialised = "{{ model.FLAG_INITIALISED }}";
|
||||
|
||||
Reference in New Issue
Block a user