ソースを参照

[Backend] Désactiver produit import bon de commande

develop
Fab 3年前
コミット
e75ec4e8b8
8個のファイルの変更89行の追加24行の削除
  1. +12
    -2
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  2. +2
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  3. +3
    -3
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig
  4. +2
    -2
      ShopBundle/Resources/views/backend/productfamily/panel_general.html.twig
  5. +2
    -0
      ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig
  6. +16
    -5
      ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig
  7. +34
    -0
      ShopBundle/Resources/views/backend/user/macros.html.twig
  8. +18
    -12
      ShopBundle/Resources/views/backend/user/show.html.twig

+ 12
- 2
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js ファイルの表示

@@ -161,7 +161,11 @@ $(window).on('load', function () {
},
behaviorPriceValue: function () {
return this.productFamily.behaviorPrice;
}
},
hasExportInfo: function () {
if((this.exportNote != null && this.exportNote != '') || (this.exportTitle != null && this.exportTitle != ''))return true
else return false;
},
},
data() {
return Object.assign(
@@ -193,7 +197,9 @@ $(window).on('load', function () {
expirationDateInherited: false,
availableQuantityInherited: false,
availableQuantityDefaultInherited: false,
propertyExpirationDateInherited: false
propertyExpirationDateInherited: false,
exportTitle: null,
exportNote: null
}, window.productForm[this.keyForm])
},
mounted: function () {
@@ -227,7 +233,11 @@ $(window).on('load', function () {
}else{
this.status = 1;
$(this.$el).removeClass('disabled');
if(this.hasExportInfo){
alert('Cette déclinaison contient un titre ou une note à l\'export');
}
}

},
decode(str){
var textArea = document.createElement('textarea');

+ 2
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml ファイルの表示

@@ -52,6 +52,7 @@ group:
initReduction: Réduction
export: Note à l'export
stockNegative: Produits stocks négatif
purchaseOrder: Bons de commandes
ReductionCatalog:
info: Informations principal
conditions: Conditions d'application
@@ -357,6 +358,7 @@ field:
displayPriceUnitRef: Afficher le prix par unité de référence
behaviorPrice: Travailler avec des tarifs
productsQuantityAsTitle: Titre équivalent à quantité
isDisabledOnPurchaseOrder: Automatiquement désactiver ce produit dans les bons de commandes
behaviorPriceOptions:
by-piece: À la pièce
by-reference-unit: Par unité de référence

+ 3
- 3
ShopBundle/Resources/views/backend/productfamily/macros.html.twig ファイルの表示

@@ -143,7 +143,7 @@

</td> #}
<td colspan="3">
<button type="button" class="btn-sm btn-info" @click="modalProductForm()">
<button type="button" :class="hasExportInfo ? 'btn-sm btn-info' : 'btn-sm btn-secondary'" @click="modalProductForm()">
<i class="fa fa-edit"></i>
</button>
<button type="button" class="btn-sm btn-info" @click="changeStatus()">
@@ -167,10 +167,10 @@
</div>
<div class="modal-body">
<div class="col">
{{ form_row(product.exportTitle) }}
{{ form_row(product.exportTitle, {'attr' : {"v-model" : 'exportTitle'}}) }}
</div>
<div class="col">
{{ form_row(product.exportNote) }}
{{ form_row(product.exportNote, {'attr' : {"v-model" : 'exportNote'}}) }}
</div>



+ 2
- 2
ShopBundle/Resources/views/backend/productfamily/panel_general.html.twig ファイルの表示

@@ -28,10 +28,10 @@
{% endfor %}
{% do form.sections.setRendered %}
</div>
{{ macros.endCard() }}
{{ macros.endCard(true) }}


{{ macros.startCard(8, 'ProductFamily.main','light') }}
{{ macros.startCard(0, 'ProductFamily.main','light') }}
<div class="col-12">
{{ form_row(form.supplier) }}
</div>

+ 2
- 0
ShopBundle/Resources/views/backend/productfamily/panel_products.html.twig ファイルの表示

@@ -261,6 +261,8 @@
{% if product.vars.value.availableQuantity %}availableQuantity: parseInt({{ product.vars.value.availableQuantity }}),{% endif %}
{% if product.vars.value.availableQuantityDefault %}availableQuantityDefault: parseInt({{ product.vars.value.availableQuantityDefault }}),{% endif %}
{% if product.vars.value.propertyExpirationDate %}propertyExpirationDate: "{{ product.vars.value.propertyExpirationDate }}",{% endif %}
{% if product.vars.value.exportTitle %}exportTitle: "{{ product.vars.value.exportTitle }}",{% endif %}
{% if product.vars.value.exportNote %}exportNote: "{{ product.vars.value.exportNote }}",{% endif %}
{# {% if product.vars.value.giftVoucherReductionCart %}giftVoucherReductionCart: {{ product.vars.value.giftVoucherReductionCart.id }},{% endif %} #}
{# {% if product.vars.value.expirationDate %}expirationDate: "{{ product.vars.value.expirationDate|date('d/m/Y') }}"{% endif %} #}
};

+ 16
- 5
ShopBundle/Resources/views/backend/productfamily/panel_stock.html.twig ファイルの表示

@@ -68,8 +68,18 @@
</p>
</div>

{{ macros.endCard(true) }}


{{ macros.startCard(0, 'ProductFamily.export', 'light') }}
<div class="col">
{{ form_row(form.exportTitle) }}
{{ form_row(form.exportNote) }}
</div>

{{ macros.endCard() }}


{{ macros.startCard(4, 'ProductFamily.storage', 'light') }}
<div class="col">
{{ form_row(form.depositoryZone) }}
@@ -77,16 +87,17 @@
</div>


{{ macros.endCard() }}

{{ macros.endCard(true) }}

{{ macros.startCard(8, 'ProductFamily.export', 'light') }}
{{ macros.startCard(0, 'ProductFamily.purchaseOrder', 'light') }}
<div class="col">
{{ form_row(form.exportTitle) }}
{{ form_row(form.exportNote) }}
{{ form_row(form.isDisabledOnPurchaseOrder) }}
</div>


{{ macros.endCard() }}




</div>

+ 34
- 0
ShopBundle/Resources/views/backend/user/macros.html.twig ファイルの表示

@@ -93,6 +93,40 @@
{% endembed %}
{% endmacro box_total_spent %}

{% macro box_prepaid_account(user) %}
{% embed '@LcShop/backend/default/block/embed_figure_box.twig' %}
{% set userMerchant = creditUtils.getUserMerchant() %}
{% trans_default_domain 'lcshop' %}
{% block class %}bg-blue{% endblock %}
{% block icon %}cash-register{% endblock %}
{% block label %}
<a class="text-white" href="{{ path('easyadmin', {"action" : 'show', 'entity': 'UserMerchant', 'id': userMerchant.id}) }}">
<i class="fa fa-pen"></i> Éditer
</a> - Solde compte prépayé
{% endblock %}
{% block value %}

{{ userMerchant.getCredit()|format_price(false) }}
{% if userMerchant.getCreditActive() ==false %}
<small>(inactif)</small>
{% endif %}

{% endblock %}
{% endembed %}
{% endmacro box_prepaid_account %}

{% macro box_average_products(user) %}
{% embed '@LcShop/backend/default/block/embed_figure_box.twig' %}
{% trans_default_domain 'lcshop' %}
{% block class %}bg-navy{% endblock %}
{% block icon %}shopping-basket{% endblock %}
{% block label %} Panier moyen{% endblock %}
{% block value %}
{{ orderUtils.getAverageProductsByUser(user)|format_price|raw }}
{% endblock %}
{% endembed %}
{% endmacro box_average_products %}

{% macro box_rank_total_order(user) %}
{% embed '@LcShop/backend/default/block/embed_figure_box.twig' %}
{% block class %}bg-info{% endblock %}

+ 18
- 12
ShopBundle/Resources/views/backend/user/show.html.twig ファイルの表示

@@ -6,7 +6,7 @@
{% block global_actions %}
{% if entity is not null %}
{% set action = {label : "action.user.switch", icon: 'user-secret', css_class: 'btn btn-sm btn-danger'} %}
{% include '@LcShop/backend/user/block/user-switch.html.twig' with {item: entity, is_dropdown: false, action: action, translation_domain: 'lcshop', trans_parameters: {}, item_id: entity.id}%}
{% include '@LcShop/backend/user/block/user-switch.html.twig' with {item: entity, is_dropdown: false, action: action, translation_domain: 'lcshop', trans_parameters: {}, item_id: entity.id} %}

<button id="btn-ticket-write-to-user"
data-url="{{ path('easyadmin', {'entity': 'Ticket', 'action': 'new'}) }}"
@@ -24,17 +24,23 @@
<div class="col-3">
{{ user_macros.card_info(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_rank_total_order(entity) }}
{{ user_macros.box_total_order(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_rank_sum_order(entity) }}
{{ user_macros.box_total_spent(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_register_since(entity) }}
{{ user_macros.box_login_since(entity) }}
<div class="col-9 row">
<div class="col-3">
{{ user_macros.box_rank_total_order(entity) }}
{{ user_macros.box_total_order(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_rank_sum_order(entity) }}
{{ user_macros.box_total_spent(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_prepaid_account(entity) }}
{{ user_macros.box_average_products(entity) }}
</div>
<div class="col-3">
{{ user_macros.box_register_since(entity) }}
{{ user_macros.box_login_since(entity) }}
</div>
</div>
<div class="col-6">
{% set redeliveries = orderUtils.getRedeliveryByUser(entity) %}

読み込み中…
キャンセル
保存