NewDesign: procedure show add dossier status
This commit is contained in:
parent
ad1a11ab52
commit
013f2463d1
5 changed files with 52 additions and 0 deletions
|
@ -7,3 +7,5 @@ $border-grey: #CCCCCC;
|
|||
$dark-red: #A94442;
|
||||
$light-red: #EBCCD1;
|
||||
$lighter-red: #F2DEDE;
|
||||
$green: #35D49E;
|
||||
$orange: #F59415;
|
||||
|
|
|
@ -133,6 +133,36 @@
|
|||
width: 200px;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: 110px;
|
||||
text-align: center;
|
||||
|
||||
&.instruction {
|
||||
background-color: #FFFFFF;
|
||||
color: $blue;
|
||||
border: 1px solid $blue;
|
||||
}
|
||||
|
||||
&.construction {
|
||||
background-color: #FFFFFF;
|
||||
color: $black;
|
||||
border: 1px solid $black;
|
||||
}
|
||||
|
||||
&.closed {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
&.refused {
|
||||
background-color: $dark-red;
|
||||
}
|
||||
|
||||
&.without-continuation {
|
||||
background-color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -217,6 +217,14 @@ class Dossier < ActiveRecord::Base
|
|||
BROUILLON.include?(state)
|
||||
end
|
||||
|
||||
def en_construction?
|
||||
EN_CONSTRUCTION.include?(state)
|
||||
end
|
||||
|
||||
def en_instruction?
|
||||
EN_INSTRUCTION.include?(state)
|
||||
end
|
||||
|
||||
def cerfa_available?
|
||||
procedure.cerfa_flag? && cerfa.size != 0
|
||||
end
|
||||
|
|
10
app/views/new_gestionnaire/procedures/_status.html.haml
Normal file
10
app/views/new_gestionnaire/procedures/_status.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- if dossier.en_instruction?
|
||||
%span.label.instruction en instruction
|
||||
- elsif dossier.en_construction?
|
||||
%span.label.construction nouveau
|
||||
- elsif dossier.closed?
|
||||
%span.label.closed accepté
|
||||
- elsif dossier.refused?
|
||||
%span.label.refused refusé
|
||||
- elsif dossier.without_continuation?
|
||||
%span.label.without-continuation sans suite
|
|
@ -45,6 +45,8 @@
|
|||
%td.number-col= link_to(dossier.id, backoffice_dossier_path(dossier), class: 'big-link')
|
||||
%td= link_to(dossier.user.email, backoffice_dossier_path(dossier), class: 'big-link')
|
||||
%td.status-col
|
||||
= link_to(backoffice_dossier_path(dossier), class: 'big-link') do
|
||||
= render partial: 'status', locals: { dossier: dossier }
|
||||
%td.follow-col
|
||||
- else
|
||||
%h2 Aucun dossier
|
||||
|
|
Loading…
Reference in a new issue