{% extends 'base.html.twig' %} {% block title %}Imports — VIIZIA{% endblock %} {% block javascripts %} {{ parent() }} {% if jobs is not empty %} {% endif %} {% endblock %} {% block body %} {% set imp_sort_cols = constant('App\\Dto\\Admin\\ImportJobListQuery::SORT_KEYS') %} {% set imp_col_labels = constant('App\\Dto\\Admin\\ImportJobListQuery::COLUMN_LABELS') %} {% set per_page_choices = constant('App\\Dto\\Admin\\ImportJobListQuery::PER_PAGE_CHOICES') %}

Imports

{% if imports_total > 0 %} {% set range_from = ((imports_list.page - 1) * imports_list.perPage) + 1 %} {% set range_end = imports_list.page * imports_list.perPage %} {% set range_to = range_end > imports_total ? imports_total : range_end %} {{ range_from }}–{{ range_to }} sur {{ imports_total }} import{{ imports_total > 1 ? 's' : '' }} {% else %} Aucun import enregistré {% endif %}

{% if jobs is empty %}

Aucun import

Importez votre premier relevé CSV ou PDF pour démarrer.

Nouvel import
{% else %}
Cochez une ou plusieurs lignes, puis validez (page courante uniquement). Les transactions déjà importées depuis ces fichiers restent dans le registre sans lien métier avec l’import.
{% for col in imp_sort_cols %} {% set is_cur = imports_list.sort == col %} {% set aria_sort = is_cur ? (imports_list.order == 'asc' ? 'ascending' : 'descending') : 'none' %} {% set is_num = col in ['total', 'imported', 'skipped'] %} {% endfor %} {% for job in jobs %} {% endfor %}
{{ attribute(imp_col_labels, col) }} {% if is_cur %} {% endif %} {% if is_cur %} — tri {{ imports_list.order == 'asc' ? 'croissant' : 'décroissant' }}{% else %}, trier{% endif %} Actions
{{ job.sourceFilename }} {{ job.organization.name }} {{ job.bankAccount.label }} {{ job.status.label }} {{ job.transactionsTotal }} {{ job.transactionsImported }} {{ job.transactionsSkipped }} {{ job.createdAt|date('d/m/Y H:i') }}
{% if job.sourceType.value == 'csv' %} {% elseif job.sourceType.value == 'pdf' %} {% endif %}
{% set range_from = imports_total > 0 ? ((imports_list.page - 1) * imports_list.perPage) + 1 : 0 %} {% set range_end = imports_total > 0 ? imports_list.page * imports_list.perPage : 0 %} {% set range_to = imports_total > 0 ? (range_end > imports_total ? imports_total : range_end) : 0 %}
{% for n in per_page_choices %} {% if imports_list.perPage == n %} {{ n }} {% else %} {{ n }} {% endif %} {% endfor %}
Éléments par page
{% if imports_total > 0 %} {{ range_from }}–{{ range_to }} sur {{ imports_total }} {% endif %}
{% endif %} {% endblock %}