Assiduites : bugfix justificatif create

This commit is contained in:
iziram 2023-07-31 16:15:59 +02:00
parent f540f78cd5
commit f683e6a041
2 changed files with 7 additions and 6 deletions

View File

@ -208,7 +208,8 @@ def justif_create(etudid: int = None, nip=None, ine=None):
success.append({"indice": i, "message": obj}) success.append({"indice": i, "message": obj})
justifs.append(justi) justifs.append(justi)
scass.simple_invalidate_cache(data, etud.id) scass.simple_invalidate_cache(data, etud.id)
compute_assiduites_justified(etudid, justifs, True)
compute_assiduites_justified(etud.etudid, justifs, True)
return {"errors": errors, "success": success} return {"errors": errors, "success": success}
@ -252,8 +253,6 @@ def _create_singular(
if external_data is not None: if external_data is not None:
if not isinstance(external_data, dict): if not isinstance(external_data, dict):
errors.append("param 'external_data' : n'est pas un objet JSON") errors.append("param 'external_data' : n'est pas un objet JSON")
else:
assiduite_unique.external_data = external_data
if errors: if errors:
err: str = ", ".join(errors) err: str = ", ".join(errors)

View File

@ -310,9 +310,11 @@
assiEdit.querySelector('#justi_etat').value = data.etat.toLowerCase(); assiEdit.querySelector('#justi_etat').value = data.etat.toLowerCase();
assiEdit.querySelector('#justi_raison').value = desc; assiEdit.querySelector('#justi_raison').value = desc;
const d_deb = moment.tz(data.date_debut, TIMEZONE).format("YYYY-MM-DDTHH:mm")
assiEdit.querySelector('#justi_date_debut').value = moment.tz(data.date_debut, TIMEZONE).format("YYYY-MM-DDTHH:MM") const d_fin = moment.tz(data.date_fin, TIMEZONE).format("YYYY-MM-DDTHH:mm")
assiEdit.querySelector('#justi_date_fin').value = moment.tz(data.date_fin, TIMEZONE).format("YYYY-MM-DDTHH:MM") console.warn(d_deb, d_fin, data.date_debut, data.date_fin)
assiEdit.querySelector('#justi_date_debut').value = d_deb
assiEdit.querySelector('#justi_date_fin').value = d_fin
const fichContent = assiEdit.querySelector('.justi-sect'); const fichContent = assiEdit.querySelector('.justi-sect');