2021-12-29 14:41:33 +01:00
|
|
|
{# -*- mode: jinja-html -*- #}
|
2021-12-23 19:28:25 +01:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
2022-03-28 23:44:57 +02:00
|
|
|
{% block styles %}
|
|
|
|
{{super()}}
|
|
|
|
<script src="/ScoDoc/static/jQuery/jquery-1.12.4.min.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/ScoDoc/static/DataTables/datatables.min.css">
|
|
|
|
<script type="text/javascript" charset="utf8" src="/ScoDoc/static/DataTables/datatables.min.js"></script>
|
|
|
|
{% endblock %}
|
|
|
|
|
2021-12-23 19:28:25 +01:00
|
|
|
{% block app_content %}
|
2022-01-31 18:22:54 +01:00
|
|
|
{% if logs %}
|
|
|
|
<div class="container">
|
2022-02-02 19:13:50 +01:00
|
|
|
<h3>Dernières opérations sur cette fiche <a href="{{ url_for('entreprises.logs_entreprise', id=entreprise.id) }}">Voir tout</a></h3>
|
2022-01-31 18:22:54 +01:00
|
|
|
<ul>
|
|
|
|
{% for log in logs %}
|
|
|
|
<li>
|
|
|
|
<span style="margin-right: 10px;">{{ log.date.strftime('%d %b %Hh%M') }}</span>
|
2022-02-10 21:17:22 +01:00
|
|
|
<span>{{ log.text|safe }} par {{ log.authenticated_user|get_nomcomplet_by_username }}</span>
|
2022-01-31 18:22:54 +01:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2021-12-29 14:41:33 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-01-31 18:22:54 +01:00
|
|
|
|
2022-01-31 20:09:49 +01:00
|
|
|
<div class="container fiche-entreprise">
|
2022-01-31 18:22:54 +01:00
|
|
|
<h2>Fiche entreprise - {{ entreprise.nom }} ({{ entreprise.siret }})</h2>
|
|
|
|
|
2022-01-31 20:09:49 +01:00
|
|
|
<div class="entreprise">
|
2022-02-01 18:35:48 +01:00
|
|
|
<div>
|
2022-01-31 18:22:54 +01:00
|
|
|
SIRET : {{ entreprise.siret }}<br>
|
|
|
|
Nom : {{ entreprise.nom }}<br>
|
|
|
|
Adresse : {{ entreprise.adresse }}<br>
|
|
|
|
Code postal : {{ entreprise.codepostal }}<br>
|
|
|
|
Ville : {{ entreprise.ville }}<br>
|
|
|
|
Pays : {{ entreprise.pays }}
|
2022-02-01 18:35:48 +01:00
|
|
|
</div>
|
2022-05-04 18:59:29 +02:00
|
|
|
|
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
|
|
<div>
|
|
|
|
Taxe d'apprentissage<br>
|
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_taxe_apprentissage', id=entreprise.id) }}">Ajouter taxe apprentissage</a>
|
|
|
|
<div class="taxe-apprentissage">
|
|
|
|
<ul>
|
|
|
|
{% if not taxes|check_taxe_now %}
|
|
|
|
<li>année actuelle : non versé</li>
|
|
|
|
{% endif %}
|
|
|
|
{% for taxe in taxes %}
|
|
|
|
<li>{{ taxe.annee }} : {{ taxe.montant }} euros</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-01-31 18:22:54 +01:00
|
|
|
</div>
|
2021-12-29 14:41:33 +01:00
|
|
|
|
2022-02-01 18:35:48 +01:00
|
|
|
<div>
|
2022-04-25 20:49:21 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
2022-02-01 18:35:48 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.edit_entreprise', id=entreprise.id) }}">Modifier</a>
|
2022-05-02 14:36:39 +02:00
|
|
|
{% if entreprise.active %}
|
2022-04-25 20:49:21 +02:00
|
|
|
<a class="btn btn-danger" href="{{ url_for('entreprises.fiche_entreprise_desactiver', id=entreprise.id) }}">Désactiver</a>
|
2022-05-02 14:36:39 +02:00
|
|
|
{% else %}
|
|
|
|
<a class="btn btn-success" href="{{ url_for('entreprises.fiche_entreprise_activer', id=entreprise.id) }}">Activer</a>
|
|
|
|
{% endif %}
|
2022-04-25 20:49:21 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_site', id=entreprise.id) }}">Ajouter site</a>
|
2022-02-01 18:35:48 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_offre', id=entreprise.id) }}">Ajouter offre</a>
|
|
|
|
{% endif %}
|
2022-04-05 23:01:38 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.contacts', id=entreprise.id) }}">Liste contacts</a>
|
2022-02-01 18:35:48 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.offres_expirees', id=entreprise.id) }}">Voir les offres expirées</a>
|
2022-04-25 20:49:21 +02:00
|
|
|
</div>
|
2022-02-01 18:35:48 +01:00
|
|
|
|
|
|
|
|
2022-04-25 20:49:21 +02:00
|
|
|
<div class="sites-et-offres">
|
|
|
|
{% if sites %}
|
2022-01-31 20:09:49 +01:00
|
|
|
<div>
|
2022-04-25 20:49:21 +02:00
|
|
|
<h3>Sites</h3>
|
|
|
|
{% for site in sites %}
|
|
|
|
<div class="site">
|
|
|
|
Nom : {{ site.nom }}<br>
|
|
|
|
Adresse : {{ site.adresse }}<br>
|
|
|
|
Code postal : {{ site.codepostal }}<br>
|
|
|
|
Ville : {{ site.ville }}<br>
|
|
|
|
Pays : {{ site.pays }}
|
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
2022-04-28 23:04:31 +02:00
|
|
|
<div>
|
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.edit_site', id_entreprise=entreprise.id, id_site=site.id) }}">Modifier</a>
|
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_correspondant', id_entreprise=entreprise.id, id_site=site.id) }}">Ajouter correspondant</a>
|
|
|
|
</div>
|
2022-04-25 20:49:21 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesCorrespondants, None) %}
|
|
|
|
{% for correspondant in site.correspondants %}
|
|
|
|
{% include 'entreprises/_correspondant.html' %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-01-31 20:09:49 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-01-31 18:22:54 +01:00
|
|
|
|
2022-01-31 20:09:49 +01:00
|
|
|
{% if offres %}
|
|
|
|
<div>
|
2022-02-01 18:35:48 +01:00
|
|
|
<h3>Offres - <a href="{{ url_for('entreprises.offres_expirees', id=entreprise.id) }}">Voir les offres expirées</a></h3>
|
2022-01-31 20:09:49 +01:00
|
|
|
{% for offre in offres %}
|
2022-04-25 20:49:21 +02:00
|
|
|
{% include 'entreprises/_offre.html' %}
|
2022-01-31 20:09:49 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-01-31 18:22:54 +01:00
|
|
|
</div>
|
2021-12-29 14:41:33 +01:00
|
|
|
</div>
|
2022-03-28 23:44:57 +02:00
|
|
|
|
|
|
|
<div style="margin-bottom: 10px;">
|
2022-04-21 21:18:47 +02:00
|
|
|
<h3>Liste des stages et apprentissages réalisés au sein de l'entreprise</h3>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
2022-04-21 21:18:47 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url_for('entreprises.add_stage_apprentissage', id=entreprise.id) }}" style="margin-bottom:10px;">Ajouter stage ou apprentissage</a>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% endif %}
|
|
|
|
<table id="table-stages-apprentissages">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-04-21 21:18:47 +02:00
|
|
|
<td data-priority="3">Date début</td>
|
|
|
|
<td data-priority="4">Date fin</td>
|
|
|
|
<td data-priority="5">Durée</td>
|
|
|
|
<td data-priority="2">Type</td>
|
|
|
|
<td data-priority="1">Étudiant</td>
|
|
|
|
<td data-priority="6">Formation</td>
|
|
|
|
<td data-priority="7">Notes</td>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
|
|
<td data-priority="3">Action</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for data in stages_apprentissages %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ data[0].date_debut.strftime('%d/%m/%Y') }}</td>
|
|
|
|
<td>{{ data[0].date_fin.strftime('%d/%m/%Y') }}</td>
|
2022-04-12 00:21:25 +02:00
|
|
|
<td>{{ (data[0].date_fin-data[0].date_debut).days//7 }} semaines</td>
|
2022-03-28 23:44:57 +02:00
|
|
|
<td>{{ data[0].type_offre }}</td>
|
|
|
|
<td>{{ data[1].nom|format_nom }} {{ data[1].prenom|format_prenom }}</td>
|
|
|
|
<td>{% if data[0].formation_text %}{{ data[0].formation_text }}{% endif %}</td>
|
2022-03-29 19:07:59 +02:00
|
|
|
<td>{{ data[0].notes }}</td>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
|
|
<td>
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">Action
|
|
|
|
<span class="caret"></span>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu pull-left">
|
2022-03-29 19:07:59 +02:00
|
|
|
<li><a href="{{ url_for('entreprises.edit_stage_apprentissage', id=data[0].id) }}">Modifier</a></li>
|
|
|
|
<li><a href="{{ url_for('entreprises.delete_stage_apprentissage', id=data[0].id) }}" style="color:red">Supprimer</a></li>
|
2022-03-28 23:44:57 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
2022-04-12 00:21:25 +02:00
|
|
|
<td>Date début</td>
|
|
|
|
<td>Date fin</td>
|
|
|
|
<td>Durée</td>
|
|
|
|
<td>Type</td>
|
|
|
|
<td>Étudiant</td>
|
|
|
|
<td>Formation</td>
|
|
|
|
<td>Notes</td>
|
2022-03-28 23:44:57 +02:00
|
|
|
{% if current_user.has_permission(current_user.Permission.RelationsEntreprisesChange, None) %}
|
|
|
|
<td>Action</td>
|
|
|
|
{% endif %}
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
let table = new DataTable('#table-stages-apprentissages',
|
|
|
|
{
|
|
|
|
"autoWidth": false,
|
|
|
|
"responsive": {
|
|
|
|
"details": true
|
|
|
|
},
|
|
|
|
"pageLength": 10,
|
|
|
|
"language": {
|
|
|
|
"emptyTable": "Aucune donnée disponible dans le tableau",
|
|
|
|
"info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées",
|
|
|
|
"infoEmpty": "Affichage de 0 à 0 sur 0 entrées",
|
|
|
|
"infoFiltered": "(filtrées depuis un total de _MAX_ entrées)",
|
|
|
|
"lengthMenu": "Afficher _MENU_ entrées",
|
|
|
|
"loadingRecords": "Chargement...",
|
|
|
|
"processing": "Traitement...",
|
|
|
|
"search": "Rechercher:",
|
|
|
|
"zeroRecords": "Aucune entrée correspondante trouvée",
|
|
|
|
"paginate": {
|
|
|
|
"next": "Suivante",
|
|
|
|
"previous": "Précédente"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2021-12-23 19:28:25 +01:00
|
|
|
{% endblock %}
|