forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -110,11 +110,12 @@ function validateSelectors(btn) {
|
||||
|
||||
getAssiduitesFromEtuds(true);
|
||||
|
||||
document.querySelector(".selectors").disabled = true;
|
||||
$("#tl_date").datepicker("option", "disabled", true);
|
||||
// document.querySelector(".selectors").disabled = true;
|
||||
// $("#tl_date").datepicker("option", "disabled", true);
|
||||
generateMassAssiduites();
|
||||
generateAllEtudRow();
|
||||
btn.remove();
|
||||
// btn.remove();
|
||||
btn.textContent = "Actualiser";
|
||||
onlyAbs();
|
||||
};
|
||||
|
||||
@ -533,6 +534,7 @@ function massAction() {
|
||||
* puis on ajoute les événements associés
|
||||
*/
|
||||
function generateMassAssiduites() {
|
||||
if (readOnly || document.querySelector(".mass-selection") != null) return;
|
||||
const content = document.getElementById("content");
|
||||
|
||||
const mass = document.createElement("div");
|
||||
@ -1411,7 +1413,8 @@ function generateEtudRow(
|
||||
assi += `<input type="checkbox" value="${abs}" name="btn_assiduites_${index}" id="rbtn_${abs}" class="rbtn ${abs}" title="${abs}">`;
|
||||
}
|
||||
});
|
||||
const conflit = assiduite.type == "conflit" ? "conflit" : "";
|
||||
if (readOnly) assi = "";
|
||||
const conflit = assiduite.type == "conflit" && !readOnly ? "conflit" : "";
|
||||
const pdp_url = `${getUrl()}/api/etudiant/etudid/${etud.id}/photo?size=small`;
|
||||
|
||||
let defdem = "";
|
||||
@ -1543,11 +1546,11 @@ function generateAllEtudRow() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!document.querySelector(".selectors")?.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
document.querySelector(".etud_holder").innerHTML = "";
|
||||
// if (!document.querySelector(".selectors")?.disabled) {
|
||||
// return;
|
||||
// }
|
||||
const etud_hodler = document.querySelector(".etud_holder");
|
||||
if (etud_hodler) etud_hodler.innerHTML = "";
|
||||
etuds_ids = Object.keys(etuds).sort((a, b) =>
|
||||
etuds[a].nom > etuds[b].nom ? 1 : etuds[b].nom > etuds[a].nom ? -1 : 0
|
||||
);
|
||||
|
@ -102,6 +102,9 @@
|
||||
|
||||
|
||||
setupTimeLine(() => {
|
||||
if(document.querySelector('.etud_holder .placeholder') != null){
|
||||
generateAllEtudRow();
|
||||
}
|
||||
updateJustifyBtn();
|
||||
});
|
||||
|
||||
|
@ -26,11 +26,9 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{% if readonly == "false" %}
|
||||
{{timeline|safe}}
|
||||
|
||||
|
||||
|
||||
{% if readonly == "false" %}
|
||||
<div style="margin: 1vh 0;">
|
||||
<div id="forcemodule" style="display: none; margin:10px 0px;">
|
||||
Vous devez spécifier le module ! (voir réglage préférence du semestre)
|
||||
@ -40,7 +38,6 @@
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if readonly == "true" %}
|
||||
<button id="validate_selectors" onclick="validateSelectors(this)">
|
||||
Voir l'assiduité
|
||||
@ -50,11 +47,11 @@
|
||||
Faire la saisie
|
||||
</button>
|
||||
{% endif %}
|
||||
<p>Utilisez le bouton "Actualiser" si vous modifier la date ou le(s) groupe(s) sélectionné(s)</p>
|
||||
|
||||
|
||||
<div class="etud_holder">
|
||||
<p class="placeholder">
|
||||
Veillez à choisir le groupe concerné et la date.
|
||||
Après validation, il faudra recharger la page pour changer ces informations.
|
||||
</p>
|
||||
</div>
|
||||
<div class="legende">
|
||||
@ -84,6 +81,13 @@
|
||||
|
||||
<script>
|
||||
|
||||
{% if readonly != "false" %}
|
||||
function getPeriodValues(){
|
||||
return [0, 23]
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
||||
const nonWorkDays = [{{ nonworkdays| safe }}];
|
||||
|
||||
const readOnly = {{ readonly }};
|
||||
@ -91,7 +95,13 @@
|
||||
|
||||
setupDate();
|
||||
updateDate();
|
||||
setupTimeLine();
|
||||
if (!readOnly){
|
||||
setupTimeLine(()=>{
|
||||
if(document.querySelector('.etud_holder .placeholder') != null){
|
||||
generateAllEtudRow();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.forceModule = "{{ forcer_module }}"
|
||||
window.forceModule = window.forceModule == "True" ? true : false
|
||||
|
@ -39,6 +39,7 @@
|
||||
}
|
||||
|
||||
array.forEach((assiduité) => {
|
||||
if(assiduité.etat == "CRENEAU" && readOnly) return;
|
||||
let startDate = new Date(Date.removeUTC(assiduité.date_debut));
|
||||
let endDate = new Date(Date.removeUTC(assiduité.date_fin));
|
||||
if (startDate.isBefore(dayStart)) {
|
||||
@ -284,7 +285,7 @@
|
||||
text-align: start;
|
||||
top: -40px;
|
||||
transform: translateX(-50%);
|
||||
z-index: 50;
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
|
||||
|
@ -119,8 +119,6 @@
|
||||
};
|
||||
const mouseUp = () => {
|
||||
snapHandlesToQuarters();
|
||||
generateAllEtudRow();
|
||||
|
||||
timelineContainer.removeEventListener("mousemove", onMouseMove);
|
||||
handleMoving = false;
|
||||
func_call();
|
||||
@ -264,6 +262,7 @@
|
||||
}
|
||||
|
||||
createTicks();
|
||||
|
||||
setPeriodValues(t_start, t_start + period_default);
|
||||
|
||||
{% if heures %}
|
||||
@ -271,6 +270,7 @@
|
||||
if (heure_deb != '' && heure_fin != '') {
|
||||
heure_deb = fromTime(heure_deb);
|
||||
heure_fin = fromTime(heure_fin);
|
||||
console.warn(heure_deb, heure_fin)
|
||||
setPeriodValues(heure_deb, heure_fin)
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -1102,7 +1102,7 @@ def signal_assiduites_group():
|
||||
).build()
|
||||
|
||||
|
||||
@bp.route("/VisuAssiduiteGr")
|
||||
@bp.route("/visu_assiduites_group")
|
||||
@scodoc
|
||||
@permission_required(Permission.ScoView)
|
||||
def visu_assiduites_group():
|
||||
|
Loading…
Reference in New Issue
Block a user