forked from ScoDoc/ScoDoc
Assiduites : modification automatique du moduleimpl_id
This commit is contained in:
parent
5c6f0b3d6b
commit
35646a934b
@ -1758,7 +1758,7 @@ function getCurrentAssiduite(etudid) {
|
||||
const assiduite_id = parseInt(field.getAttribute("assiduite_id"));
|
||||
const type = field.getAttribute("type");
|
||||
|
||||
if (type == "edition") {
|
||||
if (type == "édition") {
|
||||
let assi = null;
|
||||
assiduites[etudid].forEach((a) => {
|
||||
if (a.assiduite_id === assiduite_id) {
|
||||
|
@ -98,7 +98,26 @@
|
||||
}
|
||||
|
||||
function updateSelectedSelect(moduleimpl_id) {
|
||||
document.getElementById('moduleimpl_select').value = moduleimpl_id;
|
||||
const mod_id = moduleimpl_id != null ? moduleimpl_id : ""
|
||||
document.getElementById('moduleimpl_select').value = mod_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
window.onload = () => {
|
||||
document.getElementById('moduleimpl_select').addEventListener('change', () => {
|
||||
const mod_id = document.getElementById('moduleimpl_select').value;
|
||||
|
||||
const assi = getCurrentAssiduite(etudid);
|
||||
if (assi) {
|
||||
editAssiduite(assi.assiduite_id, assi.etat);
|
||||
}
|
||||
})
|
||||
|
||||
const conflicts = getAssiduitesConflict(etudid);
|
||||
if (conflicts.length > 0) {
|
||||
updateSelectedSelect(conflicts[0].moduleimpl_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user