diff --git a/app/assets/stylesheets/procedure_list.scss b/app/assets/stylesheets/procedure_list.scss index 7841be7e552..4bd25c3ce64 100644 --- a/app/assets/stylesheets/procedure_list.scss +++ b/app/assets/stylesheets/procedure_list.scss @@ -8,7 +8,11 @@ } > li { - border-top: 1px solid var(--border-default-grey); + border-top: none; + + @media (min-width: 62em) { + border-top: 1px solid var(--border-default-grey); + } } .procedure-logo { diff --git a/app/assets/stylesheets/procedure_show.scss b/app/assets/stylesheets/procedure_show.scss index 86642f285e7..7cf0e76dba4 100644 --- a/app/assets/stylesheets/procedure_show.scss +++ b/app/assets/stylesheets/procedure_show.scss @@ -1,13 +1,6 @@ @import 'colors'; @import 'constants'; -.procedure-header { - a.header-link { - display: inline-block; - margin-bottom: 1 * $default-padding; - } -} - #procedure-show { .procedure-actions { margin-left: auto; diff --git a/app/components/instructeurs/dossiers_navigation_component/dossiers_navigation_component.html.haml b/app/components/instructeurs/dossiers_navigation_component/dossiers_navigation_component.html.haml index e2cfec40014..731d859014d 100644 --- a/app/components/instructeurs/dossiers_navigation_component/dossiers_navigation_component.html.haml +++ b/app/components/instructeurs/dossiers_navigation_component/dossiers_navigation_component.html.haml @@ -7,5 +7,3 @@ .fr.ml-auto.align-center.flex.fr-mt-2v = link_previous = link_next - -%p.fr-text--bold.fr-mb-0= dossier.procedure.libelle.truncate_words(15) diff --git a/app/graphql/types/demarche_type.rb b/app/graphql/types/demarche_type.rb index d9eca35eb87..100e4883740 100644 --- a/app/graphql/types/demarche_type.rb +++ b/app/graphql/types/demarche_type.rb @@ -4,7 +4,9 @@ module Types class DemarcheType < Types::BaseObject class DemarcheState < Types::BaseEnum Procedure.aasm.states.reject { |state| state.name == :hidden }.each do |state| - value(state.name.to_s, state.display_name, value: state.name) + value(state.name.to_s, + I18n.t(state, scope: [:activerecord, :attributes, :procedure, :api_state]), + value: state.name) end end diff --git a/app/helpers/dossier_helper.rb b/app/helpers/dossier_helper.rb index d0e20d13065..6f48dc02811 100644 --- a/app/helpers/dossier_helper.rb +++ b/app/helpers/dossier_helper.rb @@ -115,7 +115,7 @@ def pending_correction_badge(for_profile, html_class: nil) end def correction_resolved_badge(html_class: nil) - tag.span(Dossier.human_attribute_name("pending_correction.resolved"), class: ['fr-badge fr-badge--sm fr-badge--success super', html_class], role: 'status') + tag.span(Dossier.human_attribute_name("pending_correction.resolved"), class: ['fr-badge fr-badge--sm fr-badge--success', html_class], role: 'status') end def tags_label(tags) diff --git a/app/helpers/procedure_helper.rb b/app/helpers/procedure_helper.rb index 2d0b3e557ec..d544695f210 100644 --- a/app/helpers/procedure_helper.rb +++ b/app/helpers/procedure_helper.rb @@ -1,19 +1,13 @@ # frozen_string_literal: true module ProcedureHelper - def procedure_libelle(procedure) - parts = procedure.brouillon? ? [procedure_badge(procedure)] : [] - parts << procedure.libelle - safe_join(parts, ' ') + def procedure_libelle_with_number(procedure) + "#{procedure.libelle} - n°#{procedure.id} " end - def procedure_badge(procedure) - if procedure.close? - tag.span('Close', class: 'fr-badge') - elsif procedure.depubliee? - tag.span('Dépubliée', class: 'fr-badge') - elsif procedure.brouillon? - tag.span(t('helpers.procedure.testing_procedure'), class: 'fr-badge fr-badge--sm') + def procedure_badge(procedure, alignment_class = '') + if procedure.close? || procedure.depubliee? || procedure.brouillon? + tag.span(t("activerecord.attributes.procedure.aasm_state.#{procedure.aasm_state}"), class: "fr-badge fr-badge--sm #{alignment_class}") end end diff --git a/app/views/experts/avis/_header.html.haml b/app/views/experts/avis/_header.html.haml index b6cbd953823..6d23942901a 100644 --- a/app/views/experts/avis/_header.html.haml +++ b/app/views/experts/avis/_header.html.haml @@ -1,17 +1,24 @@ .sub-header .fr-container - .flex.justify-between - %nav.fr-breadcrumb{ "aria-label" => "vous êtes ici :", role: "navigation" } - %button.fr-breadcrumb__button{ "aria-controls" => "breadcrumb-1", "aria-expanded" => "false" } Voir le fil d’Ariane - #breadcrumb-1.fr-collapse - %ol.fr-breadcrumb__list - %li= link_to('Avis', expert_all_avis_path, class: 'fr-breadcrumb__link') - %li - = link_to(dossier.procedure.libelle.truncate_words(10), procedure_expert_avis_index_path(avis.procedure), class: "fr-breadcrumb__link") - = procedure_badge(dossier.procedure) - %li= content_tag("a","Dossier nº #{dossier.id}", class: 'fr-breadcrumb__link', 'aria-current': 'page') + %nav.fr-breadcrumb.fr-mt-0.fr-mb-1w{ "aria-label" => "vous êtes ici :", role: "navigation" } + %button.fr-breadcrumb__button{ "aria-controls" => "breadcrumb-1", "aria-expanded" => "false" } Voir le fil d’Ariane + #breadcrumb-1.fr-collapse + %ol.fr-breadcrumb__list + %li= link_to('Avis', expert_all_avis_path, class: 'fr-breadcrumb__link') + %li + = link_to(dossier.procedure.libelle.truncate_words(10), procedure_expert_avis_index_path(avis.procedure), class: "fr-breadcrumb__link") + %li= content_tag("a","Dossier nº #{dossier.id}", class: 'fr-breadcrumb__link', 'aria-current': 'page') - .header-actions + + .flex + .fr-mb-3w + %h1.fr-h3.fr-mb-0 + = t('show_dossier', scope: [:layouts, :breadcrumb], dossier_id: dossier.id, owner_name: dossier.owner_name) + %p.fr-text--bold.fr-mb-0 + = dossier.procedure.libelle.truncate_words(15) + = procedure_badge(dossier.procedure) + + .header-actions.fr-ml-auto .fr-download = link_to telecharger_pjs_expert_avis_path(avis.procedure, avis), download: :download, class: "menu-item menu-link fr-download__link" do Télécharger le dossier et toutes ses pièces jointes diff --git a/app/views/experts/avis/index.html.haml b/app/views/experts/avis/index.html.haml index d5f4bdf0f7f..ba06b7586f0 100644 --- a/app/views/experts/avis/index.html.haml +++ b/app/views/experts/avis/index.html.haml @@ -11,10 +11,9 @@ .procedure-details .clipboard-container .fr-mb-2w.fr-mt-2w - = badge = procedure_badge(p) - %h3{ class: class_names('font-weight-normal fr-link' => true, 'fr-ml-1v' => badge.present?) } - = link_to "#{p.libelle} - n°#{p.id}", instructeur_procedure_path(p) - + %h3.font-weight-normal.fr-link.fr-mr-2w + = link_to procedure_libelle_with_number(p), instructeur_procedure_path(p) + = procedure_badge(p) %ul.procedure-stats.flex.wrap.flex-gap-1 %li.fr-btn.fr-btn--tertiary.flex.justify-center.fr-enlarge-link.fr-mb-1w diff --git a/app/views/experts/avis/notification_settings.html.haml b/app/views/experts/avis/notification_settings.html.haml index 7a02cdd365b..6470a13bc12 100644 --- a/app/views/experts/avis/notification_settings.html.haml +++ b/app/views/experts/avis/notification_settings.html.haml @@ -1,12 +1,8 @@ .sub-header .fr-container.flex - - .procedure-logo{ style: "background-image: url(#{@procedure.logo_url})", - role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" } - .procedure-header - %h1.fr-h3= procedure_libelle @procedure + %h1.fr-h3= procedure_libelle_with_number(@procedure) .fr-container %h1.fr-h3 diff --git a/app/views/experts/avis/procedure.html.haml b/app/views/experts/avis/procedure.html.haml index a0331258ecf..222ba182fb0 100644 --- a/app/views/experts/avis/procedure.html.haml +++ b/app/views/experts/avis/procedure.html.haml @@ -4,13 +4,12 @@ #procedure-show .sub-header .fr-container.flex - - .procedure-logo{ style: "background-image: url(#{@procedure.logo_url})", - role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" } - .procedure-header - %h1.fr-h3= procedure_libelle @procedure - = link_to t('.management', procedure_id: @procedure.id), notification_settings_expert_procedure_path(@procedure), class: 'header-link' + %h1.fr-h3.fr-mb-0 + = procedure_libelle_with_number(@procedure) + = procedure_badge(@procedure, 'super') + %p + = link_to t('.management', procedure_id: @procedure.id), notification_settings_expert_procedure_path(@procedure) diff --git a/app/views/instructeurs/dossiers/_header_top.html.haml b/app/views/instructeurs/dossiers/_header_top.html.haml index c58f5593665..77af0381fb1 100644 --- a/app/views/instructeurs/dossiers/_header_top.html.haml +++ b/app/views/instructeurs/dossiers/_header_top.html.haml @@ -1,10 +1,11 @@ #header-top.fr-container = render Instructeurs::DossiersNavigationComponent.new(dossier:, procedure_presentation:, statut: params[:statut]) + %p.fr-text--bold.fr-mb-0 + = dossier.procedure.libelle.truncate_words(15) + = procedure_badge(dossier.procedure) %div - .fr-my-1w.badge-group - = procedure_badge(dossier.procedure) - + .fr-my-1w.fr-badge-group = status_badge(dossier.state) - if dossier.pending_correction? = pending_correction_badge(:for_instructeur) diff --git a/app/views/instructeurs/procedures/_header.html.haml b/app/views/instructeurs/procedures/_header.html.haml index 1209e15a75e..c9eb2f369f1 100644 --- a/app/views/instructeurs/procedures/_header.html.haml +++ b/app/views/instructeurs/procedures/_header.html.haml @@ -2,7 +2,8 @@ .align-start.flex = render Instructeurs::BackButtonComponent.new(to: instructeur_procedures_path) %h1.fr-h3.fr-mb-0 - = "#{procedure_libelle procedure} (n°#{procedure.id})" + = procedure_libelle_with_number(procedure) + = procedure_badge(procedure, 'super') %nav.fr-nav#navigation{ role: "navigation", "aria-label": t('instructeurs.dossiers.header.banner.procedure_navigation') } %ul.fr-nav__list %li.fr-nav__item diff --git a/app/views/instructeurs/procedures/_list.html.haml b/app/views/instructeurs/procedures/_list.html.haml index 18c6efeaf72..909ff347a6b 100644 --- a/app/views/instructeurs/procedures/_list.html.haml +++ b/app/views/instructeurs/procedures/_list.html.haml @@ -1,86 +1,90 @@ %li.list-style-type-none.fr-mb-3w .procedure-details - .clipboard-container - .fr-mb-2w.fr-mt-2w.flex.align-center - %nav.fr-nav{ role: "navigation", "aria-label": "Menu de la procédure" } - %ul.fr-nav__list - %li.fr-nav__item.relative - %button.fr-nav__btn.fr-btn--tertiary.fr-h-5v.hide-chevron{ "aria-expanded": "false", "aria-controls": "mega-menu-#{p.id}" } - %span.fr-icon-menu-2-fill.fr-icon--sm.fr-mr-1w - Menu - .fr-collapse.fr-mega-menu{ id: "mega-menu-#{p.id}", tabindex: "-1" , style: "min-width: 350px" } - .fr-container.fr-container--fluid.fr-container-lg - %button.fr-btn--close.fr-btn.fr.fr-mb-3w{ "aria-controls": "mega-menu-#{p.id}" } - = t('instructeurs.procedures.index.close_button') - .fr-grid-row - .fr-col-12 - .fr-mega-menu__leader - %h4.fr-h6= t('instructeurs.procedures.index.procedure_menu') - .fr-col-12 - %h5.fr-mega-menu__category - = link_to t('instructeurs.dossiers.header.banner.follow_up'), instructeur_procedure_path(p), class: "fr-nav__link" - .fr-col-12 - %ul.fr-mega-menu__list.fr-pb-0 - %li.fr-nav__item - %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "procedure-management-#{p.id}", style: "height: 47px" } - = t('instructeurs.dossiers.header.banner.procedure_management') - .fr-collapse.width-100{ id: "procedure-management-#{p.id}" } - %ul.fr-menu__list.fr-mb-0 - %li - = link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(p), class: 'fr-nav__link' + .fr-mb-2w.fr-mt-2w.flex.align-center + %nav.fr-nav{ role: "navigation", "aria-label": "Menu de la procédure" } + %ul.fr-nav__list + %li.fr-nav__item.relative + %button.fr-nav__btn.fr-btn--tertiary-no-outline.fr-h-5v.hide-chevron{ "aria-expanded": "false", "aria-controls": "mega-menu-#{p.id}" } + %span.fr-icon-menu-2-fill.fr-icon--sm.fr-mr-1w + Menu + .fr-collapse.fr-mega-menu{ id: "mega-menu-#{p.id}", tabindex: "-1" , style: "min-width: 350px" } + .fr-container.fr-container--fluid.fr-container-lg + %button.fr-btn--close.fr-btn.fr.fr-mb-3w{ "aria-controls": "mega-menu-#{p.id}" } + = t('instructeurs.procedures.index.close_button') + .fr-grid-row + .fr-col-12 + .fr-mega-menu__leader + %h4.fr-h6= t('instructeurs.procedures.index.procedure_menu') + .fr-col-12 + %h5.fr-mega-menu__category + = link_to t('instructeurs.dossiers.header.banner.follow_up'), instructeur_procedure_path(p), class: "fr-nav__link" + .fr-col-12 + %ul.fr-mega-menu__list.fr-pb-0 + %li.fr-nav__item + %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "procedure-management-#{p.id}", style: "height: 47px" } + = t('instructeurs.dossiers.header.banner.procedure_management') + .fr-collapse.width-100{ id: "procedure-management-#{p.id}" } + %ul.fr-menu__list.fr-mb-0 + %li + = link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(p), class: 'fr-nav__link' - - if p.instructeurs_self_management_enabled? - %li - = link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(p), class: 'fr-nav__link' + - if p.instructeurs_self_management_enabled? + %li + = link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(p), class: 'fr-nav__link' - - elsif current_administrateur && p.administrateurs_procedures.any? { _1.administrateur_id == current_administrateur.id } + - elsif current_administrateur && p.administrateurs_procedures.any? { _1.administrateur_id == current_administrateur.id } - %li - = link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(p), class: 'fr-nav__link' - %li - = link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(p), class: 'fr-nav__link' - %li - = link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(p), class: 'fr-nav__link' - %li - = link_to t('views.instructeurs.dossiers.show_deleted_dossiers'), deleted_dossiers_instructeur_procedure_path(p), class: 'fr-nav__link' - .fr-col-12 - %ul.fr-mega-menu__list.fr-pb-0 - %li.fr-nav__item - %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "user-support-#{p.id}", style: "height: 47px" } - = t('instructeurs.dossiers.header.banner.user_support') - .fr-collapse.width-100{ id: "user-support-#{p.id}" } - %ul.fr-menu__list.fr-mb-0 - %li - = link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(p), class: 'fr-nav__link' %li - = link_to t('instructeurs.dossiers.header.banner.preview'), apercu_instructeur_procedure_path(p), target: "_blank", rel: "noopener", class: 'fr-nav__link' - %li - = link_to "#", class: "fr-nav__link fr-link fr-link--md fr-link--icon-left fr-icon-clipboard-line", data: {controller: "clipboard", clipboard_text_value: commencer_url(p.path), action: "click->clipboard#copy" } do - = t('instructeurs.dossiers.header.banner.copy_link_button') - .fr-col-12 - %ul.fr-mega-menu__list.fr-pb-0 - %li.fr-nav__item - %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "downloads-#{p.id}", style: "height: 47px" } - = t('instructeurs.dossiers.header.banner.downloads') - %span.relative{ class: class_names("fr-pr-1w" => @has_export_notification) } - - if @has_export_notification - %span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') } - .fr-collapse.width-100{ id: "downloads-#{p.id}" } - %ul.fr-menu__list.fr-mb-0 - %li - = link_to exports_instructeur_procedure_path(p), class: 'fr-nav__link' do - = t('instructeurs.dossiers.header.banner.exports_list') - - if @has_export_notification - %span.fr-ml-1v.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') } - %li - = link_to t('instructeurs.dossiers.header.banner.archives'), list_instructeur_archives_path(p), class: 'fr-nav__link' - %li - = link_to t('instructeurs.dossiers.header.banner.export_templates'), export_templates_instructeur_procedure_path(p), class: 'fr-nav__link' - = badge = procedure_badge(p) - %h3{ class: class_names('font-weight-normal fr-link fr-ml-3v' => true, 'fr-ml-1v' => badge.present?) } - = link_to "#{p.libelle} - n° #{p.id}", instructeur_procedure_path(p) + = link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(p), class: 'fr-nav__link' + %li + = link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(p), class: 'fr-nav__link' + %li + = link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(p), class: 'fr-nav__link' + %li + = link_to t('views.instructeurs.dossiers.show_deleted_dossiers'), deleted_dossiers_instructeur_procedure_path(p), class: 'fr-nav__link' + .fr-col-12 + %ul.fr-mega-menu__list.fr-pb-0 + %li.fr-nav__item + %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "user-support-#{p.id}", style: "height: 47px" } + = t('instructeurs.dossiers.header.banner.user_support') + .fr-collapse.width-100{ id: "user-support-#{p.id}" } + %ul.fr-menu__list.fr-mb-0 + %li + = link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(p), class: 'fr-nav__link' + %li + = link_to t('instructeurs.dossiers.header.banner.preview'), apercu_instructeur_procedure_path(p), target: "_blank", rel: "noopener", class: 'fr-nav__link' + %li + = link_to "#", class: "fr-nav__link fr-link fr-link--md fr-link--icon-left fr-icon-clipboard-line", data: {controller: "clipboard", clipboard_text_value: commencer_url(p.path), action: "click->clipboard#copy" } do + = t('instructeurs.dossiers.header.banner.copy_link_button') + .fr-col-12 + %ul.fr-mega-menu__list.fr-pb-0 + %li.fr-nav__item + %button.fr-nav__btn.fr-mega-menu__category.flex.justify-between{ "aria-expanded": "false", "aria-controls": "downloads-#{p.id}", style: "height: 47px" } + = t('instructeurs.dossiers.header.banner.downloads') + %span.relative{ class: class_names("fr-pr-1w" => @has_export_notification) } + - if @has_export_notification + %span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') } + .fr-collapse.width-100{ id: "downloads-#{p.id}" } + %ul.fr-menu__list.fr-mb-0 + %li + = link_to exports_instructeur_procedure_path(p), class: 'fr-nav__link' do + = t('instructeurs.dossiers.header.banner.exports_list') + - if @has_export_notification + %span.fr-ml-1v.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') } + %li + = link_to t('instructeurs.dossiers.header.banner.archives'), list_instructeur_archives_path(p), class: 'fr-nav__link' + %li + = link_to t('instructeurs.dossiers.header.banner.export_templates'), export_templates_instructeur_procedure_path(p), class: 'fr-nav__link' + + .fr-hidden.fr-unhidden-lg + %h3.font-weight-normal.fr-link.fr-mx-2w + = link_to procedure_libelle_with_number(p), instructeur_procedure_path(p) + = procedure_badge(p) - = render Dsfr::CopyButtonComponent.new(title: t('instructeurs.procedures.index.copy_link_button'), text: commencer_url(p.path)) + .flex.align-center.fr-hidden-lg.fr-mb-2w + %h3.font-weight-normal.fr-link.fr-mr-2w + = link_to procedure_libelle_with_number(p), instructeur_procedure_path(p) + = procedure_badge(p) %ul.procedure-stats.flex.wrap.flex-gap-1 %li.fr-btn.fr-btn--tertiary.flex.justify-center.fr-enlarge-link.fr-mb-1w diff --git a/app/views/shared/dossiers/_header.html.haml b/app/views/shared/dossiers/_header.html.haml index 5a93fc5b4c4..2479da96038 100644 --- a/app/views/shared/dossiers/_header.html.haml +++ b/app/views/shared/dossiers/_header.html.haml @@ -1,5 +1,5 @@ %h1 - = procedure_libelle(dossier.procedure) + = dossier.procedure.libelle = status_badge_user(dossier, 'super') %h2 = t('views.users.dossiers.show.header.dossier_number_html', dossier_id: dossier.id) diff --git a/config/locales/en.yml b/config/locales/en.yml index 3472be65f2c..9b449a700af 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -59,8 +59,6 @@ en: modal_close: "Close" modal_close_alt: "Close this modal" helpers: - procedure: - testing_procedure: testing procedure commentaire: send_message_to_instructeur: "Send a message to the instructor" reply_in_mailbox: "Reply in mailbox" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index f06913da8ce..3581f45e10b 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -50,8 +50,6 @@ fr: modal_close: "Fermer" modal_close_alt: "Fermer la fenêtre modale" helpers: - procedure: - testing_procedure: démarche en test commentaire: send_message_to_instructeur: "Envoyer un message à l’instructeur" reply_in_mailbox: "Répondre dans la messagerie" diff --git a/config/locales/models/procedure/en.yml b/config/locales/models/procedure/en.yml index 54cc0cb0091..048e725ba91 100644 --- a/config/locales/models/procedure/en.yml +++ b/config/locales/models/procedure/en.yml @@ -39,11 +39,18 @@ en: duree_conservation_dossiers_dans_ds: Duration files will be kept max_duree_conservation_dossiers_dans_ds: Max duration allowed to keep files for_tiers_enabled: Enable a third party to submit a file + api_state: + brouillon: Draft + publiee: Published + close: Closed + hidden: Destroyed + depubliee: Unpublished aasm_state: brouillon: Draft publiee: Published close: Closed hidden: Destroyed + depubliee: Unpublished kind_usager: individual: Individual personne_morale: 'Legal entity' diff --git a/config/locales/models/procedure/fr.yml b/config/locales/models/procedure/fr.yml index 23ebb897cae..6cba86f7b8d 100644 --- a/config/locales/models/procedure/fr.yml +++ b/config/locales/models/procedure/fr.yml @@ -44,12 +44,18 @@ fr: published_at: 'Date de publication' aasm_state: 'Statut' admin_count: 'Nb administrateurs' - aasm_state: + api_state: brouillon: Brouillon publiee: Publiée close: Close hidden: Supprimée depubliee: Dépubliée + aasm_state: + brouillon: En test + publiee: Publiée + close: Close + hidden: Supprimée + depubliee: Dépubliée kind_usager: individual: Particulier personne_morale: 'Personne morale' diff --git a/config/locales/views/instructeurs/procedures/en.yml b/config/locales/views/instructeurs/procedures/en.yml index ae6769f2ff2..bf8e9f5d4a3 100644 --- a/config/locales/views/instructeurs/procedures/en.yml +++ b/config/locales/views/instructeurs/procedures/en.yml @@ -2,7 +2,6 @@ en: instructeurs: procedures: index: - copy_link_button: Copy the procedure link to clipboard close_button: Close procedure_menu: Procedure menu show: diff --git a/config/locales/views/instructeurs/procedures/fr.yml b/config/locales/views/instructeurs/procedures/fr.yml index 428cbeeea24..474bbfc4267 100644 --- a/config/locales/views/instructeurs/procedures/fr.yml +++ b/config/locales/views/instructeurs/procedures/fr.yml @@ -2,7 +2,6 @@ fr: instructeurs: procedures: index: - copy_link_button: Copier le lien de la démarche dans le presse-papiers close_button: Fermer procedure_menu: Menu de la démarche show: diff --git a/spec/system/instructeurs/instruction_spec.rb b/spec/system/instructeurs/instruction_spec.rb index a2811e08bcb..12c5fd0d553 100644 --- a/spec/system/instructeurs/instruction_spec.rb +++ b/spec/system/instructeurs/instruction_spec.rb @@ -35,7 +35,7 @@ expect(page).to have_current_path(instructeur_procedures_path) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) expect(page).to have_current_path(instructeur_procedure_path(procedure)) click_on dossier.user.email @@ -83,7 +83,7 @@ # keep back up to date after most action on dossier expect(page).to have_selector(".back-btn[href=\"#{instructeur_procedure_path(procedure, statut: 'suivis')}\"]") - click_on procedure.libelle + click_on(procedure.libelle, visible: true) click_on 'traité' expect(page).to have_button('Repasser en instruction') click_on 'Mettre à la corbeille' @@ -106,7 +106,7 @@ scenario 'A instructeur can follow/unfollow a dossier' do log_in(instructeur.email, password) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) test_statut_bar(a_suivre: 1, tous_les_dossiers: 1) dossier_present?(dossier.id, 'en construction') @@ -130,7 +130,7 @@ log_in(instructeur.email, password) end - click_on procedure.libelle + click_on(procedure.libelle, visible: true) test_statut_bar(a_suivre: 1, tous_les_dossiers: 1) click_on "Télécharger un dossier" @@ -159,7 +159,7 @@ log_in(instructeur.email, password) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) click_on 'Suivre' click_on 'suivi' click_on dossier.user.email @@ -191,7 +191,7 @@ log_in(instructeur.email, password) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) click_on dossier.user.email click_on 'Personnes impliquées' diff --git a/spec/system/routing/rules_full_scenario_spec.rb b/spec/system/routing/rules_full_scenario_spec.rb index 9eba6eef43d..50244f2a14d 100644 --- a/spec/system/routing/rules_full_scenario_spec.rb +++ b/spec/system/routing/rules_full_scenario_spec.rb @@ -150,7 +150,7 @@ # the litteraires instructeurs only manage the litteraires dossiers register_instructeur_and_log_in(victor.email) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) expect(page).to have_text(litteraire_user.email) expect(page).not_to have_text(scientifique_user.email) @@ -176,7 +176,7 @@ # the scientifiques instructeurs only manage the scientifiques dossiers register_instructeur_and_log_in(marie.email) - click_on procedure.libelle + click_on(procedure.libelle, visible: true) expect(page).not_to have_text(litteraire_user.email) expect(page).to have_text(scientifique_user.email) @@ -209,7 +209,7 @@ expect(find('.procedure-stats')).to have_css('span.notifications') ## on the dossiers list - click_on procedure.libelle + click_on(procedure.libelle, visible: true) expect(page).to have_current_path(instructeur_procedure_path(procedure)) expect(find('nav.fr-tabs')).to have_css('span.notifications')