Benutzer, Ticketzuweißungen

This commit is contained in:
2026-03-23 03:12:08 +01:00
parent e75a2e5e20
commit 08391cdb6c
29 changed files with 592 additions and 111 deletions

View File

@@ -10,12 +10,17 @@ const router = Router();
function userPayload(row) {
if (!row) return null;
const role = row.role;
const canAdmin = role === 'admin';
const canEditCrm = canAdmin || role === 'after_sales';
return {
id: row.id,
username: row.username,
role: row.role,
role,
firstName: row.firstname ?? null,
lastName: row.lastname ?? null,
canAdmin,
canEditCrm,
};
}