Ver código fonte

Tableau renouvelement stock

feature/export_comptable
Fab 4 anos atrás
pai
commit
85d798bf11
4 arquivos alterados com 164 adições e 133 exclusões
  1. +5
    -0
      ShopBundle/Resources/public/css/backend/custom.css
  2. +1
    -1
      ShopBundle/Resources/public/sass/backend/custom.scss
  3. +2
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  4. +156
    -132
      ShopBundle/Resources/views/backend/default/list.html.twig

+ 5
- 0
ShopBundle/Resources/public/css/backend/custom.css Ver arquivo

@@ -763,6 +763,11 @@ table.products-collection-table tr.disabled {
opacity: 0.5;
}

/* line 264, ../../sass/backend/custom.scss */
table.table-renewable-stock tr.product-family {
border-top: 2px solid #888;
}

/* DeliveryZone */
/* line 268, ../../sass/backend/custom.scss */
#autocomplete-cities {

+ 1
- 1
ShopBundle/Resources/public/sass/backend/custom.scss Ver arquivo

@@ -261,7 +261,7 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax{background: #eeeeee; background-clip: padding-box}

table.products-collection-table tr.disabled{opacity: 0.5}
table.table-renewable-stock tr.product-family{border-top: 2px solid #888; }

/* DeliveryZone */


+ 2
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml Ver arquivo

@@ -141,6 +141,8 @@ error:
debited: Une erreur est survenue, le crédit n'a pas été débité
notEnoughCredit: Le compte prépayé n'est pas suffisament allimenté
notAdded: Le crédit n'a pas été ajouté
productFamily:
editStock: Le stock n'a pas été modifié, une erreur est survenue
field:
default:
placeholder: Choisissez une option

+ 156
- 132
ShopBundle/Resources/views/backend/default/list.html.twig Ver arquivo

@@ -81,6 +81,8 @@
{% endblock content_header %}

{% block main %}
{% block main_append %}{% endblock %}

{% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %}
{% set _number_of_hidden_results = 0 %}
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %}
@@ -88,68 +90,75 @@
<div class="col-12">
<div class="card card-outline card-primary">
<div class="card-header">
<h2 class="card-title text-lg ">
{#{{ "list.title"|trans({'%label%' : _entity_config['label']|lower }) }}#}
{% if paginator.nbResultsTotal != paginator.nbResults %}
<span data-toggle="tooltip" title="{{ "list.nbResultsFiltered"|trans }}"
class="badge badge-info">{{ paginator.nbResults }} <i
class="fa fa-search"></i> </span>
|
{% endif %}
<span data-toggle="tooltip" title="{{ "list.nbResults"|trans }}"
class="badge badge-primary">{{ paginator.nbResultsTotal }} <i
class="fa fa-bars"></i> </span>
{% if paginator.nbResultsOnline is defined %}<span data-toggle="tooltip"
title="{{ "list.nbResultsOnline"|trans }}"
class="badge badge-success">{{ paginator.nbResultsOnline }}
<i class="fa fa-check"></i> </span>{% endif %}
{% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip"
title="{{ "list.nbResultsOffline"|trans }}"
class="badge badge-warning">{{ paginator.nbResultsOffline }}
<i class="fa fa-pen"></i></span>{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span
data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}"
class="badge badge-danger">{{ paginator.nbResultsDeleted }} <i class="fa fa-trash"></i>
</span>{% endif %}

</h2>
{% if easyadmin_action_is_enabled_for_list_view('new', _entity_config.name) %}
{% set _action = easyadmin_get_action_for_list_view('new', _entity_config.name) %}
{% block new_action %}
<div class="button-action">
<a class="float-right {{ _action.css_class|default('') }}"
href="{{ path('easyadmin', _request_parameters|merge({ action: _action.name })) }}"
target="{{ _action.target }}">
<i class="fa fa-fw fa-plus"></i>
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }}
</a>

{% if _entity_config['list']['btn_init_export_purchase_order'] is defined %}
<a class="float-right btn-sm btn-success action-sort"
href="{{ path('easyadmin', { entity: 'Supplier', action: 'initExportPurchaseOrder' }) }}"
target="{{ _action.target }}">
<i class="fa fa-undo"></i> Réinitialiser export bons de commande
</a>
{% block card_header %}

<h2 class="card-title text-lg ">
{% block paginator_nb_results %}
{#{{ "list.title"|trans({'%label%' : _entity_config['label']|lower }) }}#}
{% if paginator.nbResultsTotal != paginator.nbResults %}
<span data-toggle="tooltip" title="{{ "list.nbResultsFiltered"|trans }}"
class="badge badge-info">{{ paginator.nbResults }} <i
class="fa fa-search"></i> </span>
|
{% endif %}
<span data-toggle="tooltip" title="{{ "list.nbResults"|trans }}"
class="badge badge-primary">{{ paginator.nbResultsTotal }} <i
class="fa fa-bars"></i> </span>
{% if paginator.nbResultsOnline is defined %}<span data-toggle="tooltip"
title="{{ "list.nbResultsOnline"|trans }}"
class="badge badge-success">{{ paginator.nbResultsOnline }}
<i class="fa fa-check"></i> </span>{% endif %}
{% if paginator.nbResultsOffline is defined %}<span data-toggle="tooltip"
title="{{ "list.nbResultsOffline"|trans }}"
class="badge badge-warning">{{ paginator.nbResultsOffline }}
<i class="fa fa-pen"></i></span>{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') and paginator.nbResultsDeleted is defined %}<span
data-toggle="tooltip" title="{{ "list.nbResultsDeleted"|trans }}"
class="badge badge-danger">{{ paginator.nbResultsDeleted }} <i
class="fa fa-trash"></i>
</span>{% endif %}
{% endblock %}

{% if _entity_config['list']['edit_position'] is defined %}
<a class="float-right btn-sm btn-success action-sort"
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}"
</h2>
{% if easyadmin_action_is_enabled_for_list_view('new', _entity_config.name) %}
{% set _action = easyadmin_get_action_for_list_view('new', _entity_config.name) %}
{% block new_action %}
<div class="button-action">
<a class="float-right {{ _action.css_class|default('') }}"
href="{{ path('easyadmin', _request_parameters|merge({ action: _action.name })) }}"
target="{{ _action.target }}">
<i class="fa fa-sort"></i> Modifier position
<i class="fa fa-fw fa-plus"></i>
{{ _action.label is defined and not _action.label is empty ? _action.label|trans(_trans_parameters) }}
</a>
{% endif %}

{% if app.request.get('action') == 'listChildren' and app.request.get('entity') == 'ProductCategory' %}
<a class="float-right btn-sm btn-primary"
href="{{ path('easyadmin', {action: 'list', entity: 'ProductCategory'}) }}">
<i class="fa fa-chevron-left"></i> Retour à la catégorie parente
</a>
{% endif %}
{% if _entity_config['list']['btn_init_export_purchase_order'] is defined %}
<a class="float-right btn-sm btn-success action-sort"
href="{{ path('easyadmin', { entity: 'Supplier', action: 'initExportPurchaseOrder' }) }}"
target="{{ _action.target }}">
<i class="fa fa-undo"></i> Réinitialiser export bons de commande
</a>
{% endif %}

{% if _entity_config['list']['edit_position'] is defined %}
<a class="float-right btn-sm btn-success action-sort"
href="{{ path('easyadmin', _request_parameters|merge({ action: 'sort' })) }}"
target="{{ _action.target }}">
<i class="fa fa-sort"></i> Modifier position
</a>
{% endif %}

{% if app.request.get('action') == 'listChildren' and app.request.get('entity') == 'ProductCategory' %}
<a class="float-right btn-sm btn-primary"
href="{{ path('easyadmin', {action: 'list', entity: 'ProductCategory'}) }}">
<i class="fa fa-chevron-left"></i> Retour à la catégorie parente
</a>
{% endif %}

</div>
{% endblock new_action %}
{% endif %}
{% endblock card_header %}

</div>
{% endblock new_action %}
{% endif %}
</div>


@@ -189,62 +198,70 @@
{% endif %}
</tr>
{% endblock table_head %}
<tr class="table-filters-line">
{% if _has_batch_actions %}
<th></th>{% endif %}
{% for field, metadata in _fields_visible_by_user %}
<th>

{% if filters_form[field] is defined %}
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %}
<div class="input-group input-group-sm">
<input type="text"
class="form-control input-sm float-right date-range">
<div class="hidden date-time-range-fields" style="display: none;">
{{ form_widget(filters_form[field]['dateStart'], {"attr" : {'class' : 'date-start', 'form': 'filters-form'}}) }}
{{ form_widget(filters_form[field]['dateEnd'], {"attr" : {'class' : 'date-end', 'form': 'filters-form'}}) }}
</div>
</div>
{% else %}
<div class="form-widget input-group-sm">
{% if metadata.dataType == 'integer' or metadata.dataType== 'string' %}
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', {
action: 'autocomplete',
field: field,
entity: _entity_config.name,
})|raw }}) }}
{% block table_filters %}
{% if filters_form is defined %}
<tr class="table-filters-line">
{% if _has_batch_actions %}
<th></th>{% endif %}
{% for field, metadata in _fields_visible_by_user %}
<th>

{% if filters_form[field] is defined %}
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %}
<div class="input-group input-group-sm">
<input type="text"
class="form-control input-sm float-right date-range">
<div class="hidden date-time-range-fields"
style="display: none;">
{{ form_widget(filters_form[field]['dateStart'], {"attr" : {'class' : 'date-start', 'form': 'filters-form'}}) }}
{{ form_widget(filters_form[field]['dateEnd'], {"attr" : {'class' : 'date-end', 'form': 'filters-form'}}) }}
</div>
</div>
{% else %}
{{ form_widget(filters_form[field]) }}
<div class="form-widget input-group-sm">
{% if metadata.dataType == 'integer' or metadata.dataType== 'string' %}
{{ 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 %}
</div>
{% endif %}

{% endif %}


</th>
{% endfor %}
{% if _list_item_actions|length > 0 %}
<th class="actions">
<button type="submit" form="filters-form" class="btn btn-sm btn-info"
data-toggle="tooltip" title="{{ "action.apply"|trans({}, 'lcshop') }}"
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}">
<i class="fa fa-search"></i>
</button>
{% if filters_form.vars.submitted %}
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}"
class="btn btn-sm btn-warning lc-reset-filters" data-toggle="tooltip"
title="{{ "action.reset"|trans({}, 'lcshop') }}"
aria-label="{{ "action.reset"|trans({}, 'lcshop') }}">
<i class="fa fa-eraser"></i>
</a>
{% endif %}


</th>
{% endfor %}
{% if _list_item_actions|length > 0 %}
<th class="actions">
<button type="submit" form="filters-form" class="btn btn-sm btn-info"
data-toggle="tooltip"
title="{{ "action.apply"|trans({}, 'lcshop') }}"
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}">
<i class="fa fa-search"></i>
</button>
{% if filters_form.vars.submitted %}
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}"
class="btn btn-sm btn-warning lc-reset-filters"
data-toggle="tooltip"
title="{{ "action.reset"|trans({}, 'lcshop') }}"
aria-label="{{ "action.reset"|trans({}, 'lcshop') }}">
<i class="fa fa-eraser"></i>
</a>
{% endif %}


</th>
{% endif %}


</th>
</tr>
{% endif %}

</tr>
{% endblock table_filters %}
{% block table_search %}

{% endblock %}
@@ -320,35 +337,42 @@
{% endblock table_body %}
</tbody>
</table>

{{ form_start(filters_form, {'attr' :{'id' : 'filters-form'}}) }}
{% form_theme filters_form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}

<input type="hidden" name="entity" value="{{ _entity_config.name }}">
<input type="hidden" name="menuIndex" value="{{ app.request.get('menuIndex') }}">
<input type="hidden" name="submenuIndex" value="{{ app.request.get('submenuIndex') }}">
<input type="hidden" name="sortField" value="{{ app.request.get('sortField', '') }}">
<input type="hidden" name="sortDirection"
value="{{ app.request.get('sortDirection', 'DESC') }}">
<input type="hidden" name="action" value="{{ app.request.get('action') }}">
{{ form_end(filters_form) }}

{% block delete_form %}
{% set referer = paginator.currentPage == paginator.nbPages and 1 != paginator.currentPage and 1 == paginator.currentPageResults|length
? path('easyadmin', app.request.query|merge({ page: app.request.query.get('page') - 1 }))
: app.request.requestUri %}

{{ include('@EasyAdmin/default/includes/_delete_form.html.twig', {
view: 'list',
referer: referer,
delete_form: delete_form_template,
_translation_domain: _entity_config.translation_domain,
_trans_parameters: _trans_parameters,
_entity_config: _entity_config,
}, with_context = false) }}
{% endblock delete_form %}
{% endblock table %}

{% block filters_form %}
{% if filters_form is defined %}
{{ form_start(filters_form, {'attr' :{'id' : 'filters-form'}}) }}
{% form_theme filters_form '@LcShop/backend/form/custom_bootstrap_4.html.twig' %}

<input type="hidden" name="entity" value="{{ _entity_config.name }}">
<input type="hidden" name="menuIndex" value="{{ app.request.get('menuIndex') }}">
<input type="hidden" name="submenuIndex" value="{{ app.request.get('submenuIndex') }}">
<input type="hidden" name="sortField" value="{{ app.request.get('sortField', '') }}">
<input type="hidden" name="sortDirection"
value="{{ app.request.get('sortDirection', 'DESC') }}">
<input type="hidden" name="action" value="{{ app.request.get('action') }}">
{{ form_end(filters_form) }}
{% endif %}
{% endblock filters_form %}


{% block delete_form %}
{% set referer = paginator.currentPage == paginator.nbPages and 1 != paginator.currentPage and 1 == paginator.currentPageResults|length
? path('easyadmin', app.request.query|merge({ page: app.request.query.get('page') - 1 }))
: app.request.requestUri %}

{{ include('@EasyAdmin/default/includes/_delete_form.html.twig', {
view: 'list',
referer: referer,
delete_form: delete_form_template,
_translation_domain: _entity_config.translation_domain,
_trans_parameters: _trans_parameters,
_entity_config: _entity_config,
}, with_context = false) }}
{% endblock delete_form %}

</div>

</div>
</div>
</div>

Carregando…
Cancelar
Salvar