Voeg 28 herkenbare kleurplaten en creatieve niveaus toe (v0.4.66-beta) #4
3 changed files with 16 additions and 7 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.4.04-beta
|
0.4.05-beta
|
||||||
|
|
|
||||||
|
|
@ -1359,21 +1359,30 @@
|
||||||
const loose = USERS.filter(u=>["teacher","admin","pupil"].includes(u.role) && u.schoolId==null);
|
const loose = USERS.filter(u=>["teacher","admin","pupil"].includes(u.role) && u.schoolId==null);
|
||||||
if(loose.length) group("gnoschool", T("amNoSchoolGroup"), loose);
|
if(loose.length) group("gnoschool", T("amNoSchoolGroup"), loose);
|
||||||
}else{
|
}else{
|
||||||
/* één school gekozen: groepeer op rol, leerlingen per klas */
|
/* één school gekozen: groepeer op rol, leerlingen per klas - elke groep
|
||||||
|
krijgt direct een "snel toevoegen"-formulier eronder (net als bij
|
||||||
|
systeemmanagers), zodat een nieuwe schoolbeheerder/leerkracht/
|
||||||
|
leerling niet via een ander tabblad hoeft. Een groep zonder leden
|
||||||
|
blijft zichtbaar zolang er wél iets aan toegevoegd kan worden -
|
||||||
|
anders is een lege klas nergens te vinden om iemand aan toe te voegen. */
|
||||||
[["admin", T("roleAdmin")], ["teacher", T("roleTeacher")]].forEach(([role, label])=>{
|
[["admin", T("roleAdmin")], ["teacher", T("roleTeacher")]].forEach(([role, label])=>{
|
||||||
const us = USERS.filter(u=>u.role===role);
|
const us = USERS.filter(u=>u.role===role);
|
||||||
if(us.length) group("role:"+role, label, us, true);
|
if(us.length || creatableRoles().includes(role)) group("role:"+role, label, us, true);
|
||||||
|
if(creatableRoles().includes(role)) list.appendChild(addForm(role));
|
||||||
});
|
});
|
||||||
const pupils = USERS.filter(u=>u.role==="pupil");
|
const pupils = USERS.filter(u=>u.role==="pupil");
|
||||||
if(currentUser.role==="teacher"){
|
if(currentUser.role==="teacher"){
|
||||||
if(pupils.length) group("pupils", T("amPupils"), pupils, true);
|
if(pupils.length || creatableRoles().includes("pupil")) group("pupils", T("amPupils"), pupils, true);
|
||||||
|
if(creatableRoles().includes("pupil")) list.appendChild(addForm("pupil"));
|
||||||
}else{
|
}else{
|
||||||
CLASSES.forEach(c=>{
|
CLASSES.forEach(c=>{
|
||||||
const us = pupils.filter(u=>u.classId===c.id);
|
const us = pupils.filter(u=>u.classId===c.id);
|
||||||
if(us.length) group("class:"+c.id, c.name, us, true);
|
if(us.length || creatableRoles().includes("pupil")) group("class:"+c.id, c.name, us, true);
|
||||||
|
if(creatableRoles().includes("pupil")) list.appendChild(addForm("pupil", c.id));
|
||||||
});
|
});
|
||||||
const noClass = pupils.filter(u=>!u.classId);
|
const noClass = pupils.filter(u=>!u.classId);
|
||||||
if(noClass.length) group("class:none", T("amNoClass"), noClass, true);
|
if(noClass.length || creatableRoles().includes("pupil")) group("class:none", T("amNoClass"), noClass, true);
|
||||||
|
if(creatableRoles().includes("pupil")) list.appendChild(addForm("pupil"));
|
||||||
}
|
}
|
||||||
const parents = USERS.filter(u=>u.role==="parent");
|
const parents = USERS.filter(u=>u.role==="parent");
|
||||||
if(parents.length) group("parents", T("amParents"), parents);
|
if(parents.length) group("parents", T("amParents"), parents);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
/* version — shown until /api/version resolves (or if the fetch fails, e.g. offline).
|
/* version — shown until /api/version resolves (or if the fetch fails, e.g. offline).
|
||||||
Kept in sync by hand with the VERSION file at the repo root on every release. */
|
Kept in sync by hand with the VERSION file at the repo root on every release. */
|
||||||
const VERSION = "0.4.04-beta";
|
const VERSION = "0.4.05-beta";
|
||||||
(function(){
|
(function(){
|
||||||
const tag = document.getElementById("verTag");
|
const tag = document.getElementById("verTag");
|
||||||
tag.textContent = "v"+VERSION;
|
tag.textContent = "v"+VERSION;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue