Skip to content

Commit

Permalink
Ajoute une colonne observateurs sur la liste des utilisateurs
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Nov 5, 2024
1 parent 35c6c87 commit 598f6c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/serializers/ApiModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ object ApiModel {
groupAdmin: Boolean,
admin: Boolean,
expert: Boolean,
observableOrganisations: List[String],
managingOrganisations: List[String],
managingAreas: List[String],
)
Expand Down Expand Up @@ -214,6 +215,8 @@ object ApiModel {
groupAdmin = user.groupAdminRoleName.nonEmpty,
admin = user.adminRoleName.nonEmpty,
expert = user.expert,
observableOrganisations =
user.observableOrganisationIds.flatMap(Organisation.byId).map(_.shortName).sorted,
managingOrganisations =
user.managingOrganisationIds.flatMap(Organisation.byId).map(_.shortName).sorted,
managingAreas = user.managingAreaIds.flatMap(Area.fromId).map(_.toString).sorted,
Expand Down
8 changes: 8 additions & 0 deletions typescript/src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ if (window.document.getElementById(usersTableId)) {
formatter: "html",
width: 200,
},
{
title: "Organismes observés",
field: "permissions.observableOrganisations",
sorter: "string",
headerFilter: "input",
width: 200,
accessorDownload: joinWithCommaDownload,
},
{
title: "Organismes en charge",
field: "permissions.managingOrganisations",
Expand Down

0 comments on commit 598f6c6

Please sign in to comment.