Просмотр исходного кода

Correctif liste produits

feature/export_comptable
Fab 4 лет назад
Родитель
Сommit
d2b3a82505
3 измененных файлов: 20 добавлений и 9 удалений
  1. +6
    -0
      ShopBundle/Repository/OrderShopRepository.php
  2. +2
    -2
      ShopBundle/Resources/translations/lcshop.fr.yaml
  3. +12
    -7
      ShopBundle/Resources/views/backend/default/list.html.twig

+ 6
- 0
ShopBundle/Repository/OrderShopRepository.php Просмотреть файл

@@ -150,6 +150,12 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query = $this->filterOrderValid($query);
}

if (isset($params['orderStatus'])) {
$query->leftJoin('e.orderStatus', 'os');
$query->andWhere('os.alias LIKE :alias');
$query->setParameter('alias', $params['orderStatus']);
}

if (isset($params['user'])) {
$query->andWhere('e.user = :user')->setParameter('user', $params['user']);
}

+ 2
- 2
ShopBundle/Resources/translations/lcshop.fr.yaml Просмотреть файл

@@ -313,8 +313,8 @@ field:
non-renewable: Non renouvelable
organicLabelOptions:
ab: Agriculture biologique
hVE: Haute valeur environnementale
natureProgres: Nature & progrès
hve: Haute valeur environnementale
nature-progres: Nature & progrès
behaviorExpirationDate: Gèrer
behaviorExpirationDateOptions:
by-product-family: Par produit

+ 12
- 7
ShopBundle/Resources/views/backend/default/list.html.twig Просмотреть файл

@@ -199,11 +199,15 @@
</div>
{% else %}
<div class="form-widget input-group-sm">
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', {
action: 'autocomplete',
field: field,
entity: _entity_config.name,
})|raw }}) }}
{% if metadata.dataType == 'integer' or metadata.dataType== 'text' %}
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', {
action: 'autocomplete',
field: field,
entity: _entity_config.name,
})|raw }}) }}
{% else %}
{{ form_widget(filters_form[field]) }}
{% endif %}
</div>
{% endif %}

@@ -260,7 +264,8 @@

<td class="{{ isSortingField ? 'sorted' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>
{% if (field == 'title' or field== 'id') and (metadata.dataType=="string" or metadata.dataType=="integer") %}
<a class="link-as-text" href="{{ path('easyadmin', {'action':'edit', 'entity':_entity_config.name, 'id': item.id}) }}">
<a class="link-as-text"
href="{{ path('easyadmin', {'action':'edit', 'entity':_entity_config.name, 'id': item.id}) }}">
{{ easyadmin_render_field_for_list_view(_entity_config.name, item, metadata) }}
</a>
{% else %}
@@ -372,7 +377,7 @@


<script type="text/javascript">
$(document).ready(function(){
$(document).ready(function () {
const toggles = document.querySelectorAll('.custom-switch input[type="checkbox"]');
for (i = 0; i < toggles.length; i++) {
toggles[i].addEventListener('change', function () {

Загрузка…
Отмена
Сохранить