{% extends 'admin/hub/layout.html.twig' %} {% set hub_title = 'Mercuriale' %} {% set hub_breadcrumbs = [ { label: 'Mercuriale', url: path('app_produits_liste') }, { label: 'Mapping' } ] %} {% block title %}Mapping des colonnes - Import Mercuriale{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block hub_content %}

Mapping des colonnes

{% include 'components/_import_progress.html.twig' with { current_step: 2 } only %} {# Import info #}
{{ import.originalFilename }}
{{ import.fournisseur.nom }} {% if import.etablissements|length > 0 %} - {{ import.etablissements|map(e => e.nom)|join(', ') }} {% else %} - Prix groupe {% endif %}
{{ import.totalRows }}
lignes
{{ form_start(form, {'attr': {'id': 'mapping-form', 'novalidate': 'novalidate'}}) }}
{# Mapping form #}

Association des colonnes

{# Required fields #}

Champs obligatoires

{{ form_widget(form.mapping_code_fournisseur, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.mapping_designation, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.mapping_prix, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{# Optional fields #}

Champs optionnels

{{ form_widget(form.mapping_unite, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.mapping_conditionnement, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.mapping_date_debut, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.mapping_date_fin, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{# Options #}

Options

{{ form_widget(form.hasHeaderRow) }}
{{ form_widget(form.defaultUnite, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{{ form_widget(form.defaultDateDebut, {'attr': {'class': 'mi-form-field mi-form-field--sm'}}) }}
{# Preview data #}

Apercu des donnees

Premieres lignes du fichier

{% for header in headers %} {% endfor %} {% for index, row in previewRows %} {% for cell in row %} {% endfor %} {% endfor %}
#{{ header ?: '(vide)' }}
{{ index + 2 }} {{ cell ?: '-' }}
{% if import.totalRows > 5 %}

+ {{ import.totalRows - 5 }} autres lignes

{% endif %}
{# Actions #}
Retour
{{ form_end(form) }}
{% endblock %}