feat(manager): add procedure_expires_when_termine_enabled to administrate
This commit is contained in:
parent
2778b42f1a
commit
a9413f9b12
4 changed files with 11 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue