Sha256: 469bd1324417c96851602ac6b490311d4a77a84862a8e88da46caab01231ea7f
Contents?: true
Size: 1.74 KB
Versions: 2
Compression:
Stored size: 1.74 KB
Contents
# frozen_string_literal: true module ThinkFeelDoEngine module Coach # Displays navigational information in the form of breadcrumbs module PatientDashboardHelper VISUALIZATION_CONTROLLERS = [ "participant_activities_visualizations", "participant_thoughts_visualizations" ].freeze def breadcrumbs return unless VISUALIZATION_CONTROLLERS.include?(controller_name) dashboard_path = coach_group_patient_dashboard_path( @group, @participant ) content_for( :breadcrumbs, content_tag( :ol, content_tag( :li, link_to("Patient Dashboard", dashboard_path) ), class: "breadcrumb" ) ) end def activities_planned_today(participant) participant .activities.planned.created_for_day(Time.zone.today).count + participant .activities .reviewed_and_complete.created_for_day(Time.zone.today).count + participant .activities .reviewed_and_incomplete.created_for_day(Time.zone.today).count end def activities_planned_7_day(participant) participant.activities .planned.created_last_seven_days.count + participant.activities .reviewed_and_complete.created_last_seven_days.count + participant.activities .reviewed_and_incomplete.created_last_seven_days.count end def activities_planned_total(participant) participant.activities.planned.count + participant.activities.reviewed_and_complete.count + participant.activities.reviewed_and_incomplete.count end end end end
Version data entries
2 entries across 2 versions & 1 rubygems