forked from ScoDoc/ScoDoc
wip
This commit is contained in:
parent
f99be92fad
commit
8b332120bf
@ -8,8 +8,9 @@
|
||||
"""
|
||||
import datetime
|
||||
|
||||
from flask import render_template
|
||||
from flask import render_template, url_for
|
||||
|
||||
import app
|
||||
from app.models import FormSemestre, FormSemestreInscription
|
||||
from app.views import ScoData
|
||||
|
||||
@ -18,6 +19,7 @@ def feuille_preparation_jury_but(formsemestre_id: int):
|
||||
formsemestre: FormSemestre = FormSemestre.query.filter_by(
|
||||
id=formsemestre_id
|
||||
).first_or_404()
|
||||
breakpoint()
|
||||
return render_template(
|
||||
"but/jury_export.j2",
|
||||
datetime=datetime,
|
||||
|
0
app/static/js/export-jury-but.js
Normal file
0
app/static/js/export-jury-but.js
Normal file
@ -7,34 +7,39 @@
|
||||
|
||||
{% 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 %}
|
||||
|
||||
{% block scripts %}
|
||||
{{super()}}
|
||||
|
||||
{# <script src="{{scu.STATIC_DIR}}/js/releve-but.js"></script>#}
|
||||
<script src="{{scu.STATIC_DIR}}/js/export-jury-but.js"></script>
|
||||
|
||||
<script>
|
||||
//let dataSrc = "{{bul_url|safe}}";
|
||||
//fetch(dataSrc)
|
||||
// .then(r => { return r.json() })
|
||||
// .then(json => {
|
||||
// let releve = document.querySelector("releve-but");
|
||||
// releve.showData = json;
|
||||
// // Syle custom à ajouter
|
||||
// let style = document.createElement("style");
|
||||
// style.textContent = `
|
||||
// .module>div,
|
||||
// .dateInscription,
|
||||
// .numerosEtudiant,
|
||||
// .dateNaissance{
|
||||
// display: none;
|
||||
// }`;
|
||||
// releve.shadowRoot.appendChild(style);
|
||||
// });
|
||||
let dataSrc = "{{bul_url|safe}}";
|
||||
fetch(dataSrc)
|
||||
.then(r => { return r.json() })
|
||||
.then(json => {
|
||||
let releve = document.querySelector("releve-but");
|
||||
releve.showData = json;
|
||||
// Syle custom à ajouter
|
||||
let style = document.createElement("style");
|
||||
style.textContent = `
|
||||
.module>div,
|
||||
.dateInscription,
|
||||
.numerosEtudiant,
|
||||
.dateNaissance{
|
||||
display: none;
|
||||
}`;
|
||||
releve.shadowRoot.appendChild(style);
|
||||
});
|
||||
// .catch(error => {
|
||||
// let div = document.createElement("div");
|
||||
// div.innerText = "Une erreur s'est produite lors du transfert des données.";
|
||||
|
Loading…
Reference in New Issue
Block a user