commit
ffa5cf87e3
6 changed files with 37 additions and 6 deletions
|
@ -11,6 +11,7 @@ class DossierDashboard < Administrate::BaseDashboard
|
|||
id: Field::Number.with_options(searchable: true),
|
||||
procedure: Field::HasOne,
|
||||
state: Field::String,
|
||||
user: Field::BelongsTo,
|
||||
text_summary: Field::String.with_options(searchable: false),
|
||||
created_at: Field::DateTime,
|
||||
updated_at: Field::DateTime,
|
||||
|
@ -36,6 +37,7 @@ class DossierDashboard < Administrate::BaseDashboard
|
|||
:text_summary,
|
||||
:state,
|
||||
:procedure,
|
||||
:user,
|
||||
:types_de_champ,
|
||||
:created_at,
|
||||
:updated_at,
|
||||
|
|
|
@ -15,9 +15,13 @@
|
|||
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
||||
.flex.justify-between.align-baseline
|
||||
%p.confidentiel.flex
|
||||
%span.icon.lock
|
||||
%span
|
||||
Cet avis est confidentiel et n'est pas affiché aux autres experts consultés
|
||||
- if @avis.confidentiel?
|
||||
%span.icon.lock
|
||||
%span
|
||||
Cet avis est confidentiel et n'est pas affiché aux autres experts consultés
|
||||
- else
|
||||
%span
|
||||
Cet avis est partagé avec les autres experts
|
||||
.send-wrapper
|
||||
= f.submit 'Envoyer votre avis', class: 'button send'
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ task :deploy do
|
|||
invoke :'service:restart_puma'
|
||||
invoke :'service:reload_nginx'
|
||||
invoke :'service:restart_delayed_job'
|
||||
invoke :'deploy:cleanup'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class RemoveChampIdFromCommentaires < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
remove_column :commentaires, :champ_id
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2018_11_08_151929) do
|
||||
ActiveRecord::Schema.define(version: 2018_11_21_234008) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -188,9 +188,7 @@ ActiveRecord::Schema.define(version: 2018_11_08_151929) do
|
|||
t.integer "dossier_id"
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "piece_justificative_id"
|
||||
t.integer "champ_id"
|
||||
t.string "file"
|
||||
t.index ["champ_id"], name: "index_commentaires_on_champ_id"
|
||||
t.index ["dossier_id"], name: "index_commentaires_on_dossier_id"
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
describe 'new_gestionnaire/avis/instruction.html.haml', type: :view do
|
||||
let(:avis) { create(:avis, confidentiel: confidentiel) }
|
||||
|
||||
before do
|
||||
assign(:avis, avis)
|
||||
@dossier = create(:dossier, :accepte)
|
||||
allow(view).to receive(:current_gestionnaire).and_return(avis.gestionnaire)
|
||||
end
|
||||
|
||||
subject { render }
|
||||
|
||||
context 'with a confidential avis' do
|
||||
let(:confidentiel) { true }
|
||||
it { is_expected.to have_text("Cet avis est confidentiel et n'est pas affiché aux autres experts consultés") }
|
||||
end
|
||||
|
||||
context 'with a not confidential avis' do
|
||||
let(:confidentiel) { false }
|
||||
it { is_expected.to have_text("Cet avis est partagé avec les autres experts") }
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue