Notification: use new notification system
This commit is contained in:
parent
155a5f7826
commit
f7d7cec5ae
4 changed files with 7 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
|||
= render partial: "new_gestionnaire/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_gestionnaire&.follow?(dossier) }
|
||||
= render partial: "state_button", locals: { dossier: dossier }
|
||||
%ul.tabs
|
||||
- notifications_summary = dossier.notifications_summary
|
||||
- notifications_summary = current_gestionnaire.notifications_for_dossier(dossier)
|
||||
%li{ class: current_page?(dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
|
||||
- if notifications_summary[:demande]
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
%li
|
||||
%object
|
||||
= link_to(procedure_path(p, statut: 'suivis')) do
|
||||
- if @notifications_count_per_procedure[p.id].present?
|
||||
- if current_gestionnaire.notifications_per_procedure[p.id].present?
|
||||
%span.notifications{ 'aria-label': "notifications" }
|
||||
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
||||
.stats-number
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
%span.badge= @a_suivre_dossiers.count
|
||||
|
||||
%li{ class: (@statut == 'suivis') ? 'active' : nil }>
|
||||
- if @followed_dossiers.with_unread_notifications.present?
|
||||
- if current_gestionnaire.notifications_for_procedure(@procedure).present?
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
= link_to(procedure_path(@procedure, statut: 'suivis')) do
|
||||
= t('pluralize.followed', count: @followed_dossiers.count)
|
||||
|
@ -27,7 +27,7 @@
|
|||
%span.badge= @termines_dossiers.count
|
||||
|
||||
%li{ class: (@statut == 'tous') ? 'active' : nil }>
|
||||
- if @followed_dossiers.with_unread_notifications.present?
|
||||
- if current_gestionnaire.notifications_for_procedure(@procedure).present?
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
= link_to(procedure_path(@procedure, statut: 'tous')) do
|
||||
tous les dossiers
|
||||
|
@ -99,7 +99,7 @@
|
|||
%td.number-col
|
||||
= link_to(dossier_path(@procedure, dossier), class: 'cell-link') do
|
||||
.icon.folder
|
||||
- if @followed_dossiers.with_unread_notifications.include?(dossier)
|
||||
- if current_gestionnaire.notifications_for_procedure(@procedure).include?(dossier.id)
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
= dossier.id
|
||||
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
describe 'new_gestionnaire/dossiers/show.html.haml', type: :view do
|
||||
let(:current_gestionnaire) { create(:gestionnaire) }
|
||||
let(:individual) { nil }
|
||||
let(:entreprise) { nil }
|
||||
let(:dossier) { create(:dossier, :initiated, entreprise: entreprise, individual: individual) }
|
||||
|
||||
before do
|
||||
assign(:dossier, dossier)
|
||||
view.stub(:current_gestionnaire).and_return(current_gestionnaire)
|
||||
render
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue