Verbeter grafische kwaliteit van kleurplaten (v0.4.67-beta) #5
4 changed files with 12 additions and 3 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.4.02-beta
|
0.4.03-beta
|
||||||
|
|
|
||||||
|
|
@ -433,7 +433,7 @@
|
||||||
/* klas (uitwisselen met andere klassen) */
|
/* klas (uitwisselen met andere klassen) */
|
||||||
const cs = classSel(u.classId);
|
const cs = classSel(u.classId);
|
||||||
cs.addEventListener("change", async ()=>{
|
cs.addEventListener("change", async ()=>{
|
||||||
try{ await api("/admin/users/"+u.id, {method:"PATCH", body:{classId: cs.value ? +cs.value : null}}); }
|
try{ await api("/admin/users/"+u.id, {method:"PATCH", body:{classId: cs.value ? +cs.value : null}}); reload(); }
|
||||||
catch(e){ note(e.message); }
|
catch(e){ note(e.message); }
|
||||||
});
|
});
|
||||||
tools.appendChild(field("amFieldClass", cs));
|
tools.appendChild(field("amFieldClass", cs));
|
||||||
|
|
|
||||||
|
|
@ -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.02-beta";
|
const VERSION = "0.4.03-beta";
|
||||||
(function(){
|
(function(){
|
||||||
const tag = document.getElementById("verTag");
|
const tag = document.getElementById("verTag");
|
||||||
tag.textContent = "v"+VERSION;
|
tag.textContent = "v"+VERSION;
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,15 @@ test('systeemmanager koppelt een gebruiker aan een school en maakt hem weer los'
|
||||||
await app3.close();
|
await app3.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('leerling verplaatsen naar een andere klas (uitwisselen) werkt', async () => {
|
||||||
|
const { app, calls } = await makeApp(superUser, { id: 9, role: 'pupil', school_id: 2, class_id: 50, username: 'lena' });
|
||||||
|
const res = await app.inject({ method: 'PATCH', url: '/api/admin/users/9', cookies, payload: { classId: 100 } });
|
||||||
|
assert.equal(res.statusCode, 200, res.body);
|
||||||
|
const upd = calls.find((c) => c.sql === 'UPDATE users SET class_id = $1 WHERE id = $2');
|
||||||
|
assert.deepEqual(upd.params, [100, 9]);
|
||||||
|
await app.close();
|
||||||
|
});
|
||||||
|
|
||||||
test('school koppelen kan niet door een schoolbeheerder en niet op super/parent', async () => {
|
test('school koppelen kan niet door een schoolbeheerder en niet op super/parent', async () => {
|
||||||
const { app, calls } = await makeAppWithSchool(admin, { id: 7, role: 'teacher', school_id: 2, username: 'juf' });
|
const { app, calls } = await makeAppWithSchool(admin, { id: 7, role: 'teacher', school_id: 2, username: 'juf' });
|
||||||
await app.inject({ method: 'PATCH', url: '/api/admin/users/7', cookies, payload: { schoolId: 3 } });
|
await app.inject({ method: 'PATCH', url: '/api/admin/users/7', cookies, payload: { schoolId: 3 } });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue