Voeg 28 herkenbare kleurplaten en creatieve niveaus toe (v0.4.66-beta) #4

Open
bes-r wants to merge 207 commits from bes-r/kleurplaten-v0-4-66 into main AGit
3 changed files with 16 additions and 7 deletions
Showing only changes of commit e5890280cc - Show all commits

View file

@ -1 +1 @@
0.4.04-beta
0.4.05-beta

View file

@ -1359,21 +1359,30 @@
const loose = USERS.filter(u=>["teacher","admin","pupil"].includes(u.role) && u.schoolId==null);
if(loose.length) group("gnoschool", T("amNoSchoolGroup"), loose);
}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])=>{
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");
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{
CLASSES.forEach(c=>{
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);
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");
if(parents.length) group("parents", T("amParents"), parents);

View file

@ -2,7 +2,7 @@
"use strict";
/* 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. */
const VERSION = "0.4.04-beta";
const VERSION = "0.4.05-beta";
(function(){
const tag = document.getElementById("verTag");
tag.textContent = "v"+VERSION;