diff --git a/app/dashboards/procedure_dashboard.rb b/app/dashboards/procedure_dashboard.rb index aaf0717db..992ea66b4 100644 --- a/app/dashboards/procedure_dashboard.rb +++ b/app/dashboards/procedure_dashboard.rb @@ -34,7 +34,8 @@ class ProcedureDashboard < Administrate::BaseDashboard closed_mail_template: MailTemplateField, refused_mail_template: MailTemplateField, without_continuation_mail_template: MailTemplateField, - attestation_template: AttestationTemplateField + attestation_template: AttestationTemplateField, + procedure_expires_when_termine_enabled: Field::Boolean }.freeze # COLLECTION_ATTRIBUTES @@ -79,13 +80,16 @@ class ProcedureDashboard < Administrate::BaseDashboard :closed_mail_template, :refused_mail_template, :without_continuation_mail_template, - :attestation_template + :attestation_template, + :procedure_expires_when_termine_enabled ].freeze # FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [].freeze + FORM_ATTRIBUTES = [ + :procedure_expires_when_termine_enabled + ].freeze # Overwrite this method to customize how procedures are displayed # across all pages of the admin dashboard. diff --git a/config/locales/views/instructeurs/header/en.yml b/config/locales/views/instructeurs/header/en.yml index 3eeebdbf7..bf30db1e0 100644 --- a/config/locales/views/instructeurs/header/en.yml +++ b/config/locales/views/instructeurs/header/en.yml @@ -3,7 +3,7 @@ en: dossiers: header: banner: - expiration_date_extended: " – la date de conservation a déjà été etendue" + expiration_date_extended: " – the expiration date had already been extended" title: This file will expire states: brouillon: "" # not applicable, instructeur does not see brouillons diff --git a/config/routes.rb b/config/routes.rb index f9b7d055f..27bd36ca1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,7 +10,7 @@ Rails.application.routes.draw do # namespace :manager do - resources :procedures, only: [:index, :show] do + resources :procedures, only: [:index, :show, :edit, :update] do post 'whitelist', on: :member post 'draft', on: :member post 'discard', on: :member diff --git a/spec/models/instructeur_spec.rb b/spec/models/instructeur_spec.rb index 874beb40a..7cdfd8304 100644 --- a/spec/models/instructeur_spec.rb +++ b/spec/models/instructeur_spec.rb @@ -719,8 +719,8 @@ describe Instructeur, type: :model do it { expect(subject['a_suivre']).to eq(0) } it { expect(subject['suivis']).to eq(0) } - it { expect(subject['traites']).to eq(1) } - it { expect(subject['tous']).to eq(1) } + it { expect(subject['traites']).to eq(2) } + it { expect(subject['tous']).to eq(2) } it { expect(subject['archives']).to eq(0) } it { expect(subject['expirant']).to eq(0) } end