commit
224aa6ba71
37 changed files with 441 additions and 137 deletions
|
@ -35,13 +35,13 @@ module Instructeurs
|
||||||
.count
|
.count
|
||||||
|
|
||||||
@all_dossiers_counts = {
|
@all_dossiers_counts = {
|
||||||
'à suivre' => @dossiers_a_suivre_count_per_procedure.sum { |_, v| v },
|
t('.to_follow') => @dossiers_a_suivre_count_per_procedure.sum { |_, v| v },
|
||||||
'suivis' => @followed_dossiers_count_per_procedure.sum { |_, v| v },
|
t('.followed') => @followed_dossiers_count_per_procedure.sum { |_, v| v },
|
||||||
'traités' => @dossiers_termines_count_per_procedure.sum { |_, v| v },
|
t('.processed') => @dossiers_termines_count_per_procedure.sum { |_, v| v },
|
||||||
'dossiers' => @dossiers_count_per_procedure.sum { |_, v| v },
|
t('.all') => @dossiers_count_per_procedure.sum { |_, v| v },
|
||||||
'expirant' => @dossiers_expirant_count_per_procedure.sum { |_, v| v },
|
t('.dossiers_close_to_expiration') => @dossiers_expirant_count_per_procedure.sum { |_, v| v },
|
||||||
'archivés' => @dossiers_archived_count_per_procedure.sum { |_, v| v },
|
t('.archived') => @dossiers_archived_count_per_procedure.sum { |_, v| v },
|
||||||
'supprimés récemment' => @dossiers_supprimes_recemment_count_per_procedure.sum { |_, v| v }
|
t('.dossiers_supprimes_recemment') => @dossiers_supprimes_recemment_count_per_procedure.sum { |_, v| v }
|
||||||
}
|
}
|
||||||
|
|
||||||
@procedure_ids_en_cours_with_notifications = current_instructeur.procedure_ids_with_notifications(:en_cours)
|
@procedure_ids_en_cours_with_notifications = current_instructeur.procedure_ids_with_notifications(:en_cours)
|
||||||
|
|
|
@ -631,6 +631,10 @@ class Dossier < ApplicationRecord
|
||||||
termine_close_to_expiration_notice_sent_at: nil)
|
termine_close_to_expiration_notice_sent_at: nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show_procedure_state_warning?
|
||||||
|
procedure.discarded? || (brouillon? && !procedure.dossier_can_transition_to_en_construction?)
|
||||||
|
end
|
||||||
|
|
||||||
def show_groupe_instructeur_details?
|
def show_groupe_instructeur_details?
|
||||||
procedure.routee? && groupe_instructeur.present? && (!procedure.feature_enabled?(:procedure_routage_api) || !defaut_groupe_instructeur?)
|
procedure.routee? && groupe_instructeur.present? && (!procedure.feature_enabled?(:procedure_routage_api) || !defaut_groupe_instructeur?)
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,43 +37,43 @@ class ProcedurePresentation < ApplicationRecord
|
||||||
|
|
||||||
def fields
|
def fields
|
||||||
fields = [
|
fields = [
|
||||||
field_hash('Créé le', 'self', 'created_at'),
|
field_hash('self', 'created_at'),
|
||||||
field_hash('En construction le', 'self', 'en_construction_at'),
|
field_hash('self', 'en_construction_at'),
|
||||||
field_hash('Déposé le', 'self', 'depose_at'),
|
field_hash('self', 'depose_at'),
|
||||||
field_hash('Mis à jour le', 'self', 'updated_at'),
|
field_hash('self', 'updated_at'),
|
||||||
field_hash('Demandeur', 'user', 'email'),
|
field_hash('user', 'email'),
|
||||||
field_hash('Email instructeur', 'followers_instructeurs', 'email'),
|
field_hash('followers_instructeurs', 'email'),
|
||||||
field_hash('Groupe instructeur', 'groupe_instructeur', 'label')
|
field_hash('groupe_instructeur', 'label')
|
||||||
]
|
]
|
||||||
|
|
||||||
if procedure.for_individual
|
if procedure.for_individual
|
||||||
fields.push(
|
fields.push(
|
||||||
field_hash("Prénom", "individual", "prenom"),
|
field_hash("individual", "prenom"),
|
||||||
field_hash("Nom", "individual", "nom"),
|
field_hash("individual", "nom"),
|
||||||
field_hash("Civilité", "individual", "gender")
|
field_hash("individual", "gender")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
if !procedure.for_individual
|
if !procedure.for_individual
|
||||||
fields.push(
|
fields.push(
|
||||||
field_hash('SIREN', 'etablissement', 'entreprise_siren'),
|
field_hash('etablissement', 'entreprise_siren'),
|
||||||
field_hash('Forme juridique', 'etablissement', 'entreprise_forme_juridique'),
|
field_hash('etablissement', 'entreprise_forme_juridique'),
|
||||||
field_hash('Nom commercial', 'etablissement', 'entreprise_nom_commercial'),
|
field_hash('etablissement', 'entreprise_nom_commercial'),
|
||||||
field_hash('Raison sociale', 'etablissement', 'entreprise_raison_sociale'),
|
field_hash('etablissement', 'entreprise_raison_sociale'),
|
||||||
field_hash('SIRET siège social', 'etablissement', 'entreprise_siret_siege_social'),
|
field_hash('etablissement', 'entreprise_siret_siege_social'),
|
||||||
field_hash('Date de création', 'etablissement', 'entreprise_date_creation')
|
field_hash('etablissement', 'entreprise_date_creation')
|
||||||
)
|
)
|
||||||
|
|
||||||
fields.push(
|
fields.push(
|
||||||
field_hash('SIRET', 'etablissement', 'siret'),
|
field_hash('etablissement', 'siret'),
|
||||||
field_hash('Libellé NAF', 'etablissement', 'libelle_naf'),
|
field_hash('etablissement', 'libelle_naf'),
|
||||||
field_hash('Code postal', 'etablissement', 'code_postal')
|
field_hash('etablissement', 'code_postal')
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
fields.concat procedure.types_de_champ_for_procedure_presentation
|
fields.concat procedure.types_de_champ_for_procedure_presentation
|
||||||
.pluck(:libelle, :private, :stable_id)
|
.pluck(:libelle, :private, :stable_id)
|
||||||
.map { |(libelle, is_private, stable_id)| field_hash(libelle, is_private ? TYPE_DE_CHAMP_PRIVATE : TYPE_DE_CHAMP, stable_id.to_s) }
|
.map { |(libelle, is_private, stable_id)| field_hash(is_private ? TYPE_DE_CHAMP_PRIVATE : TYPE_DE_CHAMP, stable_id.to_s, label: libelle) }
|
||||||
|
|
||||||
fields
|
fields
|
||||||
end
|
end
|
||||||
|
@ -85,6 +85,14 @@ class ProcedurePresentation < ApplicationRecord
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def displayed_fields_for_headers
|
||||||
|
[
|
||||||
|
*displayed_fields,
|
||||||
|
field_hash('self', 'id', classname: 'number-col'),
|
||||||
|
field_hash('self', 'state', classname: 'state-col')
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
def sorted_ids(dossiers, count)
|
def sorted_ids(dossiers, count)
|
||||||
table, column, order = sort.values_at(TABLE, COLUMN, 'order')
|
table, column, order = sort.values_at(TABLE, COLUMN, 'order')
|
||||||
|
|
||||||
|
@ -323,11 +331,12 @@ class ProcedurePresentation < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def field_hash(label, table, column)
|
def field_hash(table, column, label: nil, classname: '')
|
||||||
{
|
{
|
||||||
'label' => label,
|
'label' => label || I18n.t(column, scope: [:activerecord, :attributes, :procedure_presentation, :fields, table]),
|
||||||
TABLE => table,
|
TABLE => table,
|
||||||
COLUMN => column
|
COLUMN => column,
|
||||||
|
'classname' => classname
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
|
|
||||||
- if p.close?
|
- if p.close?
|
||||||
.procedure-status
|
.procedure-status
|
||||||
%span.label Close
|
%span.label
|
||||||
|
= t('helpers.procedure.close')
|
||||||
- elsif p.depubliee?
|
- elsif p.depubliee?
|
||||||
.procedure-status
|
.procedure-status
|
||||||
%span.label Dépubliée
|
%span.label
|
||||||
|
= t('helpers.procedure.unpublished')
|
||||||
|
|
|
@ -19,23 +19,23 @@
|
||||||
%ul
|
%ul
|
||||||
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
- notifications_summary = current_instructeur.notifications_for_dossier(dossier)
|
||||||
|
|
||||||
= dynamic_tab_item('Demande',
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.request'),
|
||||||
instructeur_dossier_path(dossier.procedure, dossier),
|
instructeur_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:demande])
|
notification: notifications_summary[:demande])
|
||||||
|
|
||||||
= dynamic_tab_item('Annotations privées',
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.private_annotations'),
|
||||||
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier),
|
annotations_privees_instructeur_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:annotations_privees])
|
notification: notifications_summary[:annotations_privees])
|
||||||
|
|
||||||
= dynamic_tab_item('Avis externes',
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.external_opinion'),
|
||||||
avis_instructeur_dossier_path(dossier.procedure, dossier),
|
avis_instructeur_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:avis])
|
notification: notifications_summary[:avis])
|
||||||
|
|
||||||
= dynamic_tab_item('Messagerie',
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.messaging'),
|
||||||
messagerie_instructeur_dossier_path(dossier.procedure, dossier),
|
messagerie_instructeur_dossier_path(dossier.procedure, dossier),
|
||||||
notification: notifications_summary[:messagerie])
|
notification: notifications_summary[:messagerie])
|
||||||
|
|
||||||
= dynamic_tab_item('Personnes impliquées',
|
= dynamic_tab_item(t('views.instructeurs.dossiers.tab_steps.involved_persons'),
|
||||||
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier))
|
personnes_impliquees_instructeur_dossier_path(dossier.procedure, dossier))
|
||||||
|
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
- if dossier_is_followed
|
- if dossier_is_followed
|
||||||
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
= link_to unfollow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
||||||
%span.icon.unfollow>
|
%span.icon.unfollow>
|
||||||
Ne plus suivre
|
= t('views.instructeurs.dossiers.stop_follow')
|
||||||
- else
|
- else
|
||||||
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
= link_to follow_instructeur_dossier_path(procedure_id, dossier_id), method: :patch, class: 'button' do
|
||||||
%span.icon.follow>
|
%span.icon.follow>
|
||||||
Suivre le dossier
|
= t('views.instructeurs.dossiers.follow_file')
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
- export = item[:export]
|
- export = item[:export]
|
||||||
%li
|
%li
|
||||||
- if export.nil?
|
- if export.nil?
|
||||||
|
// i18n-tasks-use t('.everything_csv_html')
|
||||||
|
// i18n-tasks-use t('.everything_xlsx_html')
|
||||||
|
// i18n-tasks-use t('.everything_ods_html')
|
||||||
|
// i18n-tasks-use t('.everything_zip_html')
|
||||||
= link_to t(".everything_#{format}_html"), download_export_instructeur_procedure_path(procedure, statut: statut, export_format: format), remote: true
|
= link_to t(".everything_#{format}_html"), download_export_instructeur_procedure_path(procedure, statut: statut, export_format: format), remote: true
|
||||||
- elsif export.ready?
|
- elsif export.ready?
|
||||||
= link_to t(".everything_ready_html", export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}"), export.file.service_url, target: "_blank", rel: "noopener"
|
= link_to t(".everything_ready_html", export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}"), export.file.service_url, target: "_blank", rel: "noopener"
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
%span.dropdown
|
%span.dropdown
|
||||||
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'filter-menu' }
|
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'filter-menu' }
|
||||||
Filtrer
|
= t('views.instructeurs.dossiers.filters.title')
|
||||||
#filter-menu.dropdown-content.left-aligned.fade-in-down
|
#filter-menu.dropdown-content.left-aligned.fade-in-down
|
||||||
= form_tag add_filter_instructeur_procedure_path(procedure), method: :post, class: 'dropdown-form large' do
|
= form_tag add_filter_instructeur_procedure_path(procedure), method: :post, class: 'dropdown-form large' do
|
||||||
= label_tag :field, "Colonne"
|
= label_tag :field, t('views.instructeurs.dossiers.filters.column')
|
||||||
= select_tag :field, options_for_select(displayed_fields_options)
|
= select_tag :field, options_for_select(displayed_fields_options)
|
||||||
%br
|
%br
|
||||||
= label_tag :value, "Valeur"
|
= label_tag :value, t('views.instructeurs.dossiers.filters.value')
|
||||||
= text_field_tag :value, nil, maxlength: ProcedurePresentation::FILTERS_VALUE_MAX_LENGTH
|
= text_field_tag :value, nil, maxlength: ProcedurePresentation::FILTERS_VALUE_MAX_LENGTH
|
||||||
= hidden_field_tag :statut, statut
|
= hidden_field_tag :statut, statut
|
||||||
%br
|
%br
|
||||||
= submit_tag "Ajouter le filtre", class: 'button'
|
= submit_tag t('views.instructeurs.dossiers.filters.add_filter'), class: 'button'
|
||||||
|
|
||||||
- current_filters.group_by { |filter| filter['table'] }.each_with_index do |(table, filters), i|
|
- current_filters.group_by { |filter| filter['table'] }.each_with_index do |(table, filters), i|
|
||||||
- if i > 0
|
- if i > 0
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%span.dropdown
|
%span.dropdown
|
||||||
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'download-menu' }
|
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'download-menu' }
|
||||||
Télécharger tous les dossiers
|
= t('.download')
|
||||||
#download-menu.dropdown-content.fade-in-down{ style: 'width: 450px' }
|
#download-menu.dropdown-content.fade-in-down{ style: 'width: 450px' }
|
||||||
%ul.dropdown-items
|
%ul.dropdown-items
|
||||||
- exports_list(exports).each do |item|
|
- exports_list(exports).each do |item|
|
||||||
|
@ -9,14 +9,26 @@
|
||||||
- export = item[:export]
|
- export = item[:export]
|
||||||
%li
|
%li
|
||||||
- if export.nil?
|
- if export.nil?
|
||||||
= link_to t("#{time_span_type}_#{format}_html", scope: [:instructeurs, :procedure, :export_stale]), download_export_instructeur_procedure_path(procedure, time_span_type: time_span_type, export_format: format), remote: true
|
// i18n-tasks-use t('.everything_csv_html')
|
||||||
|
// i18n-tasks-use t('.monthly_csv_html')
|
||||||
|
// i18n-tasks-use t('.everything_xlsx_html')
|
||||||
|
// i18n-tasks-use t('.monthly_xlsx_html')
|
||||||
|
// i18n-tasks-use t('.everything_ods_html')
|
||||||
|
// i18n-tasks-use t('.monthly_ods_html')
|
||||||
|
= link_to t(".#{time_span_type}_#{format}_html"), download_export_instructeur_procedure_path(procedure, time_span_type: time_span_type, export_format: format), remote: true
|
||||||
- elsif export.ready?
|
- elsif export.ready?
|
||||||
= link_to t("export_#{time_span_type}_ready_html", export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}", scope: [:instructeurs, :procedure]), export.file.service_url, target: "_blank", rel: "noopener"
|
// i18n-tasks-use t('.export_everything_ready_html')
|
||||||
|
// i18n-tasks-use t('.export_monthly_ready_html')
|
||||||
|
= link_to t(".export_#{time_span_type}_ready_html", export_time: time_ago_in_words(export.updated_at), export_format: ".#{format}"), export.file.service_url, target: "_blank", rel: "noopener"
|
||||||
- if export.old?
|
- if export.old?
|
||||||
= button_to download_export_instructeur_procedure_path(procedure, export_format: format, time_span_type: time_span_type, force_export: true), class: "button small", style: "padding-right: 2px", title: t("#{time_span_type}_short", export_format: ".#{format}", scope: [:instructeurs, :procedure, :export_stale]), remote: true, method: :get, params: { export_format: format, time_span_type: time_span_type, force_export: true } do
|
// i18n-tasks-use t('.everything_short')
|
||||||
|
// i18n-tasks-use t('.monthly_short')
|
||||||
|
= button_to download_export_instructeur_procedure_path(procedure, export_format: format, time_span_type: time_span_type, force_export: true), class: "button small", style: "padding-right: 2px", title: t(".#{time_span_type}_short", export_format: ".#{format}"), remote: true, method: :get, params: { export_format: format, time_span_type: time_span_type, force_export: true } do
|
||||||
.icon.retry
|
.icon.retry
|
||||||
- else
|
- else
|
||||||
%span{ 'data-export-poll-url': download_export_instructeur_procedure_path(procedure, export_format: format, time_span_type: time_span_type, no_progress_notification: true) }
|
%span{ 'data-export-poll-url': download_export_instructeur_procedure_path(procedure, export_format: format, time_span_type: time_span_type, no_progress_notification: true) }
|
||||||
= t("export_#{time_span_type}_pending_html", export_time: time_ago_in_words(export.created_at), export_format: ".#{format}", scope: [:instructeurs, :procedure])
|
// i18n-tasks-use t('.export_everything_pending_html')
|
||||||
|
// i18n-tasks-use t('.export_monthly_pending_html')
|
||||||
|
= t(".export_#{time_span_type}_pending_html", export_time: time_ago_in_words(export.created_at), export_format: ".#{format}")
|
||||||
%li
|
%li
|
||||||
= link_to t(:download_archive, scope: [:instructeurs, :procedure]), instructeur_archives_path(procedure)
|
= link_to t(".download_archive"), instructeur_archives_path(procedure)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
.procedure-header
|
.procedure-header
|
||||||
%h1= procedure_libelle procedure
|
%h1= procedure_libelle procedure
|
||||||
= link_to 'gestion des notifications', email_notifications_instructeur_procedure_path(procedure), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(procedure), class: 'header-link'
|
||||||
|
|
|
|
||||||
= link_to 'statistiques', stats_instructeur_procedure_path(procedure), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(procedure), class: 'header-link'
|
||||||
|
|
||||||
- if procedure.instructeurs_self_management?
|
- if procedure.instructeurs_self_management?
|
||||||
|
|
|
|
||||||
- if can_manage_groupe_instructeurs?(procedure)
|
- if can_manage_groupe_instructeurs?(procedure)
|
||||||
= link_to 'instructeurs', admin_procedure_groupe_instructeurs_path(procedure), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(procedure), class: 'header-link'
|
||||||
- elsif procedure.routee?
|
- elsif procedure.routee?
|
||||||
= link_to 'instructeurs', instructeur_groupes_path(procedure), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(procedure), class: 'header-link'
|
||||||
- else
|
- else
|
||||||
= link_to 'instructeurs', instructeur_groupe_path(procedure, procedure.defaut_groupe_instructeur), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupe_path(procedure, procedure.defaut_groupe_instructeur), class: 'header-link'
|
||||||
|
|
||||||
- if can_send_groupe_message?(procedure)
|
- if can_send_groupe_message?(procedure)
|
||||||
|
|
|
|
||||||
= link_to 'contacter les usagers (brouillon)', email_usagers_instructeur_procedure_path(procedure), class: 'header-link'
|
= link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(procedure), class: 'header-link'
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
.stats-number
|
.stats-number
|
||||||
= number_with_html_delimiter(a_suivre_count)
|
= number_with_html_delimiter(a_suivre_count)
|
||||||
.stats-legend
|
.stats-legend
|
||||||
à suivre
|
= t('instructeurs.dossiers.labels.to_follow')
|
||||||
%li
|
%li
|
||||||
%object
|
%object
|
||||||
= link_to(instructeur_procedure_path(p, statut: 'suivis')) do
|
= link_to(instructeur_procedure_path(p, statut: 'suivis')) do
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- if procedures.length > 1
|
- if procedures.length > 1
|
||||||
.tab-title
|
.tab-title
|
||||||
%span
|
%span
|
||||||
Synthèse des dossiers
|
= t('views.instructeurs.dossiers.dossier_synthesis')
|
||||||
- all_dossiers_counts.each_with_index do |(label, dossier_count)|
|
- all_dossiers_counts.each_with_index do |(label, dossier_count)|
|
||||||
%span.badge.procedure-synthese-badge= number_with_html_delimiter(dossier_count) + ' ' + label
|
%span.badge.procedure-synthese-badge= number_with_html_delimiter(dossier_count) + ' ' + label
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%nav.tabs.mt-3
|
%nav.tabs.mt-3
|
||||||
%ul
|
%ul
|
||||||
= tab_item('à suivre',
|
= tab_item(t('views.instructeurs.dossiers.tab_steps.to_follow'),
|
||||||
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
||||||
active: statut == 'a-suivre',
|
active: statut == 'a-suivre',
|
||||||
badge: number_with_html_delimiter(a_suivre_count))
|
badge: number_with_html_delimiter(a_suivre_count))
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
badge: number_with_html_delimiter(traites_count),
|
badge: number_with_html_delimiter(traites_count),
|
||||||
notification: has_termine_notifications)
|
notification: has_termine_notifications)
|
||||||
|
|
||||||
= tab_item('au total',
|
= tab_item(t('views.instructeurs.dossiers.tab_steps.total'),
|
||||||
instructeur_procedure_path(procedure, statut: 'tous'),
|
instructeur_procedure_path(procedure, statut: 'tous'),
|
||||||
active: statut == 'tous',
|
active: statut == 'tous',
|
||||||
badge: number_with_html_delimiter(tous_count))
|
badge: number_with_html_delimiter(tous_count))
|
||||||
|
|
|
@ -27,18 +27,23 @@
|
||||||
|
|
||||||
.container
|
.container
|
||||||
- if @statut == 'a-suivre'
|
- if @statut == 'a-suivre'
|
||||||
%p.explication-onglet Aucun instructeur n’est affecté au suivi de ces dossiers. Soyez le premier !
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.a_suivre')
|
||||||
- if @statut == 'suivis'
|
- if @statut == 'suivis'
|
||||||
%p.explication-onglet Les dossiers qui sont dans cet onglet sont uniquement ceux que vous suivez. Vous pouvez échanger avec le demandeur jusqu'à pouvoir les accepter, les refuser ou les classer sans suite.
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.suivis')
|
||||||
- if @statut == 'traites'
|
- if @statut == 'traites'
|
||||||
%p.explication-onglet Les dossiers dans cet onglet sont terminés : ils ont été acceptés, refusés ou classés sans suite.
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.traites')
|
||||||
- if @statut == 'tous'
|
- if @statut == 'tous'
|
||||||
%p.explication-onglet Tous les dossiers qui ont été déposés sur cette démarche, quel que soit le statut.
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.tous')
|
||||||
- if @statut == 'supprimes_recemment'
|
- if @statut == 'supprimes_recemment'
|
||||||
%p.explication-onglet Tous les dossiers terminés et supprimés par les instructeurs sur cette démarche
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.supprimes_recemment')
|
||||||
- if @statut == 'archives'
|
- if @statut == 'archives'
|
||||||
%p.explication-onglet
|
%p.explication-onglet
|
||||||
Les dossiers de cet onglet sont archivés : vous ne pouvez plus y répondre, et les demandeurs ne peuvent plus les modifier.
|
= t('views.instructeurs.dossiers.tab_explainations.archives')
|
||||||
%br
|
%br
|
||||||
Ces dossiers seront supprimés lorsque leur délai de conservation dans Démarches-simplifiées
|
Ces dossiers seront supprimés lorsque leur délai de conservation dans Démarches-simplifiées
|
||||||
- if @procedure.duree_conservation_dossiers_dans_ds
|
- if @procedure.duree_conservation_dossiers_dans_ds
|
||||||
|
@ -50,8 +55,8 @@
|
||||||
%span.icon.delete
|
%span.icon.delete
|
||||||
Afficher les dossiers supprimés
|
Afficher les dossiers supprimés
|
||||||
- if @statut == 'expirant'
|
- if @statut == 'expirant'
|
||||||
%p.explication-onglet Les dossiers n'expireront pas avant la période de conservation des données.
|
%p.explication-onglet
|
||||||
|
= t('views.instructeurs.dossiers.tab_explainations.expirant')
|
||||||
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
||||||
- pagination = paginate @filtered_sorted_paginated_ids
|
- pagination = paginate @filtered_sorted_paginated_ids
|
||||||
= pagination
|
= pagination
|
||||||
|
@ -70,17 +75,13 @@
|
||||||
- else
|
- else
|
||||||
%th.notification-col
|
%th.notification-col
|
||||||
|
|
||||||
= render partial: "header_field", locals: { field: { "label" => "Nº dossier", "table" => "self", "column" => "id" }, classname: "number-col" }
|
- @procedure_presentation.displayed_fields_for_headers.each do |field|
|
||||||
|
= render partial: "header_field", locals: { field: field, classname: field['classname'] }
|
||||||
- @procedure_presentation.displayed_fields.each do |field|
|
|
||||||
= render partial: "header_field", locals: { field: field, classname: "" }
|
|
||||||
|
|
||||||
= render partial: "header_field", locals: { field: { "label" => "Statut", "table" => "self", "column" => "state" }, classname: "status-col" }
|
|
||||||
|
|
||||||
%th.action-col.follow-col
|
%th.action-col.follow-col
|
||||||
%span.dropdown
|
%span.dropdown
|
||||||
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'custom-menu' }
|
%button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'custom-menu' }
|
||||||
Personnaliser
|
= t('views.instructeurs.dossiers.personalize')
|
||||||
#custom-menu.dropdown-content.fade-in-down
|
#custom-menu.dropdown-content.fade-in-down
|
||||||
= form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do
|
= form_tag update_displayed_fields_instructeur_procedure_path(@procedure), method: :patch, class: 'dropdown-form large columns-form' do
|
||||||
= hidden_field_tag :values, nil
|
= hidden_field_tag :values, nil
|
||||||
|
@ -92,7 +93,7 @@
|
||||||
group: '.columns-form',
|
group: '.columns-form',
|
||||||
name: 'values')
|
name: 'values')
|
||||||
|
|
||||||
= submit_tag "Enregistrer", class: 'button'
|
= submit_tag t('views.instructeurs.dossiers.save'), class: 'button'
|
||||||
|
|
||||||
%tbody
|
%tbody
|
||||||
- @projected_dossiers.each do |p|
|
- @projected_dossiers.each do |p|
|
||||||
|
@ -142,4 +143,5 @@
|
||||||
|
|
||||||
= pagination
|
= pagination
|
||||||
- else
|
- else
|
||||||
%h2.empty-text Aucun dossier
|
%h2.empty-text
|
||||||
|
= t('views.instructeurs.dossiers.no_file')
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
%ul.header-tabs
|
%ul.header-tabs
|
||||||
- if current_instructeur.procedures.any?
|
- if current_instructeur.procedures.any?
|
||||||
%li
|
%li
|
||||||
= active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
|
= active_link_to t('utils.procedure'), instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
|
||||||
- if current_instructeur.user.expert && current_expert.avis_summary[:total] > 0
|
- if current_instructeur.user.expert && current_expert.avis_summary[:total] > 0
|
||||||
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
%ul.header-tabs
|
%ul.header-tabs
|
||||||
- if current_expert.user.instructeur && current_instructeur.procedures.any?
|
- if current_expert.user.instructeur && current_instructeur.procedures.any?
|
||||||
%li
|
%li
|
||||||
= active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
|
= active_link_to t('utils.procedure'), instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link'
|
||||||
|
|
||||||
- if current_expert.avis_summary[:total] > 0
|
- if current_expert.avis_summary[:total] > 0
|
||||||
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
= render partial: 'layouts/header/avis_tab', locals: { current_expert: current_expert }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.header-search{ role: 'search' }
|
.header-search{ role: 'search' }
|
||||||
= form_tag "#{search_endpoint}", method: :get, class: "form" do
|
= form_tag "#{search_endpoint}", method: :get, class: "form" do
|
||||||
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: "Rechercher un dossier", title: "Rechercher un dossier"
|
= text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), title: t('views.users.dossiers.search.search_file')
|
||||||
%button{ title: "Rechercher" }
|
%button{ title: t('views.users.dossiers.search.search_file') }
|
||||||
= image_tag "icons/search-blue.svg", alt: 'Rechercher', 'aria-hidden':'true', width: 24, height: 24, loading: 'lazy'
|
= image_tag "icons/search-blue.svg", alt: 'Rechercher', 'aria-hidden':'true', width: 24, height: 24, loading: 'lazy'
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
|
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
|
||||||
|
|
||||||
- if current_user.owns?(dossier) && !dossier.procedure.discarded? && !dossier.procedure.close?
|
- if dossier.show_procedure_state_warning?
|
||||||
|
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
||||||
|
- elsif current_user.owns?(dossier)
|
||||||
.header-actions
|
.header-actions
|
||||||
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
||||||
- else
|
|
||||||
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
%table.table.vertical.dossier-champs
|
%table.table.vertical.dossier-champs
|
||||||
%tbody
|
%tbody
|
||||||
%tr
|
%tr
|
||||||
%td.libelle Civilité :
|
%td.libelle
|
||||||
|
= t('views.users.dossiers.identite.civility')
|
||||||
%td= individual.gender
|
%td= individual.gender
|
||||||
%tr
|
%tr
|
||||||
%td.libelle Prénom :
|
%td.libelle
|
||||||
|
= t('views.users.dossiers.identite.first_name')
|
||||||
%td= individual.prenom
|
%td= individual.prenom
|
||||||
%tr
|
%tr
|
||||||
%td.libelle Nom :
|
%td.libelle
|
||||||
|
= t('views.users.dossiers.identite.last_name')
|
||||||
%td= individual.nom
|
%td= individual.nom
|
||||||
- if individual.birthdate.present?
|
- if individual.birthdate.present?
|
||||||
%tr
|
%tr
|
||||||
%td.libelle Date de naissance :
|
%td.libelle
|
||||||
|
= t('views.users.dossiers.identite.birthdate')
|
||||||
%td= try_format_date(individual.birthdate)
|
%td= try_format_date(individual.birthdate)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.dropdown.help-dropdown
|
.dropdown.help-dropdown
|
||||||
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' } Aide
|
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' }
|
||||||
|
= t('help')
|
||||||
#help-menu.dropdown-content.fade-in-down
|
#help-menu.dropdown-content.fade-in-down
|
||||||
%ul.dropdown-items
|
%ul.dropdown-items
|
||||||
- title = dossier.brouillon? ? "Besoin d’aide pour remplir votre dossier ?" : "Une question sur votre dossier ?"
|
- title = dossier.brouillon? ? "Besoin d’aide pour remplir votre dossier ?" : "Une question sur votre dossier ?"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.dropdown.help-dropdown
|
.dropdown.help-dropdown
|
||||||
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' } Aide
|
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' }
|
||||||
|
= t('help')
|
||||||
#help-menu.dropdown-content.fade-in-down
|
#help-menu.dropdown-content.fade-in-down
|
||||||
%ul.dropdown-items
|
%ul.dropdown-items
|
||||||
= render partial: 'shared/help/dropdown_items/faq_item'
|
= render partial: 'shared/help/dropdown_items/faq_item'
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.dropdown.help-dropdown
|
.dropdown.help-dropdown
|
||||||
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' } Aide
|
%button.button.primary.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'help-menu' }
|
||||||
|
= t('help')
|
||||||
#help-menu.dropdown-content.fade-in-down
|
#help-menu.dropdown-content.fade-in-down
|
||||||
%ul.dropdown-items
|
%ul.dropdown-items
|
||||||
- if procedure.service.present?
|
- if procedure.service.present?
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
%p.autosave-status.succeeded
|
%p.autosave-status.succeeded
|
||||||
%span.autosave-icon.icon.accept
|
%span.autosave-icon.icon.accept
|
||||||
%span.autosave-label
|
%span.autosave-label
|
||||||
Brouillon enregistré
|
= t('views.users.dossiers.autosave.autosave_confirmation')
|
||||||
= link_to 'En savoir plus', FAQ_AUTOSAVE_URL, target: '_blank', rel: 'noopener', class: 'autosave-more-infos'
|
= link_to t('views.users.dossiers.autosave.more_information'), FAQ_AUTOSAVE_URL, target: '_blank', rel: 'noopener', class: 'autosave-more-infos'
|
||||||
|
|
||||||
%p.autosave-status.failed
|
%p.autosave-status.failed
|
||||||
%span.autosave-icon ⚠️
|
%span.autosave-icon ⚠️
|
||||||
|
|
|
@ -12,16 +12,15 @@
|
||||||
|
|
||||||
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
|
= render(partial: 'users/dossiers/expiration_banner', locals: {dossier: dossier})
|
||||||
|
|
||||||
- if (current_user.owns?(dossier) && !dossier.procedure.discarded?) || (!dossier.procedure.discarded? && !dossier.procedure.close? && !dossier.en_construction?)
|
- if dossier.show_procedure_state_warning?
|
||||||
|
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
||||||
|
- elsif current_user.owns?(dossier)
|
||||||
.header-actions
|
.header-actions
|
||||||
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
= render partial: 'invites/dropdown', locals: { dossier: dossier }
|
||||||
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
||||||
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'button accepted edit-form', 'title'=> "Vous pouvez modifier votre dossier tant qu'il n'est passé en instruction"
|
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'button accepted edit-form', 'title'=> "Vous pouvez modifier votre dossier tant qu'il n'est passé en instruction"
|
||||||
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
||||||
|
|
||||||
- else
|
|
||||||
= render(partial: 'users/dossiers/procedure_removed_banner', locals: { dossier: dossier })
|
|
||||||
|
|
||||||
%nav.tabs
|
%nav.tabs
|
||||||
%ul
|
%ul
|
||||||
= dynamic_tab_item(t('views.users.dossiers.show.header.summary'), dossier_path(dossier))
|
= dynamic_tab_item(t('views.users.dossiers.show.header.summary'), dossier_path(dossier))
|
||||||
|
|
|
@ -44,9 +44,12 @@ en:
|
||||||
subject: Subject
|
subject: Subject
|
||||||
message: Message
|
message: Message
|
||||||
send_mail: Send message
|
send_mail: Send message
|
||||||
|
procedure: Procedures
|
||||||
helpers:
|
helpers:
|
||||||
procedure:
|
procedure:
|
||||||
testing_procedure: testing procedure
|
testing_procedure: testing procedure
|
||||||
|
close: Closed
|
||||||
|
unpublished: Unpublished
|
||||||
commentaire:
|
commentaire:
|
||||||
send_message_to_instructeur: "Send a message to the instructor"
|
send_message_to_instructeur: "Send a message to the instructor"
|
||||||
reply_in_mailbox: "Reply in mailbox"
|
reply_in_mailbox: "Reply in mailbox"
|
||||||
|
@ -138,11 +141,38 @@ en:
|
||||||
edit_identity: "Edit identity data"
|
edit_identity: "Edit identity data"
|
||||||
instructeurs:
|
instructeurs:
|
||||||
dossiers:
|
dossiers:
|
||||||
|
tab_steps:
|
||||||
|
to_follow: to follow
|
||||||
|
total: total
|
||||||
|
request: Request
|
||||||
|
private_annotations: Private annotations
|
||||||
|
external_opinion: External opininon
|
||||||
|
messaging: Messaging
|
||||||
|
involved_persons: Involved persons
|
||||||
|
tab_explainations:
|
||||||
|
a_suivre: No instructor is assigned to follow up on these files. Be the first !
|
||||||
|
suivis: The folders that are in this tab are only those that you follow. You can exchange with the requester until you can accept them, refuse them or classify them without follow-up.
|
||||||
|
traites: "The files in this tab are finished: they have been accepted, refused or closed without follow-up."
|
||||||
|
tous: All the files that have been submitted on this approach, regardless of the status.
|
||||||
|
supprimes_recemment: All files completed and deleted by the instructors on this approach.
|
||||||
|
archives: "The files in this tab are archived: you can no longer reply to them, and requesters can no longer modify them."
|
||||||
|
expirant: Records will not expire prior to the data retention period.
|
||||||
archived_dossier: "This file will be kept for an additional month"
|
archived_dossier: "This file will be kept for an additional month"
|
||||||
delete_dossier: "Delete file"
|
delete_dossier: "Delete file"
|
||||||
deleted_by_user: "File deleted by user"
|
deleted_by_user: "File deleted by user"
|
||||||
deleted_by_administration: "File deleted by administration"
|
deleted_by_administration: "File deleted by administration"
|
||||||
restore: "Restore"
|
restore: "Restore"
|
||||||
|
filters:
|
||||||
|
column: Column
|
||||||
|
value: Value
|
||||||
|
add_filter: Add filter
|
||||||
|
title: Filter
|
||||||
|
personalize: Personalize
|
||||||
|
follow_file: Follow-up the file
|
||||||
|
save: Save
|
||||||
|
stop_follow: No longer follow
|
||||||
|
no_file: No file
|
||||||
|
dossier_synthesis: Summary of files
|
||||||
avis:
|
avis:
|
||||||
introduction_file_explaination: "File attached to the request for advice"
|
introduction_file_explaination: "File attached to the request for advice"
|
||||||
users:
|
users:
|
||||||
|
@ -150,9 +180,14 @@ en:
|
||||||
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
|
archived_dossier: "Your file will be kept %{duree_conservation_dossiers_dans_ds} more months"
|
||||||
autosave:
|
autosave:
|
||||||
autosave_draft: Your draft is automatically saved.
|
autosave_draft: Your draft is automatically saved.
|
||||||
more_infos: More informations
|
autosave_confirmation: Draft saved
|
||||||
|
more_information: More informations
|
||||||
identite:
|
identite:
|
||||||
identity_data: Identity data
|
identity_data: Identity data
|
||||||
|
civility: Civility
|
||||||
|
first_name: First Name
|
||||||
|
last_name: Last Name
|
||||||
|
birthdate: Date de naissance
|
||||||
complete_data: Please complete your personal information to access the procedure.
|
complete_data: Please complete your personal information to access the procedure.
|
||||||
continue: Continue
|
continue: Continue
|
||||||
merci:
|
merci:
|
||||||
|
@ -192,6 +227,8 @@ en:
|
||||||
mailbox: "The mailbox allows you to contact the instructor in charge of your file."
|
mailbox: "The mailbox allows you to contact the instructor in charge of your file."
|
||||||
demande:
|
demande:
|
||||||
edit_dossier: "Edit file"
|
edit_dossier: "Edit file"
|
||||||
|
search:
|
||||||
|
search_file: Search a file
|
||||||
index:
|
index:
|
||||||
dossiers: "Files"
|
dossiers: "Files"
|
||||||
dossiers_list:
|
dossiers_list:
|
||||||
|
@ -422,6 +459,8 @@ en:
|
||||||
deleted_by_instructeur: "The folder has been deleted"
|
deleted_by_instructeur: "The folder has been deleted"
|
||||||
impossible_deletion: "Unable to delete : the folder is not processed"
|
impossible_deletion: "Unable to delete : the folder is not processed"
|
||||||
restore: "The folder has been restored"
|
restore: "The folder has been restored"
|
||||||
|
labels:
|
||||||
|
to_follow: to follow
|
||||||
france_connect:
|
france_connect:
|
||||||
particulier:
|
particulier:
|
||||||
password_confirmation:
|
password_confirmation:
|
||||||
|
|
|
@ -35,9 +35,12 @@ fr:
|
||||||
subject: Sujet
|
subject: Sujet
|
||||||
message: Message
|
message: Message
|
||||||
send_mail: Envoyer le message
|
send_mail: Envoyer le message
|
||||||
|
procedure: Démarches
|
||||||
helpers:
|
helpers:
|
||||||
procedure:
|
procedure:
|
||||||
testing_procedure: démarche en test
|
testing_procedure: démarche en test
|
||||||
|
close: Close
|
||||||
|
unpublished: Dépubliée
|
||||||
commentaire:
|
commentaire:
|
||||||
send_message_to_instructeur: "Envoyer un message à l’instructeur"
|
send_message_to_instructeur: "Envoyer un message à l’instructeur"
|
||||||
reply_in_mailbox: "Répondre dans la messagerie."
|
reply_in_mailbox: "Répondre dans la messagerie."
|
||||||
|
@ -55,7 +58,6 @@ fr:
|
||||||
access: Consulter mon dossier
|
access: Consulter mon dossier
|
||||||
question: J’ai une question
|
question: J’ai une question
|
||||||
reply: Répondre à ce message
|
reply: Répondre à ce message
|
||||||
|
|
||||||
views:
|
views:
|
||||||
commencer:
|
commencer:
|
||||||
show:
|
show:
|
||||||
|
@ -135,11 +137,39 @@ fr:
|
||||||
edit_identity: "Modifier l’identité"
|
edit_identity: "Modifier l’identité"
|
||||||
instructeurs:
|
instructeurs:
|
||||||
dossiers:
|
dossiers:
|
||||||
|
tab_steps:
|
||||||
|
to_follow: à suivre
|
||||||
|
total: au total
|
||||||
|
request: Demande
|
||||||
|
private_annotations: Annotations privées
|
||||||
|
external_opinion: Avis externes
|
||||||
|
messaging: Messagerie
|
||||||
|
involved_persons: Personnes impliquées
|
||||||
|
tab_explainations:
|
||||||
|
a_suivre: Aucun instructeur n’est affecté au suivi de ces dossiers. Soyez le premier !
|
||||||
|
suivis: Les dossiers qui sont dans cet onglet sont uniquement ceux que vous suivez. Vous pouvez échanger avec le demandeur jusqu'à pouvoir les accepter, les refuser ou les classer sans suite.
|
||||||
|
traites: "Les dossiers dans cet onglet sont terminés : ils ont été acceptés, refusés ou classés sans suite."
|
||||||
|
tous: Tous les dossiers qui ont été déposés sur cette démarche, quel que soit le statut.
|
||||||
|
supprimes_recemment: Tous les dossiers terminés et supprimés par les instructeurs sur cette démarche
|
||||||
|
archives: "Les dossiers de cet onglet sont archivés : vous ne pouvez plus y répondre, et les demandeurs ne peuvent plus les modifier."
|
||||||
|
expirant: Les dossiers n'expireront pas avant la période de conservation des données.
|
||||||
archived_dossier: "Le dossier sera conservé 1 mois supplémentaire"
|
archived_dossier: "Le dossier sera conservé 1 mois supplémentaire"
|
||||||
delete_dossier: "Supprimer le dossier"
|
delete_dossier: "Supprimer le dossier"
|
||||||
deleted_by_user: "Dossier supprimé par l'usager"
|
deleted_by_user: "Dossier supprimé par l'usager"
|
||||||
deleted_by_administration: "Dossier supprimé par l'administration"
|
deleted_by_administration: "Dossier supprimé par l'administration"
|
||||||
restore: "Restaurer"
|
restore: "Restaurer"
|
||||||
|
filters:
|
||||||
|
column: Colonne
|
||||||
|
value: Valeur
|
||||||
|
add_filter: Ajouter le filtre
|
||||||
|
title: Filtrer
|
||||||
|
personalize: Personnaliser
|
||||||
|
download: Télécharger un dossier
|
||||||
|
follow_file: Suivre le dossier
|
||||||
|
stop_follow: Ne plus suivre
|
||||||
|
save: Enregistrer
|
||||||
|
no_file: Aucun dossier
|
||||||
|
dossier_synthesis: Synthèse des dossiers
|
||||||
avis:
|
avis:
|
||||||
introduction_file_explaination: "Fichier joint à la demande d’avis"
|
introduction_file_explaination: "Fichier joint à la demande d’avis"
|
||||||
users:
|
users:
|
||||||
|
@ -147,9 +177,15 @@ fr:
|
||||||
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
|
archived_dossier: "Votre dossier sera conservé %{duree_conservation_dossiers_dans_ds} mois supplémentaire"
|
||||||
autosave:
|
autosave:
|
||||||
autosave_draft: Votre brouillon est automatiquement enregistré.
|
autosave_draft: Votre brouillon est automatiquement enregistré.
|
||||||
|
autosave_confirmation: Brouillon enregistré
|
||||||
|
more_information: More informations
|
||||||
more_infos: En savoir plus
|
more_infos: En savoir plus
|
||||||
identite:
|
identite:
|
||||||
identity_data: Données d’identité
|
identity_data: Données d’identité
|
||||||
|
civility: Civilité
|
||||||
|
first_name: Prénom
|
||||||
|
last_name: Nom
|
||||||
|
birthdate: Date de naissance
|
||||||
complete_data: Merci de remplir vos informations personnelles pour accéder à la démarche.
|
complete_data: Merci de remplir vos informations personnelles pour accéder à la démarche.
|
||||||
continue: Continuer
|
continue: Continuer
|
||||||
merci:
|
merci:
|
||||||
|
@ -189,6 +225,8 @@ fr:
|
||||||
mailbox: "La messagerie vous permet de contacter l’instructeur en charge de votre dossier."
|
mailbox: "La messagerie vous permet de contacter l’instructeur en charge de votre dossier."
|
||||||
demande:
|
demande:
|
||||||
edit_dossier: "Modifier le dossier"
|
edit_dossier: "Modifier le dossier"
|
||||||
|
search:
|
||||||
|
search_file: Rechercher un dossier
|
||||||
index:
|
index:
|
||||||
dossiers: "Dossiers"
|
dossiers: "Dossiers"
|
||||||
dossiers_list:
|
dossiers_list:
|
||||||
|
@ -430,6 +468,9 @@ fr:
|
||||||
deleted_by_instructeur: "Le dossier a bien été supprimé de votre interface"
|
deleted_by_instructeur: "Le dossier a bien été supprimé de votre interface"
|
||||||
impossible_deletion: "Supression impossible : le dossier n'est pas traité"
|
impossible_deletion: "Supression impossible : le dossier n'est pas traité"
|
||||||
restore: "Le dossier a bien été restauré"
|
restore: "Le dossier a bien été restauré"
|
||||||
|
labels:
|
||||||
|
to_follow: à suivre
|
||||||
|
total: dossiers
|
||||||
administrateurs:
|
administrateurs:
|
||||||
procedures:
|
procedures:
|
||||||
show:
|
show:
|
||||||
|
|
20
config/locales/models/dossier/en.yml
Normal file
20
config/locales/models/dossier/en.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
en:
|
||||||
|
activerecord:
|
||||||
|
models:
|
||||||
|
dossier:
|
||||||
|
one: "File"
|
||||||
|
other: "Files"
|
||||||
|
attributes:
|
||||||
|
dossier:
|
||||||
|
state: "State"
|
||||||
|
dossier/state: &state
|
||||||
|
brouillon: "Draft"
|
||||||
|
en_construction: "In progress"
|
||||||
|
en_instruction: "Processing"
|
||||||
|
accepte: "Accepted"
|
||||||
|
refuse: "Refused"
|
||||||
|
sans_suite: "No further action"
|
||||||
|
traitement:
|
||||||
|
state: "State"
|
||||||
|
traitement/state:
|
||||||
|
<<: *state
|
32
config/locales/models/procedure_presentation/en.yml
Normal file
32
config/locales/models/procedure_presentation/en.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
fr:
|
||||||
|
activerecord:
|
||||||
|
attributes:
|
||||||
|
procedure_presentation:
|
||||||
|
fields:
|
||||||
|
self:
|
||||||
|
id: File Nº
|
||||||
|
state: State
|
||||||
|
created_at: Created on
|
||||||
|
en_construction_at: En construction le
|
||||||
|
depose_at: Submitted on
|
||||||
|
updated_at: Updated on
|
||||||
|
user:
|
||||||
|
email: Requester
|
||||||
|
followers_instructeurs:
|
||||||
|
email: Email instructeur
|
||||||
|
groupe_instructeur:
|
||||||
|
label: Team
|
||||||
|
individual:
|
||||||
|
prenom: First name
|
||||||
|
nom: Last name
|
||||||
|
gender: Title
|
||||||
|
etablissement:
|
||||||
|
entreprise_siren: SIREN
|
||||||
|
entreprise_forme_juridique: Forme juridique
|
||||||
|
entreprise_nom_commercial: Commercial name
|
||||||
|
entreprise_raison_sociale: Raison sociale
|
||||||
|
entreprise_siret_siege_social: SIRET siège social
|
||||||
|
entreprise_date_creation: Creation date
|
||||||
|
siret: SIRET
|
||||||
|
libelle_naf: Libellé NAF
|
||||||
|
code_postal: Postal code
|
32
config/locales/models/procedure_presentation/fr.yml
Normal file
32
config/locales/models/procedure_presentation/fr.yml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
fr:
|
||||||
|
activerecord:
|
||||||
|
attributes:
|
||||||
|
procedure_presentation:
|
||||||
|
fields:
|
||||||
|
self:
|
||||||
|
id: Nº dossier
|
||||||
|
state: Statut
|
||||||
|
created_at: Créé le
|
||||||
|
en_construction_at: En construction le
|
||||||
|
depose_at: Déposé le
|
||||||
|
updated_at: Mis à jour le
|
||||||
|
user:
|
||||||
|
email: Demandeur
|
||||||
|
followers_instructeurs:
|
||||||
|
email: Email instructeur
|
||||||
|
groupe_instructeur:
|
||||||
|
label: Groupe instructeur
|
||||||
|
individual:
|
||||||
|
prenom: Prénom
|
||||||
|
nom: Nom
|
||||||
|
gender: Civilité
|
||||||
|
etablissement:
|
||||||
|
entreprise_siren: SIREN
|
||||||
|
entreprise_forme_juridique: Forme juridique
|
||||||
|
entreprise_nom_commercial: Nom commercial
|
||||||
|
entreprise_raison_sociale: Raison sociale
|
||||||
|
entreprise_siret_siege_social: SIRET siège social
|
||||||
|
entreprise_date_creation: Date de création
|
||||||
|
siret: SIRET
|
||||||
|
libelle_naf: Libellé NAF
|
||||||
|
code_postal: Code postal
|
5
config/locales/views/instructeurs/en.yml
Normal file
5
config/locales/views/instructeurs/en.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
en:
|
||||||
|
instructeurs:
|
||||||
|
procedure:
|
||||||
|
archive_pending_html: Archive creation pending<br>(requested %{created_period} ago)
|
||||||
|
archive_ready_html: Download archive<br>(requested %{generated_period} ago)
|
|
@ -1,20 +1,6 @@
|
||||||
fr:
|
fr:
|
||||||
instructeurs:
|
instructeurs:
|
||||||
procedure:
|
procedure:
|
||||||
export_stale:
|
|
||||||
everything_short: Demander un export au format %{export_format}
|
|
||||||
everything_csv_html: Demander un export au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
|
||||||
everything_xlsx_html: Demander un export au format .xlsx
|
|
||||||
everything_ods_html: Demander un export au format .ods
|
|
||||||
monthly_short: Demander un export des 30 derniers jours au format %{export_format}
|
|
||||||
monthly_csv_html: Demander un export des 30 derniers jours au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
|
||||||
monthly_xlsx_html: Demander un export des 30 derniers jours au format .xlsx
|
|
||||||
monthly_ods_html: Demander un export des 30 derniers jours au format .ods
|
|
||||||
export_everything_ready_html: Télécharger l’export au format %{export_format}<br>(généré il y a %{export_time})
|
|
||||||
export_everything_pending_html: Un export au format %{export_format} est en train d’être généré<br>(demandé il y a %{export_time})
|
|
||||||
export_monthly_ready_html: Télécharger l’export des 30 derniers jours au format %{export_format}<br>(généré il y a %{export_time})
|
|
||||||
export_monthly_pending_html: Un export des 30 derniers jours au format %{export_format} est en train d’être généré<br>(demandé il y a %{export_time})
|
|
||||||
download_archive: Télécharger une archive au format .zip de tous les dossiers et leurs pièces jointes
|
|
||||||
archive_pending_html: Archive en cours de création<br>(demandée il y a %{created_period})
|
archive_pending_html: Archive en cours de création<br>(demandée il y a %{created_period})
|
||||||
archive_ready_html: Télécharger l’archive<br>(demandée il y a %{generated_period})
|
archive_ready_html: Télécharger l’archive<br>(demandée il y a %{generated_period})
|
||||||
dossiers:
|
dossiers:
|
||||||
|
|
|
@ -10,3 +10,7 @@ en:
|
||||||
en_construction: This file is pending for instruction. The maximum delay is 6 months, you can extend the duration by a month by clicking on the underneath button.
|
en_construction: This file is pending for instruction. The maximum delay is 6 months, you can extend the duration by a month by clicking on the underneath button.
|
||||||
termine: This file had been processed and will soon expire. So it will be deleted soon. If you want to keep it, you can dowload a PDF file of it.
|
termine: This file had been processed and will soon expire. So it will be deleted soon. If you want to keep it, you can dowload a PDF file of it.
|
||||||
button_delay_expiration: "Keep for one more month"
|
button_delay_expiration: "Keep for one more month"
|
||||||
|
notification_management: notification management
|
||||||
|
statistics: statistics
|
||||||
|
instructeurs: instructors
|
||||||
|
contact_users: contact users (draft)
|
||||||
|
|
|
@ -10,3 +10,7 @@ fr:
|
||||||
en_construction: Ce dossier est en attente de prise en charge. Vous pouvez toutefois entendre cette durée d'un mois en cliquant sur le bouton suivant.
|
en_construction: Ce dossier est en attente de prise en charge. Vous pouvez toutefois entendre cette durée d'un mois en cliquant sur le bouton suivant.
|
||||||
termine: Le traitement de ce dossier est terminé, mais il va bientôt expirer. Cela signifie qu’il va bientôt être supprimé. Si vous souhaitez conserver une trace, vous pouvez le télécharger au format PDF.
|
termine: Le traitement de ce dossier est terminé, mais il va bientôt expirer. Cela signifie qu’il va bientôt être supprimé. Si vous souhaitez conserver une trace, vous pouvez le télécharger au format PDF.
|
||||||
button_delay_expiration: "Conserver un mois de plus"
|
button_delay_expiration: "Conserver un mois de plus"
|
||||||
|
notification_management: gestion des notifications
|
||||||
|
statistics: statistiques
|
||||||
|
instructeurs: instructeurs
|
||||||
|
contact_users: contacter les usagers (brouillon)
|
||||||
|
|
37
config/locales/views/instructeurs/procedures/en.yml
Normal file
37
config/locales/views/instructeurs/procedures/en.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
en:
|
||||||
|
instructeurs:
|
||||||
|
procedures:
|
||||||
|
index:
|
||||||
|
to_follow: to follow
|
||||||
|
followed: followed
|
||||||
|
processed: processed
|
||||||
|
all: files
|
||||||
|
archived: archived
|
||||||
|
dossiers_close_to_expiration: expiring
|
||||||
|
dossiers_supprimes_recemment: recently deleted
|
||||||
|
dossiers_export:
|
||||||
|
everything_csv_html: Ask an export in format .csv<br>(only folders, without repeatable fields)
|
||||||
|
everything_xlsx_html: Ask an export in format .xlsx
|
||||||
|
everything_ods_html: Ask an export in format .ods
|
||||||
|
everything_zip_html: Ask an export in format .zip
|
||||||
|
everything_short: Ask an export in format%{export_format}
|
||||||
|
everything_pending_html: Ask an export in format %{export_format} is being generated<br>(ask %{export_time} ago)
|
||||||
|
everything_ready_html: Download the export in format %{export_format}<br>(generated %{export_time} ago)
|
||||||
|
download:
|
||||||
|
one: Download a file
|
||||||
|
other: Download %{count} files
|
||||||
|
download_dossiers:
|
||||||
|
everything_short: Ask an export in format %{export_format}
|
||||||
|
everything_csv_html: Ask an export in format .csv<br>(only folders, without repeatable fields)
|
||||||
|
everything_xlsx_html: Ask an export in format .xlsx
|
||||||
|
everything_ods_html: Ask an export in format .ods
|
||||||
|
monthly_short: Request an export of the last 30 days in the format %{export_format}
|
||||||
|
monthly_csv_html: Request an export of the last 30 days in the format .csv<br>(only folders, without repeatable fields)
|
||||||
|
monthly_xlsx_html: Request an export of the last 30 days in the format .xlsx
|
||||||
|
monthly_ods_html: Request an export of the last 30 days in the format .ods
|
||||||
|
export_everything_ready_html: Download the export in the format %{export_format}<br>(generated %{export_time} ago)
|
||||||
|
export_everything_pending_html: An export in the format %{export_format} is being generated<br>(asked %{export_time} ago)
|
||||||
|
export_monthly_ready_html: Request an export of the last 30 days in the format %{export_format}<br>(generated %{export_time} ago)
|
||||||
|
export_monthly_pending_html: An export of the last 30 days in the format %{export_format} is being generated<br>(asked %{export_time} ago)
|
||||||
|
download_archive: Download a .zip archive of all files and their attachments
|
||||||
|
download: Download all files
|
|
@ -1,6 +1,14 @@
|
||||||
fr:
|
fr:
|
||||||
instructeurs:
|
instructeurs:
|
||||||
procedures:
|
procedures:
|
||||||
|
index:
|
||||||
|
to_follow: à suivre
|
||||||
|
followed: suivis
|
||||||
|
processed: traités
|
||||||
|
all: dossiers
|
||||||
|
archived: archivés
|
||||||
|
dossiers_close_to_expiration: expirant
|
||||||
|
dossiers_supprimes_recemment: supprimés
|
||||||
dossiers_export:
|
dossiers_export:
|
||||||
everything_csv_html: Demander un export au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
everything_csv_html: Demander un export au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
||||||
everything_xlsx_html: Demander un export au format .xlsx
|
everything_xlsx_html: Demander un export au format .xlsx
|
||||||
|
@ -12,3 +20,18 @@ fr:
|
||||||
download:
|
download:
|
||||||
one: Télécharger un dossier
|
one: Télécharger un dossier
|
||||||
other: Télécharger %{count} dossiers
|
other: Télécharger %{count} dossiers
|
||||||
|
download_dossiers:
|
||||||
|
everything_short: Demander un export au format %{export_format}
|
||||||
|
everything_csv_html: Demander un export au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
||||||
|
everything_xlsx_html: Demander un export au format .xlsx
|
||||||
|
everything_ods_html: Demander un export au format .ods
|
||||||
|
monthly_short: Demander un export des 30 derniers jours au format %{export_format}
|
||||||
|
monthly_csv_html: Demander un export des 30 derniers jours au format .csv<br>(uniquement les dossiers, sans les champs répétables)
|
||||||
|
monthly_xlsx_html: Demander un export des 30 derniers jours au format .xlsx
|
||||||
|
monthly_ods_html: Demander un export des 30 derniers jours au format .ods
|
||||||
|
export_everything_ready_html: Télécharger l’export au format %{export_format}<br>(généré il y a %{export_time})
|
||||||
|
export_everything_pending_html: Un export au format %{export_format} est en train d’être généré<br>(demandé il y a %{export_time})
|
||||||
|
export_monthly_ready_html: Télécharger l’export des 30 derniers jours au format %{export_format}<br>(généré il y a %{export_time})
|
||||||
|
export_monthly_pending_html: Un export des 30 derniers jours au format %{export_format} est en train d’être généré<br>(demandé il y a %{export_time})
|
||||||
|
download_archive: Télécharger une archive au format .zip de tous les dossiers et leurs pièces jointes
|
||||||
|
download: Télécharger tous les dossiers
|
||||||
|
|
|
@ -58,26 +58,26 @@ describe ProcedurePresentation do
|
||||||
let(:tdc_private_2) { procedure.types_de_champ_private[1] }
|
let(:tdc_private_2) { procedure.types_de_champ_private[1] }
|
||||||
let(:expected) {
|
let(:expected) {
|
||||||
[
|
[
|
||||||
{ "label" => 'Créé le', "table" => 'self', "column" => 'created_at' },
|
{ "label" => 'Créé le', "table" => 'self', "column" => 'created_at', 'classname' => '' },
|
||||||
{ "label" => 'En construction le', "table" => 'self', "column" => 'en_construction_at' },
|
{ "label" => 'En construction le', "table" => 'self', "column" => 'en_construction_at', 'classname' => '' },
|
||||||
{ "label" => 'Déposé le', "table" => 'self', "column" => 'depose_at' },
|
{ "label" => 'Déposé le', "table" => 'self', "column" => 'depose_at', 'classname' => '' },
|
||||||
{ "label" => 'Mis à jour le', "table" => 'self', "column" => 'updated_at' },
|
{ "label" => 'Mis à jour le', "table" => 'self', "column" => 'updated_at', 'classname' => '' },
|
||||||
{ "label" => 'Demandeur', "table" => 'user', "column" => 'email' },
|
{ "label" => 'Demandeur', "table" => 'user', "column" => 'email', 'classname' => '' },
|
||||||
{ "label" => 'Email instructeur', "table" => 'followers_instructeurs', "column" => 'email' },
|
{ "label" => 'Email instructeur', "table" => 'followers_instructeurs', "column" => 'email', 'classname' => '' },
|
||||||
{ "label" => 'Groupe instructeur', "table" => 'groupe_instructeur', "column" => 'label' },
|
{ "label" => 'Groupe instructeur', "table" => 'groupe_instructeur', "column" => 'label', 'classname' => '' },
|
||||||
{ "label" => 'SIREN', "table" => 'etablissement', "column" => 'entreprise_siren' },
|
{ "label" => 'SIREN', "table" => 'etablissement', "column" => 'entreprise_siren', 'classname' => '' },
|
||||||
{ "label" => 'Forme juridique', "table" => 'etablissement', "column" => 'entreprise_forme_juridique' },
|
{ "label" => 'Forme juridique', "table" => 'etablissement', "column" => 'entreprise_forme_juridique', 'classname' => '' },
|
||||||
{ "label" => 'Nom commercial', "table" => 'etablissement', "column" => 'entreprise_nom_commercial' },
|
{ "label" => 'Nom commercial', "table" => 'etablissement', "column" => 'entreprise_nom_commercial', 'classname' => '' },
|
||||||
{ "label" => 'Raison sociale', "table" => 'etablissement', "column" => 'entreprise_raison_sociale' },
|
{ "label" => 'Raison sociale', "table" => 'etablissement', "column" => 'entreprise_raison_sociale', 'classname' => '' },
|
||||||
{ "label" => 'SIRET siège social', "table" => 'etablissement', "column" => 'entreprise_siret_siege_social' },
|
{ "label" => 'SIRET siège social', "table" => 'etablissement', "column" => 'entreprise_siret_siege_social', 'classname' => '' },
|
||||||
{ "label" => 'Date de création', "table" => 'etablissement', "column" => 'entreprise_date_creation' },
|
{ "label" => 'Date de création', "table" => 'etablissement', "column" => 'entreprise_date_creation', 'classname' => '' },
|
||||||
{ "label" => 'SIRET', "table" => 'etablissement', "column" => 'siret' },
|
{ "label" => 'SIRET', "table" => 'etablissement', "column" => 'siret', 'classname' => '' },
|
||||||
{ "label" => 'Libellé NAF', "table" => 'etablissement', "column" => 'libelle_naf' },
|
{ "label" => 'Libellé NAF', "table" => 'etablissement', "column" => 'libelle_naf', 'classname' => '' },
|
||||||
{ "label" => 'Code postal', "table" => 'etablissement', "column" => 'code_postal' },
|
{ "label" => 'Code postal', "table" => 'etablissement', "column" => 'code_postal', 'classname' => '' },
|
||||||
{ "label" => tdc_1.libelle, "table" => 'type_de_champ', "column" => tdc_1.stable_id.to_s },
|
{ "label" => tdc_1.libelle, "table" => 'type_de_champ', "column" => tdc_1.stable_id.to_s, 'classname' => '' },
|
||||||
{ "label" => tdc_2.libelle, "table" => 'type_de_champ', "column" => tdc_2.stable_id.to_s },
|
{ "label" => tdc_2.libelle, "table" => 'type_de_champ', "column" => tdc_2.stable_id.to_s, 'classname' => '' },
|
||||||
{ "label" => tdc_private_1.libelle, "table" => 'type_de_champ_private', "column" => tdc_private_1.stable_id.to_s },
|
{ "label" => tdc_private_1.libelle, "table" => 'type_de_champ_private', "column" => tdc_private_1.stable_id.to_s, 'classname' => '' },
|
||||||
{ "label" => tdc_private_2.libelle, "table" => 'type_de_champ_private', "column" => tdc_private_2.stable_id.to_s }
|
{ "label" => tdc_private_2.libelle, "table" => 'type_de_champ_private', "column" => tdc_private_2.stable_id.to_s, 'classname' => '' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ describe ProcedurePresentation do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the procedure is for individuals' do
|
context 'when the procedure is for individuals' do
|
||||||
let(:name_field) { { "label" => "Prénom", "table" => "individual", "column" => "prenom" } }
|
let(:name_field) { { "label" => "Prénom", "table" => "individual", "column" => "prenom", 'classname' => '' } }
|
||||||
let(:surname_field) { { "label" => "Nom", "table" => "individual", "column" => "nom" } }
|
let(:surname_field) { { "label" => "Nom", "table" => "individual", "column" => "nom", 'classname' => '' } }
|
||||||
let(:gender_field) { { "label" => "Civilité", "table" => "individual", "column" => "gender" } }
|
let(:gender_field) { { "label" => "Civilité", "table" => "individual", "column" => "gender", 'classname' => '' } }
|
||||||
let(:procedure) { create(:procedure, :for_individual) }
|
let(:procedure) { create(:procedure, :for_individual) }
|
||||||
let(:procedure_presentation) { create(:procedure_presentation, assign_to: assign_to) }
|
let(:procedure_presentation) { create(:procedure_presentation, assign_to: assign_to) }
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
describe 'dossiers/show/header.html.haml', type: :view do
|
describe 'dossiers/show/header.html.haml', type: :view do
|
||||||
let(:procedure) { create(:procedure, :discarded) }
|
let(:procedure) { create(:procedure, :discarded) }
|
||||||
let(:dossier) { create(:dossier, state: "brouillon", procedure: procedure) }
|
let(:dossier) { create(:dossier, state: "brouillon", procedure: procedure) }
|
||||||
|
let(:user) { dossier.user }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in dossier.user
|
sign_in user
|
||||||
end
|
end
|
||||||
|
|
||||||
subject! { render 'shared/dossiers/header.html.haml', dossier: dossier }
|
subject! { render 'shared/dossiers/header.html.haml', dossier: dossier }
|
||||||
|
@ -31,4 +32,24 @@ describe 'dossiers/show/header.html.haml', type: :view do
|
||||||
expect(rendered).not_to have_text("Tout le dossier")
|
expect(rendered).not_to have_text("Tout le dossier")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when user is invited" do
|
||||||
|
context "when the procedure is closed with a dossier en construction" do
|
||||||
|
let(:procedure) { create(:procedure, :closed) }
|
||||||
|
let(:dossier) { create(:dossier, :en_construction, procedure: procedure) }
|
||||||
|
let(:user) { create(:user) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
create(:invite, user: user, dossier: dossier)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "n'affiche pas de banner" do
|
||||||
|
expect(rendered).not_to have_text("La démarche liée à votre dossier est close")
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'can not download the dossier' do
|
||||||
|
expect(rendered).not_to have_text("Tout le dossier")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
describe 'users/dossiers/show/header.html.haml', type: :view do
|
describe 'users/dossiers/show/header.html.haml', type: :view do
|
||||||
let(:dossier) { create(:dossier, :en_construction, procedure: create(:procedure)) }
|
let(:dossier) { create(:dossier, :en_construction, procedure: create(:procedure)) }
|
||||||
|
let(:user) { dossier.user }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
sign_in dossier.user
|
sign_in user
|
||||||
end
|
end
|
||||||
|
|
||||||
subject! { render 'users/dossiers/show/header.html.haml', dossier: dossier }
|
subject! { render 'users/dossiers/show/header.html.haml', dossier: dossier }
|
||||||
|
@ -57,4 +58,24 @@ describe 'users/dossiers/show/header.html.haml', type: :view do
|
||||||
expect(rendered).to have_text("Tout le dossier")
|
expect(rendered).to have_text("Tout le dossier")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "when user is invited" do
|
||||||
|
context "when the procedure is closed with a dossier en construction" do
|
||||||
|
let(:procedure) { create(:procedure, :closed) }
|
||||||
|
let(:dossier) { create(:dossier, :en_construction, procedure: procedure) }
|
||||||
|
let(:user) { create(:user) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
create(:invite, user: user, dossier: dossier)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "n'affiche pas de banner" do
|
||||||
|
expect(rendered).not_to have_text("La démarche liée à votre dossier est close")
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'can not download the dossier' do
|
||||||
|
expect(rendered).not_to have_text("Tout le dossier")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue