Browse Source

Correctif liste produits

feature/export_comptable
Fab 4 years ago
parent
commit
d2b3a82505
3 changed files with 20 additions and 9 deletions
  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 View File

$query = $this->filterOrderValid($query); $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'])) { if (isset($params['user'])) {
$query->andWhere('e.user = :user')->setParameter('user', $params['user']); $query->andWhere('e.user = :user')->setParameter('user', $params['user']);
} }

+ 2
- 2
ShopBundle/Resources/translations/lcshop.fr.yaml View File

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

+ 12
- 7
ShopBundle/Resources/views/backend/default/list.html.twig View File

</div> </div>
{% else %} {% else %}
<div class="form-widget input-group-sm"> <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> </div>
{% endif %} {% endif %}




<td class="{{ isSortingField ? 'sorted' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}> <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") %} {% 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) }} {{ easyadmin_render_field_for_list_view(_entity_config.name, item, metadata) }}
</a> </a>
{% else %} {% else %}




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

Loading…
Cancel
Save