Merge pull request #10011 from adullact/feature-ouidou/admin_creation_delegation_review

ETQ gestionnaire d'admins: sépare les commentaires par origine + correctifs
This commit is contained in:
Colin Darie 2024-02-21 11:21:45 +00:00 committed by GitHub
commit 76d903b04e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 47 additions and 27 deletions

View file

@ -5,11 +5,9 @@
= t('show', scope: [:layouts, :breadcrumb])
.fr-collapse#breadcrumb-1
%ol.fr-breadcrumb__list
%li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link'
- steps.each.with_index do |step, i|
- if i == steps.size - 1
%li{ aria: { current: "page" } }
%span.fr-breadcrumb__link= step[0]
%li= link_to step[0], '', { aria: { current: "page" } , class: 'fr-breadcrumb__link' }
- else
%li= link_to step[0], step[1], class: 'fr-breadcrumb__link'
- if defined?(metadatas)

View file

@ -0,0 +1,8 @@
%table.fr-table.width-100.mt-3
%thead
%tr
%th= 'Adresse email'
%th= 'Dernier message'
%th
%tbody#commentaires
= render(GroupeGestionnaire::GroupeGestionnaireListCommentaires::CommentaireComponent.with_collection(commentaires, groupe_gestionnaire: groupe_gestionnaire))

View file

@ -6,19 +6,25 @@
.container
%h1 Messagerie de « #{@groupe_gestionnaire.name} »
%table.fr-table.width-100.mt-3
%thead
%tr
%th= 'Groupe gestionnaire'
%th= 'Adresse email'
%th= 'Dernier message'
%th
%tbody#commentaires
= render(GroupeGestionnaire::GroupeGestionnaireListCommentaires::CommentaireComponent.with_collection(@commentaires, groupe_gestionnaire: @groupe_gestionnaire))
- if @groupe_gestionnaire.parent_id && !current_gestionnaire.groupe_gestionnaires.where(id: @groupe_gestionnaire.parent_id).exists? && @last_commentaire.nil?
%tr
%td= @groupe_gestionnaire.parent.name
%td= "Messages avec le groupe gestionnaire parent (#{@groupe_gestionnaire.parent.name})"
%td
%td
= link_to 'Voir', parent_groupe_gestionnaire_gestionnaire_groupe_gestionnaire_commentaires_path(@groupe_gestionnaire), class: 'fr-btn'
= render partial: 'list_commentaires', locals: { commentaires: @commentaires, groupe_gestionnaire: @groupe_gestionnaire }
- if @commentaires_children_groups.present?
%h5 Messagerie des groupes enfants
= render partial: 'list_commentaires', locals: { commentaires: @commentaires_children_groups, groupe_gestionnaire: @groupe_gestionnaire }
- if @groupe_gestionnaire.parent_id
%h5 Messagerie du groupe parent « #{@groupe_gestionnaire.parent.name} »
- if @commentaires_parent_group.present?
= render partial: 'list_commentaires', locals: { commentaires: @commentaires_parent_group, groupe_gestionnaire: @groupe_gestionnaire }
- else
%table.fr-table.width-100.mt-3
%thead
%tr
%th= 'Adresse email'
%th= 'Dernier message'
%th
%tr
%td= "Messages avec le groupe gestionnaire parent"
%td
%td
= link_to 'Voir', parent_groupe_gestionnaire_gestionnaire_groupe_gestionnaire_commentaires_path(@groupe_gestionnaire), class: 'fr-btn'

View file

@ -15,6 +15,8 @@
Nombre de gestionnaires
%th{ scope: "col" }
Nombre d'administrateurs
%th{ scope: "col" }
Arborescence
%tbody
- @groupe_gestionnaires.order(:name).each do |groupe_gestionnaire|
@ -25,3 +27,5 @@
= groupe_gestionnaire.gestionnaire_ids.size
%td
= groupe_gestionnaire.administrateur_ids.size
%td
= link_to 'Voir', tree_structure_gestionnaire_groupe_gestionnaire_path(groupe_gestionnaire), class: 'fr-btn'

View file

@ -7,6 +7,9 @@
%h1 Arborescence de « #{@groupe_gestionnaire.name} »
.fr-mt-4w
- if @groupe_gestionnaire.parent_id
%ul
%li= @groupe_gestionnaire.parent.name
%ul
- @tree_structure.each do |parent, children|
%li