forked from ScoDoc/ScoDoc
Merge branch 'main96' of https://scodoc.org/git/iziram/ScoDoc
This commit is contained in:
commit
4656d9547e
@ -457,7 +457,7 @@ def justif_edit(justif_id: int):
|
|||||||
"après": compute_assiduites_justified(
|
"après": compute_assiduites_justified(
|
||||||
justificatif_unique.etudid,
|
justificatif_unique.etudid,
|
||||||
[justificatif_unique],
|
[justificatif_unique],
|
||||||
False,
|
True,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -362,9 +362,17 @@ def compute_assiduites_justified(
|
|||||||
for assi in assiduites:
|
for assi in assiduites:
|
||||||
if assi.etat == EtatAssiduite.PRESENT:
|
if assi.etat == EtatAssiduite.PRESENT:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
assi_justificatifs = Justificatif.query.filter(
|
||||||
|
Justificatif.etudid == assi.etudid,
|
||||||
|
Justificatif.date_debut <= assi.date_debut,
|
||||||
|
Justificatif.date_fin >= assi.date_fin,
|
||||||
|
Justificatif.etat == EtatJustificatif.VALIDE,
|
||||||
|
).all()
|
||||||
|
|
||||||
if any(
|
if any(
|
||||||
assi.date_debut >= j.date_debut and assi.date_fin <= j.date_fin
|
assi.date_debut >= j.date_debut and assi.date_fin <= j.date_fin
|
||||||
for j in justificatifs
|
for j in justificatifs + assi_justificatifs
|
||||||
):
|
):
|
||||||
assi.est_just = True
|
assi.est_just = True
|
||||||
assiduites_justifiees.append(assi.assiduite_id)
|
assiduites_justifiees.append(assi.assiduite_id)
|
||||||
|
@ -502,13 +502,10 @@ def retreive_formsemestre_from_request() -> int:
|
|||||||
group = sco_groups.get_group(args["group_id"])
|
group = sco_groups.get_group(args["group_id"])
|
||||||
formsemestre_id = group["formsemestre_id"]
|
formsemestre_id = group["formsemestre_id"]
|
||||||
elif group_ids:
|
elif group_ids:
|
||||||
if group_ids:
|
if isinstance(group_ids, str):
|
||||||
if isinstance(group_ids, str):
|
group_ids = group_ids.split(",")
|
||||||
group_id = group_ids
|
group_id = group_ids[0]
|
||||||
else:
|
group = sco_groups.get_group(group_id)
|
||||||
# prend le semestre du 1er groupe de la liste:
|
|
||||||
group_id = group_ids[0]
|
|
||||||
group = sco_groups.get_group(group_id)
|
|
||||||
formsemestre_id = group["formsemestre_id"]
|
formsemestre_id = group["formsemestre_id"]
|
||||||
elif "partition_id" in args:
|
elif "partition_id" in args:
|
||||||
partition = sco_groups.get_partition(args["partition_id"])
|
partition = sco_groups.get_partition(args["partition_id"])
|
||||||
|
@ -138,8 +138,8 @@
|
|||||||
const raison = field.querySelector('#justi_raison').value;
|
const raison = field.querySelector('#justi_raison').value;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
date_debut: deb,
|
date_debut: moment.tz(deb, TIMEZONE).format(),
|
||||||
date_fin: fin,
|
date_fin: moment.tz(fin, TIMEZONE).format(),
|
||||||
etat: etat,
|
etat: etat,
|
||||||
raison: raison,
|
raison: raison,
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
function getDeptJustificatifsFromPeriod(action) {
|
function getDeptJustificatifsFromPeriod(action) {
|
||||||
const formsemestre = formsemestre_id ? `&formsemestre_id=${formsemestre_id}` : ""
|
const formsemestre = formsemestre_id ? `&formsemestre_id=${formsemestre_id}` : ""
|
||||||
const group = group_id ? `&group_id=${group_id}` : ""
|
const group = group_id ? `&group_id=${group_id}` : ""
|
||||||
const path = getUrl() + `/api/justificatifs/dept/${dept_id}/query?date_debut=${bornes.deb}&date_fin=${bornes.fin}&etat=attente,modifie${formsemestre}${group}`
|
const path = getUrl() + `/api/justificatifs/dept/${dept_id}/query?date_debut=${bornes.deb}&date_fin=${bornes.fin}${formsemestre}${group}`
|
||||||
async_get(
|
async_get(
|
||||||
path,
|
path,
|
||||||
(data, status) => {
|
(data, status) => {
|
||||||
|
@ -27,9 +27,17 @@
|
|||||||
<section class="nonvalide">
|
<section class="nonvalide">
|
||||||
<!-- Tableaux des assiduités (retard/abs) non justifiées -->
|
<!-- Tableaux des assiduités (retard/abs) non justifiées -->
|
||||||
<h4>Absences et retards non justifiés</h4>
|
<h4>Absences et retards non justifiés</h4>
|
||||||
|
<span class="iconline">
|
||||||
|
<a class="icon filter" onclick="filterAssi()"></a>
|
||||||
|
<a class="icon download" onclick="downloadAssi()"></a>
|
||||||
|
</span>
|
||||||
{% include "assiduites/widgets/tableau_assi.j2" %}
|
{% include "assiduites/widgets/tableau_assi.j2" %}
|
||||||
<!-- Tableaux des justificatifs à valider (attente / modifié ) -->
|
<!-- Tableaux des justificatifs à valider (attente / modifié ) -->
|
||||||
<h4>Justificatifs en attente (ou modifiés)</h4>
|
<h4>Justificatifs en attente (ou modifiés)</h4>
|
||||||
|
<span class="iconline">
|
||||||
|
<a class="icon filter" onclick="filterJusti()"></a>
|
||||||
|
<a class="icon download" onclick="downloadJusti()"></a>
|
||||||
|
</span>
|
||||||
{% include "assiduites/widgets/tableau_justi.j2" %}
|
{% include "assiduites/widgets/tableau_justi.j2" %}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -835,7 +835,6 @@ def visu_assiduites_group():
|
|||||||
+ [
|
+ [
|
||||||
# Voir fonctionnement JS
|
# Voir fonctionnement JS
|
||||||
"js/etud_info.js",
|
"js/etud_info.js",
|
||||||
"js/abs_ajax.js",
|
|
||||||
"js/groups_view.js",
|
"js/groups_view.js",
|
||||||
"js/assiduites.js",
|
"js/assiduites.js",
|
||||||
"libjs/moment.new.min.js",
|
"libjs/moment.new.min.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user