Wording
This commit is contained in:
parent
4de6a9595a
commit
a334888363
10 changed files with 25 additions and 24 deletions
|
@ -13,8 +13,11 @@ class AdminProceduresShowFacades
|
|||
|
||||
def dossiers_for_pie_highchart
|
||||
dossiers.where.not(state: :draft, archived: true).group(:state).count
|
||||
.map{|key, value| { (DossierDecorator.case_state_fr key) => value } }
|
||||
.reduce({}, :merge)
|
||||
.reduce({}) do |acc, (key, val)|
|
||||
translated_key = DossierDecorator.case_state_fr(key)
|
||||
acc[translated_key].nil? ? acc[translated_key] = val : acc[translated_key] += val
|
||||
acc
|
||||
end
|
||||
end
|
||||
|
||||
def dossiers_archived_by_state_total
|
||||
|
|
|
@ -15,15 +15,13 @@
|
|||
= smart_listing_render :new_dossiers
|
||||
|
||||
.row.center
|
||||
.col-xs-2.col-xs-offset-1
|
||||
.col-xs-3
|
||||
=link_to 'Tous les états', '?liste=all_state', class: 'text-info', style:"text-decoration: #{@facade_data_view.liste == 'all_state'? 'underline' : ''}"
|
||||
.col-xs-2
|
||||
.col-xs-3
|
||||
=link_to 'En construction', '?liste=a_traiter', class: 'text-danger', style:"text-decoration: #{@facade_data_view.liste == 'a_traiter'? 'underline' : ''}"
|
||||
.col-xs-2
|
||||
=link_to 'À receptionner', '?liste=deposes', class: 'text-purple', style:"text-decoration: #{@facade_data_view.liste == 'deposes'? 'underline' : ''}"
|
||||
.col-xs-2
|
||||
=link_to 'À instruire', '?liste=a_instruire', class: 'text-warning', style:"text-decoration: #{@facade_data_view.liste == 'a_instruire'? 'underline' : ''}"
|
||||
.col-xs-2
|
||||
.col-xs-3
|
||||
=link_to 'En instruction', '?liste=a_instruire', class: 'text-warning', style:"text-decoration: #{@facade_data_view.liste == 'a_instruire'? 'underline' : ''}"
|
||||
.col-xs-3
|
||||
=link_to 'Terminés', '?liste=termine', class: 'text-success', style:"text-decoration: #{@facade_data_view.liste == 'termine'? 'underline' : ''}"
|
||||
|
||||
.default_data_block.default_visible
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#action-block
|
||||
- if gestionnaire_signed_in?
|
||||
- if !@facade.dossier.read_only? || @facade.dossier.initiated?
|
||||
= link_to 'Accuser réception', backoffice_dossier_receive_path(@facade.dossier), method: :post, class: 'btn btn-danger btn-block'
|
||||
= link_to 'Passer en instruction', backoffice_dossier_receive_path(@facade.dossier), method: :post, class: 'btn btn-danger btn-block'
|
||||
|
||||
- elsif @facade.dossier.received?
|
||||
= form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
%a{:href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.'}
|
||||
%div.procedure_list_element{ class: @dossiers_list_facade.en_instruction_class, id: 'en_instruction' }
|
||||
="En examen"
|
||||
="En instruction"
|
||||
.badge.progress-bar-default
|
||||
= @dossiers_list_facade.en_instruction_total
|
||||
|
||||
%a{:href => "#{url_for users_dossiers_path(liste: 'termine')}", 'data-toggle' => :tooltip, title: 'Les dossiers cloturés qui peuvent être "Accepté", "Refusé" ou "Sans suite".'}
|
||||
%div.procedure_list_element{ class: @dossiers_list_facade.termine_class, id: 'termine' }
|
||||
= "Cloturé"
|
||||
= "Terminé"
|
||||
.badge.progress-bar-success
|
||||
= @dossiers_list_facade.termine_total
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ fr:
|
|||
date_previsionnelle: "La date de début prévisionnelle"
|
||||
state:
|
||||
draft: "Brouillon"
|
||||
initiated: "Nouveau"
|
||||
initiated: "En construction"
|
||||
replied: "En construction"
|
||||
updated: "En construction"
|
||||
received: "En instruction"
|
||||
|
|
|
@ -24,7 +24,7 @@ describe DossierDecorator do
|
|||
|
||||
it 'initiated is initiate' do
|
||||
dossier.initiated!
|
||||
expect(subject).to eq('Nouveau')
|
||||
expect(subject).to eq('En construction')
|
||||
end
|
||||
|
||||
it 'replied is repondu' do
|
||||
|
|
|
@ -26,7 +26,7 @@ describe AdminProceduresShowFacades do
|
|||
describe '.dossiers_for_pie_highchart' do
|
||||
subject { super().dossiers_for_pie_highchart }
|
||||
|
||||
it { expect(subject).to eq({'Nouveau' => 1, "En construction"=>1}) }
|
||||
it { expect(subject).to eq({ 'En construction' => 3 }) }
|
||||
end
|
||||
|
||||
describe '.dossiers_archived_by_state_total' do
|
||||
|
|
|
@ -34,7 +34,7 @@ feature 'on click on tabs button' do
|
|||
context 'when he click on tabs en examen' do
|
||||
before do
|
||||
visit users_dossiers_url(liste: :en_instruction)
|
||||
page.click_on 'En examen 1'
|
||||
page.click_on 'En instruction 1'
|
||||
end
|
||||
|
||||
scenario 'it redirect to users dossier termine' do
|
||||
|
@ -45,7 +45,7 @@ feature 'on click on tabs button' do
|
|||
context 'when he click on tabs termine' do
|
||||
before do
|
||||
visit users_dossiers_url(liste: :termine)
|
||||
page.click_on 'Cloturé 3'
|
||||
page.click_on 'Terminé 3'
|
||||
end
|
||||
|
||||
scenario 'it redirect to users dossier termine' do
|
||||
|
|
|
@ -25,8 +25,8 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm
|
|||
|
||||
context 'button dossier state changements' do
|
||||
|
||||
shared_examples 'button Accuser réception is present' do
|
||||
it { expect(rendered).to have_link('Accuser réception') }
|
||||
shared_examples 'button Passer en instruction is present' do
|
||||
it { expect(rendered).to have_link('Passer en instruction') }
|
||||
end
|
||||
|
||||
context 'when dossier have state initiated' do
|
||||
|
@ -36,9 +36,9 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm
|
|||
render
|
||||
end
|
||||
|
||||
it { expect(rendered).to have_content('Nouveau') }
|
||||
it { expect(rendered).to have_content('En construction') }
|
||||
|
||||
include_examples 'button Accuser réception is present'
|
||||
include_examples 'button Passer en instruction is present'
|
||||
end
|
||||
|
||||
context 'when dossier have state replied' do
|
||||
|
@ -50,7 +50,7 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm
|
|||
|
||||
it { expect(rendered).to have_content('En construction') }
|
||||
|
||||
include_examples 'button Accuser réception is present'
|
||||
include_examples 'button Passer en instruction is present'
|
||||
end
|
||||
|
||||
context 'when dossier have state update' do
|
||||
|
@ -62,7 +62,7 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm
|
|||
|
||||
it { expect(rendered).to have_content('En construction') }
|
||||
|
||||
include_examples 'button Accuser réception is present'
|
||||
include_examples 'button Passer en instruction is present'
|
||||
end
|
||||
|
||||
context 'when dossier have state received' do
|
||||
|
|
|
@ -17,7 +17,7 @@ describe 'layouts/left_panels/_left_panel_users_recapitulatifcontroller_show.htm
|
|||
render
|
||||
end
|
||||
|
||||
it { expect(rendered).to have_content('Nouveau') }
|
||||
it { expect(rendered).to have_content('En construction') }
|
||||
end
|
||||
|
||||
context 'when dossier state is replied' do
|
||||
|
|
Loading…
Reference in a new issue