diff --git a/app/static/js/assiduites.js b/app/static/js/assiduites.js index a58592cc..fe9ee9d4 100644 --- a/app/static/js/assiduites.js +++ b/app/static/js/assiduites.js @@ -201,7 +201,8 @@ async function async_get(path, success, errors) { throw new Error("Network response was not ok."); } } catch (error) { - errors(error); + console.error(error); + if (errors) errors(error); } } @@ -249,7 +250,8 @@ async function async_post(path, data, success, errors) { throw new Error("Network response was not ok."); } } catch (error) { - errors(error); + console.error(error); + if (errors) errors(error); } } @@ -1162,7 +1164,7 @@ function getAllAssiduitesFromEtud( .replace("°", courant ? "&courant" : "") : "" }`; - + //TODO Utiliser async_get au lieu de jquery $.ajax({ async: true, type: "GET", @@ -1744,6 +1746,8 @@ function getAllJustificatifsFromEtud( `/api/justificatifs/${etudid}${ order ? "/query?order°".replace("°", courant ? "&courant" : "") : "" }`; + + //TODO Utiliser async_get au lieu de jquery $.ajax({ async: true, type: "GET", diff --git a/app/templates/assiduites/pages/bilan_etud.j2 b/app/templates/assiduites/pages/bilan_etud.j2 index a1c3d0df..77712bb1 100644 --- a/app/templates/assiduites/pages/bilan_etud.j2 +++ b/app/templates/assiduites/pages/bilan_etud.j2 @@ -107,6 +107,7 @@ function getAssiduitesCount(dateDeb, dateFin, query) { const url_api = getUrl() + `/api/assiduites/${etudid}/count/query?date_debut=${dateDeb}&date_fin=${dateFin}&${query}`; + //Utiliser async_get au lieu de Jquery return $.ajax({ async: true, type: "GET", @@ -120,6 +121,7 @@ } function countAssiduites(dateDeb, dateFin) { + //TODO Utiliser Fetch when plutot que jquery $.when( getAssiduitesCount(dateDeb, dateFin, `etat=present`), getAssiduitesCount(dateDeb, dateFin, `etat=retard`), diff --git a/app/templates/assiduites/pages/calendrier.j2 b/app/templates/assiduites/pages/calendrier.j2 index a6b270d9..3b94e1be 100644 --- a/app/templates/assiduites/pages/calendrier.j2 +++ b/app/templates/assiduites/pages/calendrier.j2 @@ -4,13 +4,23 @@
{{minitimeline | safe }}

Assiduité de {{sco.etud.nomprenom}}

+ +
+ + + +
+
- Année scolaire 2022-2023 Changer année: + Année scolaire 2022-2023Changer + année: + + Assiduité de {{sco.etud.nomprenom}}
@@ -34,7 +44,37 @@
+ +