{% extends 'base.html.twig' %}
{% block title %}Liste des propositions commerciales{% endblock %}
{% block body %}
<div class="page-header">
<h1 class="page-title">Liste des propositions commerciales</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ path('home') }}">Accueil Commercial</a></li>
<li class="breadcrumb-item active" aria-current="page">Propositions commerciales</li>
</ol>
</div>
<div class="row">
<div class="col-md-12 col-lg-12">
<div class="card">
<div class="card-header">
<a href="{{ path('select_training') }}" class="btn btn-azure">Ajouter une nouvelle proposition</a>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="data-table-order" class="table table-striped table-bordered" >
<thead>
<tr>
<th>Date de création/modification</th>
<th>Date de validité RNCP</th>
<th>Titre de la proposition</th>
<th>Titre de la formation</th>
<th>Date de formation</th>
<th>PDF</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{% for fiche in fiches %}
<tr>
<td data-order="{{ fiche.editDate |date("Y-m-d") }}" > {{ fiche.editDate |date("d/m/Y") }}</td>
<td data-order="{{fiche.validityDateRncp ? fiche.validityDateRncp|date('Y/m/d') : '' }}" > {{ fiche.validityDateRncp ? fiche.validityDateRncp|date('d/m/Y') : '' }}</td>
<td>{{ fiche.ficheTitle }}</td>
<td>{{ fiche.title }}</td>
<td>{{ fiche.date }}</td>
<td>
<div class="d-flex flex-row justify-content-center">
<a href="{{ path('generate_pdf', {id: fiche.id}) }}" class="btn btn-azure dark w-30" title="Générer un PDF">
<i class="bi bi-file-earmark-pdf" style="margin-left: -2px">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-pdf" viewBox="0 0 16 16">
<path d="M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2zM9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5v2z"/>
<path d="M4.603 14.087a.81.81 0 0 1-.438-.42c-.195-.388-.13-.776.08-1.102.198-.307.526-.568.897-.787a7.68 7.68 0 0 1 1.482-.645 19.697 19.697 0 0 0 1.062-2.227 7.269 7.269 0 0 1-.43-1.295c-.086-.4-.119-.796-.046-1.136.075-.354.274-.672.65-.823.192-.077.4-.12.602-.077a.7.7 0 0 1 .477.365c.088.164.12.356.127.538.007.188-.012.396-.047.614-.084.51-.27 1.134-.52 1.794a10.954 10.954 0 0 0 .98 1.686 5.753 5.753 0 0 1 1.334.05c.364.066.734.195.96.465.12.144.193.32.2.518.007.192-.047.382-.138.563a1.04 1.04 0 0 1-.354.416.856.856 0 0 1-.51.138c-.331-.014-.654-.196-.933-.417a5.712 5.712 0 0 1-.911-.95 11.651 11.651 0 0 0-1.997.406 11.307 11.307 0 0 1-1.02 1.51c-.292.35-.609.656-.927.787a.793.793 0 0 1-.58.029zm1.379-1.901c-.166.076-.32.156-.459.238-.328.194-.541.383-.647.547-.094.145-.096.25-.04.361.01.022.02.036.026.044a.266.266 0 0 0 .035-.012c.137-.056.355-.235.635-.572a8.18 8.18 0 0 0 .45-.606zm1.64-1.33a12.71 12.71 0 0 1 1.01-.193 11.744 11.744 0 0 1-.51-.858 20.801 20.801 0 0 1-.5 1.05zm2.446.45c.15.163.296.3.435.41.24.19.407.253.498.256a.107.107 0 0 0 .07-.015.307.307 0 0 0 .094-.125.436.436 0 0 0 .059-.2.095.095 0 0 0-.026-.063c-.052-.062-.2-.152-.518-.209a3.876 3.876 0 0 0-.612-.053zM8.078 7.8a6.7 6.7 0 0 0 .2-.828c.031-.188.043-.343.038-.465a.613.613 0 0 0-.032-.198.517.517 0 0 0-.145.04c-.087.035-.158.106-.196.283-.04.192-.03.469.046.822.024.111.054.227.09.346z"/>
</svg>
</i>
</a>
</div>
</td>
<td>
<div class="actions-cell d-flex flex-row justify-content-around">
<a class="btn btn-light w-30" href="{{ path('fiches_show', {id : fiche.id}) }}" title="Voir la proposition commerciale">
<i class="bi bi-eye-fill">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-fill" viewBox="0 0 16 16">
<path d="M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z"/>
<path d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z"/>
</svg>
</i>
</a>
<a href="{{ path('fiches_edit', {id : fiche.id}) }}" class="btn btn-azure w-30" title="Modifier la proposition commerciale">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-fill" viewBox="0 0 16 16">
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
</svg>
</a>
{{ include('commercial/fiches/_delete_form.html.twig') }}
<form name="duplicate_form" action="{{ path('fiches_new') }}" method="post">
<input id="duplicate_form_trainings" name="duplicate_form[trainings]" value="{{ fiche.id }}" type="hidden">
<button class="btn btn-azure" title="Dupliquer la proposition commerciale">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-files" viewBox="0 0 16 16">
<path d="M13 0H6a2 2 0 0 0-2 2 2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2 2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zm0 13V4a2 2 0 0 0-2-2H5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1zM3 4a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4z"/>
</svg>
</button>
</form>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- table-wrapper -->
</div>
</div>
</div>
{% endblock %}