Merge pull request #7988 from tchak/fix-admin-cards-grid

fix(procedure): fix procedure cards grid view
This commit is contained in:
Paul Chavard 2022-11-02 09:58:50 +01:00 committed by GitHub
commit fb29249bce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 235 additions and 220 deletions

View file

@ -1,12 +1,13 @@
= link_to admin_procedure_administrateurs_path(@procedure), id: 'administrateurs', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
.line-count.fr-my-1w
%p.fr-tag= @procedure.administrateurs.size
%h3.fr-h6
= t('.title', count: @procedure.administrateurs.size)
%p.fr-tile-subtitle Gestion de la démarche
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to admin_procedure_administrateurs_path(@procedure), id: 'administrateurs', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
.line-count.fr-my-1w
%p.fr-tag= @procedure.administrateurs.size
%h3.fr-h6
= t('.title', count: @procedure.administrateurs.size)
%p.fr-tile-subtitle Gestion de la démarche
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,21 +1,22 @@
= link_to annotations_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.justify-between
- if error_messages.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to annotations_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.justify-between
- if error_messages.present?
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
- elsif @count == 0
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
- else
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
- elsif @count == 0
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
- else
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
.line-count.fr-my-1w
%p.fr-tag= @count
%h3.fr-h6
= t('.title')
%p.fr-tile-subtitle Champs à remplir par ladministration
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.line-count.fr-my-1w
%p.fr-tag= @count
%h3.fr-h6
= t('.title')
%p.fr-tile-subtitle Champs à remplir par ladministration
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,14 +1,15 @@
= link_to jeton_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.api_entreprise_token.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to jeton_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.api_entreprise_token.present?
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Configurer le jeton API entreprise
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Configurer le jeton API entreprise
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,14 +1,15 @@
= link_to admin_procedure_api_particulier_path(@procedure), class: 'fr-tile fr-enlarge-link', id: 'api-particulier' do
.fr-tile__body.flex.justify-between
- if @procedure.api_particulier_token.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to admin_procedure_api_particulier_path(@procedure), class: 'fr-tile fr-enlarge-link', id: 'api-particulier' do
.fr-tile__body.flex.justify-between
- if @procedure.api_particulier_token.present?
%div
%span.icon.accept
%p.fr-tile-status-accept= t('.ready')
- else
%div
%span.icon.clock
%p.fr-tile-status-todo= t('.needs_configuration')
%div
%span.icon.accept
%p.fr-tile-status-accept= t('.ready')
- else
%div
%span.icon.clock
%p.fr-tile-status-todo= t('.needs_configuration')
%div
%h3.fr-h6.fr-mt-10v= Procedure.human_attribute_name(:api_particulier_token)
%p.fr-tile-subtitle= t('.configure_api_particulier_token')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= Procedure.human_attribute_name(:api_particulier_token)
%p.fr-tile-subtitle= t('.configure_api_particulier_token')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,14 +1,15 @@
= link_to edit_admin_procedure_attestation_template_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.draft_attestation_template&.activated?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to edit_admin_procedure_attestation_template_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.draft_attestation_template&.activated?
%div
%span.icon.accept
%p.fr-tile-status-accept Activée
- else
%div
%span.icon.clock
%p.fr-tile-status-todo Désactivée
%div
%span.icon.accept
%p.fr-tile-status-accept Activée
- else
%div
%span.icon.clock
%p.fr-tile-status-todo Désactivée
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Délivrance automatique pour les dossiers acceptés
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Délivrance automatique pour les dossiers acceptés
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,22 +1,23 @@
= link_to champs_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.justify-between
- if error_messages.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to champs_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link', title: error_messages do
.fr-tile__body.flex.justify-between
- if error_messages.present?
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
- elsif @count == 0
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
- else
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
%span.icon.refuse
%p.fr-tile-status-error À modifier
- elsif @count == 0
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
- else
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
.line-count.fr-my-1w
%p.fr-tag= @count
%h3.fr-h6
= t('.title')
%p.fr-tile-subtitle À remplir par les usagers
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.line-count.fr-my-1w
%p.fr-tag= @count
%h3.fr-h6
= t('.title')
%p.fr-tile-subtitle À remplir par les usagers
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,14 +1,15 @@
= link_to edit_admin_procedure_dossier_submitted_message_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.active_dossier_submitted_message.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to edit_admin_procedure_dossier_submitted_message_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.active_dossier_submitted_message.present?
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Orienter l'usager suite à l'envoi de son dossier
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Orienter l'usager suite à l'envoi de son dossier
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,9 +1,10 @@
= link_to admin_procedure_mail_templates_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Notifications automatiques
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to admin_procedure_mail_templates_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Notifications automatiques
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,9 +1,10 @@
= link_to admin_procedure_experts_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.preview
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Gérer les avis des experts invités
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to admin_procedure_experts_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.preview
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Gérer les avis des experts invités
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,21 +1,22 @@
= link_to admin_procedure_groupe_instructeurs_path(@procedure), id: 'groupe-instructeurs', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.routee? || @procedure.instructeurs.size > 1
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to admin_procedure_groupe_instructeurs_path(@procedure), id: 'groupe-instructeurs', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.routee? || @procedure.instructeurs.size > 1
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
.line-count.fr-my-1w
- if @procedure.routee?
%p.fr-tag= @procedure.groupe_instructeurs.size
- else
%p.fr-tag= @procedure.instructeurs.size
.line-count.fr-my-1w
- if @procedure.routee?
%p.fr-tag= @procedure.groupe_instructeurs.size
- else
%p.fr-tag= @procedure.instructeurs.size
%h3.fr-h6
= @procedure.routee? ? t('.routee.title', count: @procedure.groupe_instructeurs.size) : t('.title', count: @procedure.instructeurs.size)
%p.fr-tile-subtitle Suivi des dossiers
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6
= @procedure.routee? ? t('.routee.title', count: @procedure.groupe_instructeurs.size) : t('.title', count: @procedure.instructeurs.size)
%p.fr-tile-subtitle Suivi des dossiers
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,12 +1,13 @@
= link_to modifications_admin_procedure_path(@procedure), id: 'modifications', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Activée
%div
%h3.fr-h6.fr-mt-10v
%p.fr-tag= @procedure.revisions_count
= t('.title', count: @procedure.revisions_count)
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to modifications_admin_procedure_path(@procedure), id: 'modifications', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Activée
%div
%h3.fr-h6.fr-mt-10v
%p.fr-tag= @procedure.revisions_count
= t('.title', count: @procedure.revisions_count)
%p.fr-tile-subtitle Historique des modifications du formulaire
%p.fr-btn.fr-btn--tertiary Voir
%p.fr-tile-subtitle Historique des modifications du formulaire
%p.fr-btn.fr-btn--tertiary Voir

View file

@ -1,14 +1,15 @@
= link_to monavis_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.monavis_embed.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to monavis_admin_procedure_path(@procedure), class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.monavis_embed.present?
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À configurer
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Avis des usagers sur votre démarche
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Avis des usagers sur votre démarche
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,9 +1,10 @@
= link_to edit_admin_procedure_path(@procedure), id: 'presentation', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Logo, nom, description
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to edit_admin_procedure_path(@procedure), id: 'presentation', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle Logo, nom, description
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -1,18 +1,19 @@
= link_to service_link, class: 'fr-tile fr-enlarge-link', id: 'service' do
.fr-tile__body.flex.justify-between
- if @procedure.service_id.present?
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to service_link, class: 'fr-tile fr-enlarge-link', id: 'service' do
.fr-tile__body.flex.justify-between
- if @procedure.service_id.present?
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle
- if @procedure.service_id.present?
= @procedure.service.nom
- else
Choix du service administratif
%p.fr-btn.fr-btn--tertiary= service_button_text
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle
- if @procedure.service_id.present?
= @procedure.service.nom
- else
Choix du service administratif
%p.fr-btn.fr-btn--tertiary= service_button_text

View file

@ -1,14 +1,15 @@
= link_to zones_admin_procedure_path(@procedure), id: 'zones', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.zones.size >= 1
.fr-col-6.fr-col-md-4.fr-col-lg-3
= link_to zones_admin_procedure_path(@procedure), id: 'zones', class: 'fr-tile fr-enlarge-link' do
.fr-tile__body.flex.justify-between
- if @procedure.zones.size >= 1
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
%span.icon.accept
%p.fr-tile-status-accept Validé
- else
%div
%span.icon.clock
%p.fr-tile-status-todo À faire
%div
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle= t('.subtitle')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')
%h3.fr-h6.fr-mt-10v= t('.title')
%p.fr-tile-subtitle= t('.subtitle')
%p.fr-btn.fr-btn--tertiary= t('views.shared.actions.edit')

View file

@ -57,22 +57,22 @@
.container
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Indispensable avant publication
.fr-grid-row.fr-grid-row--gutters
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if @procedure.feature_enabled?(:zonage)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::ChampsComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::ServiceComponent.new(procedure: @procedure, administrateur: current_administrateur)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::AdministrateursComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
= render Procedure::Card::PresentationComponent.new(procedure: @procedure)
= render Procedure::Card::ZonesComponent.new(procedure: @procedure) if @procedure.feature_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)
= render Procedure::Card::InstructeursComponent.new(procedure: @procedure)
= render Procedure::Card::ModificationsComponent.new(procedure: @procedure)
%h2.fr-mt-5w.fr-mb-3w.fr-h1 Pour aller plus loin
.fr-grid-row.fr-grid-row--gutters
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::EmailsComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::AnnotationsComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::APIEntrepriseComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::APIParticulierComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::MonAvisComponent.new(procedure: @procedure)
.fr-col-6.fr-col-md-4.fr-col-lg-3= render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure)
= render Procedure::Card::AttestationComponent.new(procedure: @procedure)
= render Procedure::Card::ExpertsComponent.new(procedure: @procedure)
= render Procedure::Card::EmailsComponent.new(procedure: @procedure)
= render Procedure::Card::AnnotationsComponent.new(procedure: @procedure)
= render Procedure::Card::APIEntrepriseComponent.new(procedure: @procedure)
= render Procedure::Card::APIParticulierComponent.new(procedure: @procedure)
= render Procedure::Card::MonAvisComponent.new(procedure: @procedure)
= render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure)