1
0
forked from ScoDoc/ScoDoc

export contacts

This commit is contained in:
Arthur ZHU 2022-02-03 11:49:16 +01:00
parent 2cc5e1f164
commit ead81f7615
2 changed files with 13 additions and 3 deletions

View File

@ -787,7 +787,12 @@ def export_contacts():
""" """
Permet d'exporter la liste des contacts sous format excel (.xlsx) Permet d'exporter la liste des contacts sous format excel (.xlsx)
""" """
contacts = EntrepriseContact.query.all() contacts = (
db.session.query(EntrepriseContact)
.join(Entreprise, EntrepriseContact.entreprise_id == Entreprise.id)
.filter_by(visible=True)
.all()
)
if contacts: if contacts:
keys = ["nom", "prenom", "telephone", "mail", "poste", "service"] keys = ["nom", "prenom", "telephone", "mail", "poste", "service"]
titles = keys[:] titles = keys[:]
@ -806,7 +811,12 @@ def export_contacts_bis():
""" """
Permet d'exporter la liste des contacts avec leur entreprise sous format excel (.xlsx) Permet d'exporter la liste des contacts avec leur entreprise sous format excel (.xlsx)
""" """
contacts = EntrepriseContact.query.all() contacts = (
db.session.query(EntrepriseContact)
.join(Entreprise, EntrepriseContact.entreprise_id == Entreprise.id)
.filter_by(visible=True)
.all()
)
if contacts: if contacts:
keys = [ keys = [
"nom", "nom",

View File

@ -3,7 +3,7 @@
{% block app_content %} {% block app_content %}
<div class="container"> <div class="container">
<h1>Offres expirées de {{ entreprise.nom }}</h1> <h1>Offres expirées - {{ entreprise.nom }}</h1>
{% if offres_expirees %} {% if offres_expirees %}
{% for offre in offres_expirees%} {% for offre in offres_expirees%}
{% include 'entreprises/_offre.html' %} {% include 'entreprises/_offre.html' %}