forked from ScoDoc/ScoDoc
wip
This commit is contained in:
parent
f99be92fad
commit
8b332120bf
@ -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,
|
||||||
|
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 %}
|
{% 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.";
|
||||||
|
Loading…
Reference in New Issue
Block a user