feat: employee management — add/delete users from Members page

- Backend: POST /api/auth/users (create user), DELETE /api/auth/users/:id (delete user, unassign tasks)
- Frontend API: apiCreateUser, apiDeleteUser
- MembersPage: working Add Employee modal (name/email/password/role/dept), delete button with confirmation
- Only CEO/CTO/Manager roles see management controls
- CSS: btn-danger, btn-danger-sm styles
This commit is contained in:
tusuii
2026-02-16 12:48:20 +05:30
parent 22f048989a
commit 0fa2302b26
5 changed files with 206 additions and 16 deletions

View File

@@ -1655,7 +1655,44 @@ body {
background: var(--accent-hover);
}
/* DEPENDENCIES */
.btn-primary:disabled,
.btn-danger:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-danger {
padding: 8px 18px;
background: #ef4444;
border: none;
border-radius: 8px;
color: #fff;
font-size: 13px;
font-weight: 700;
cursor: pointer;
font-family: inherit;
transition: background 0.15s;
}
.btn-danger:hover {
background: #dc2626;
}
.btn-danger-sm {
padding: 4px 8px;
background: rgba(239, 68, 68, 0.12);
border: 1px solid rgba(239, 68, 68, 0.25);
border-radius: 6px;
color: #ef4444;
font-size: 13px;
cursor: pointer;
transition: all 0.15s;
}
.btn-danger-sm:hover {
background: rgba(239, 68, 68, 0.25);
border-color: #ef4444;
}
.dep-unresolved-badge {
background: rgba(239, 68, 68, 0.15);
color: #ef4444;