add ZonesComponent

This commit is contained in:
Christophe Robillard 2022-09-26 19:03:40 +02:00 committed by krichtof
parent 4d2c37ffdf
commit a6928e7ca2
4 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,5 @@
class Procedure::Card::ZonesComponent < ApplicationComponent
def initialize(procedure:)
@procedure = procedure
end
end

View file

@ -0,0 +1,4 @@
---
fr:
title: Zones
subtitle: Ministère(s) ou collectivité qui mettent en oeuvre la démarche

View file

@ -0,0 +1,13 @@
= link_to zones_admin_procedure_path(@procedure), id: 'zones', class: 'card-admin' do
- if @procedure.zones.size >= 1
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À faire
%div
%p.card-admin-title= t('.title')
%p.card-admin-subtitle= t('.subtitle')
%p.button= t('views.shared.actions.edit')

View file

@ -58,6 +58,7 @@
%h2.procedure-admin-explanation Indispensable avant publication
.procedure-grid
= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if Flipper.enabled? :zonage
= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
= render Procedure::Card::ServiceComponent.new(procedure: @procedure, administrateur: current_administrateur)
= render Procedure::Card::AdministrateursComponent.new(procedure: @procedure)