From 2f9670ec3f2fa8f55c983213eeb63eff6d545953 Mon Sep 17 00:00:00 2001 From: Stan <1939656+GDay@users.noreply.github.com> Date: Tue, 14 Oct 2025 04:40:34 +0200 Subject: [PATCH 01/22] add roles and departments --- .../people/templates/department_update.html | 49 ++++++++++++ back/admin/people/templates/departments.html | 80 +++++++++++++------ back/admin/people/templates/role_create.html | 23 ++++++ back/admin/people/templates/role_update.html | 23 ++++++ back/admin/people/urls.py | 15 ++++ back/admin/people/views.py | 66 ++++++++++++++- .../0045_department_sequences_role.py | 34 ++++++++ back/users/models.py | 17 ++++ back/users/selectors.py | 6 ++ 9 files changed, 287 insertions(+), 26 deletions(-) create mode 100644 back/admin/people/templates/department_update.html create mode 100644 back/admin/people/templates/role_create.html create mode 100644 back/admin/people/templates/role_update.html create mode 100644 back/users/migrations/0045_department_sequences_role.py diff --git a/back/admin/people/templates/department_update.html b/back/admin/people/templates/department_update.html new file mode 100644 index 00000000..de480ff0 --- /dev/null +++ b/back/admin/people/templates/department_update.html @@ -0,0 +1,49 @@ +{% extends 'admin_base.html' %} +{% load i18n %} +{% load crispy_forms_tags %} + +{% block content %} +
{{ role }}
+| {% translate "Name" %} | -
|---|
| - {{ department.name }} - | -
| - {% trans "You haven't created any departments yet" %} - | -
{% trans "No roles added yet" %}
{% endfor %} diff --git a/back/admin/people/templates/departments.html b/back/admin/people/templates/departments.html index 9660767f..353c61d9 100644 --- a/back/admin/people/templates/departments.html +++ b/back/admin/people/templates/departments.html @@ -3,6 +3,9 @@ {% load i18n %} {% block actions %} +{{ user.full_name }}
@@ -68,3 +85,101 @@{% trans "Drag and drop the users in the roles you want them to be part of." %}