This commit is contained in:
Jean-Marie Place 2023-11-20 13:49:01 +01:00
parent f99be92fad
commit 8b332120bf
3 changed files with 28 additions and 21 deletions

View File

@ -8,8 +8,9 @@
""" """
import datetime import datetime
from flask import render_template from flask import render_template, url_for
import app
from app.models import FormSemestre, FormSemestreInscription from app.models import FormSemestre, FormSemestreInscription
from app.views import ScoData from app.views import ScoData
@ -18,6 +19,7 @@ def feuille_preparation_jury_but(formsemestre_id: int):
formsemestre: FormSemestre = FormSemestre.query.filter_by( formsemestre: FormSemestre = FormSemestre.query.filter_by(
id=formsemestre_id id=formsemestre_id
).first_or_404() ).first_or_404()
breakpoint()
return render_template( return render_template(
"but/jury_export.j2", "but/jury_export.j2",
datetime=datetime, datetime=datetime,

View File

View File

@ -7,34 +7,39 @@
{% block app_content %} {% block app_content %}
<releve-but>{{ formsemestre.id }}</releve-but> <H1>Export xlsx de fichier de jury</H1>
<form onsubmit="do_export()">
Formsemestre: {{ formsemestre.id }}
API root: {{ api_root }}
<button>Exporter</button>
</form>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
{{super()}} {{super()}}
{# <script src="{{scu.STATIC_DIR}}/js/releve-but.js"></script>#} <script src="{{scu.STATIC_DIR}}/js/export-jury-but.js"></script>
<script> <script>
//let dataSrc = "{{bul_url|safe}}"; let dataSrc = "{{bul_url|safe}}";
//fetch(dataSrc) fetch(dataSrc)
// .then(r => { return r.json() }) .then(r => { return r.json() })
// .then(json => { .then(json => {
// let releve = document.querySelector("releve-but"); let releve = document.querySelector("releve-but");
// releve.showData = json; releve.showData = json;
// // Syle custom à ajouter // Syle custom à ajouter
// let style = document.createElement("style"); let style = document.createElement("style");
// style.textContent = ` style.textContent = `
// .module>div, .module>div,
// .dateInscription, .dateInscription,
// .numerosEtudiant, .numerosEtudiant,
// .dateNaissance{ .dateNaissance{
// display: none; display: none;
// }`; }`;
// releve.shadowRoot.appendChild(style); releve.shadowRoot.appendChild(style);
// }); });
// .catch(error => { // .catch(error => {
// let div = document.createElement("div"); // let div = document.createElement("div");
// div.innerText = "Une erreur s'est produite lors du transfert des données."; // div.innerText = "Une erreur s'est produite lors du transfert des données.";