feat: US4.3.9 children management
This commit is contained in:
parent
9ea59814ad
commit
528c51cb5e
29 changed files with 212 additions and 31 deletions
|
@ -0,0 +1,5 @@
|
|||
class GroupeGestionnaire::Card::ChildrenComponent < ApplicationComponent
|
||||
def initialize(groupe_gestionnaire:)
|
||||
@groupe_gestionnaire = groupe_gestionnaire
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fr:
|
||||
title:
|
||||
one: Groupe enfants
|
||||
other: Groupes enfants
|
|
@ -0,0 +1,12 @@
|
|||
.fr-col-6.fr-col-md-4.fr-col-lg-3
|
||||
= link_to gestionnaire_groupe_gestionnaire_children_path(@groupe_gestionnaire), id: 'gestionnaires', class: 'fr-tile fr-enlarge-link' do
|
||||
.fr-tile__body.flex.column.align-center.justify-between
|
||||
%div
|
||||
%span.icon.accept
|
||||
%p.fr-tile-status-accept Validé
|
||||
%div
|
||||
.line-count.fr-my-1w
|
||||
%p.fr-tag= @groupe_gestionnaire.children.size
|
||||
%h3.fr-h6
|
||||
= t('.title', count: @groupe_gestionnaire.children.size)
|
||||
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
|
|
@ -9,5 +9,4 @@
|
|||
%p.fr-tag= @groupe_gestionnaire.gestionnaires.size
|
||||
%h3.fr-h6
|
||||
= t('.title', count: @groupe_gestionnaire.gestionnaires.size)
|
||||
%p.fr-tile-subtitle Gestion de la démarche
|
||||
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
class GroupeGestionnaire::GroupeGestionnaireChildren::ChildComponent < ApplicationComponent
|
||||
include ApplicationHelper
|
||||
|
||||
def initialize(groupe_gestionnaire:, child:)
|
||||
@groupe_gestionnaire = groupe_gestionnaire
|
||||
@child = child
|
||||
end
|
||||
|
||||
def name
|
||||
@child.name
|
||||
end
|
||||
|
||||
def created_at
|
||||
try_format_datetime(@child.created_at)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,4 @@
|
|||
%tr{ id: dom_id(@child) }
|
||||
%td
|
||||
= link_to name, gestionnaire_groupe_gestionnaire_path(@child)
|
||||
%td= created_at
|
Loading…
Add table
Add a link
Reference in a new issue