Merge branch 'staging'

This commit is contained in:
Xavier J 2017-01-05 18:04:13 +01:00
commit 04dc45e83c
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 current_devise_profil.dossiers.where(archived: false).count
end end
def total_dossier_follow
@current_devise_profil.dossiers_follow.count
end
def total_new_dossier def total_new_dossier
current_devise_profil.dossiers.where(state: :initiated, archived: false).count current_devise_profil.dossiers.where(state: :initiated, archived: false).count
end end

View file

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

View file

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