diff --git a/Gemfile b/Gemfile index 6c50d0d32..b75222113 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ gem 'active_model_serializers' gem 'activestorage-openstack' gem 'active_storage_validations' gem 'administrate', git: 'https://github.com/thoughtbot/administrate.git', ref: 'refs/pull/1972/head' # Provides an administration UI (pull request #1972 has fixes for Rails 6.1.3.2) +gem 'administrate-field-enum' # Allow using Field::Enum in administrate gem 'after_party' gem 'anchored' gem 'bcrypt' diff --git a/Gemfile.lock b/Gemfile.lock index adf2a9b6e..1643c8608 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -102,6 +102,8 @@ GEM zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) + administrate-field-enum (0.0.9) + administrate (~> 0.12) aes_key_wrap (1.1.0) after_party (1.11.2) anchored (1.1.0) @@ -776,6 +778,7 @@ DEPENDENCIES active_storage_validations activestorage-openstack administrate! + administrate-field-enum after_party anchored annotate diff --git a/app/dashboards/dossier_dashboard.rb b/app/dashboards/dossier_dashboard.rb index 698106704..6c102b209 100644 --- a/app/dashboards/dossier_dashboard.rb +++ b/app/dashboards/dossier_dashboard.rb @@ -10,7 +10,7 @@ class DossierDashboard < Administrate::BaseDashboard ATTRIBUTE_TYPES = { id: Field::Number.with_options(searchable: true), procedure: Field::HasOne, - state: Field::String, + state: Field::Enum, user: Field::BelongsTo, text_summary: Field::String.with_options(searchable: false), created_at: Field::DateTime,