NewDesign: add dossier messagerie show
This commit is contained in:
parent
d5535aaaaa
commit
497f898e1b
5 changed files with 46 additions and 0 deletions
23
app/assets/stylesheets/new_design/dossier_messagerie.scss
Normal file
23
app/assets/stylesheets/new_design/dossier_messagerie.scss
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
@import "colors";
|
||||||
|
@import "common";
|
||||||
|
@import "constants";
|
||||||
|
|
||||||
|
#dossier-messagerie {
|
||||||
|
li {
|
||||||
|
margin-bottom: 2 * $default-padding;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-bottom: $default-spacer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mail {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-size: 12px;
|
||||||
|
color: $grey;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,6 +8,10 @@ module NewGestionnaire
|
||||||
@dossier = dossier
|
@dossier = dossier
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def messagerie
|
||||||
|
@dossier = dossier
|
||||||
|
end
|
||||||
|
|
||||||
def follow
|
def follow
|
||||||
current_gestionnaire.follow(dossier)
|
current_gestionnaire.follow(dossier)
|
||||||
dossier.next_step!('gestionnaire', 'follow')
|
dossier.next_step!('gestionnaire', 'follow')
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
- case commentaire.email
|
||||||
|
- when current_gestionnaire.email
|
||||||
|
Vous
|
||||||
|
- when 'contact@tps.apientreprise.fr'
|
||||||
|
Mail automatique
|
||||||
|
- else
|
||||||
|
commentaire.email
|
11
app/views/new_gestionnaire/dossiers/messagerie.html.haml
Normal file
11
app/views/new_gestionnaire/dossiers/messagerie.html.haml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
= render partial: "header", locals: { dossier: @dossier }
|
||||||
|
|
||||||
|
#dossier-messagerie.container
|
||||||
|
%ul
|
||||||
|
- @dossier.commentaires.each do |commentaire|
|
||||||
|
%li
|
||||||
|
%h2
|
||||||
|
%span.mail
|
||||||
|
= render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||||
|
%span.date= I18n.l(commentaire.created_at.localtime, format: '%d/%m/%y')
|
||||||
|
%p= sanitize(commentaire.body)
|
|
@ -242,6 +242,7 @@ Rails.application.routes.draw do
|
||||||
resources :dossiers, only: [:show], param: :dossier_id do
|
resources :dossiers, only: [:show], param: :dossier_id do
|
||||||
member do
|
member do
|
||||||
get 'attestation'
|
get 'attestation'
|
||||||
|
get 'messagerie'
|
||||||
patch 'follow'
|
patch 'follow'
|
||||||
patch 'unfollow'
|
patch 'unfollow'
|
||||||
patch 'archive'
|
patch 'archive'
|
||||||
|
|
Loading…
Reference in a new issue