Merge branch 'develop' into staging

This commit is contained in:
Xavier J 2017-01-05 18:02:02 +01:00
commit e128d5cd9b
3 changed files with 35 additions and 24 deletions

View file

@ -22,6 +22,10 @@ class DossiersListFacades
current_devise_profil.dossiers.where(archived: false).count
end
def total_dossier_follow
@current_devise_profil.dossiers_follow.count
end
def total_new_dossier
current_devise_profil.dossiers.where(state: :initiated, archived: false).count
end

View file

@ -1,9 +1,13 @@
%table#dossiers_list.table
%thead
- if smart_listing.name.to_s == 'follow_dossiers'
%th
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
%i.fa.fa-bell
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
État
- @facade_data_view.preference_list_dossiers_filter.each do |preference|
- unless preference.libelle == 'Statut' || preference.libelle == 'État'
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}
- if preference.table.to_s.include? 'champs'
= preference.libelle
@ -20,7 +24,7 @@
- smart_listing.collection.each do |dossier|
%tr.dossier-row{id: "tr_dossier_#{dossier.id}", 'data-dossier_url' => backoffice_dossier_url(id: dossier.id)}
- if smart_listing.name.to_s == 'follow_dossiers'
%td.center
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
- total_notif = dossier.notifications.where(already_read: false).count
- if total_notif == 0
.badge.progress-bar-default
@ -28,7 +32,10 @@
- else
.badge.progress-bar-warning
= total_notif
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
= dossier.decorate.display_state
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
- unless preference.libelle == 'Statut' || preference.libelle == 'État'
%td
- if preference.table.nil? || preference.table.empty?
- value = dossier.decorate.public_send(preference.attr_decorate)

View file

@ -1,6 +1,6 @@
%div#first-block
%div.dossiers-en-cours
.count= @facade_data_view.total_dossier
.count= @facade_data_view.total_dossier_follow
.text= "SUIVIS"
%div.nouveaux-dossiers
.count= @facade_data_view.total_new_dossier