Sha256: 58c2389c89f22586d46dc3ec00c00c580baeb590fb5c3eb06180acc60462644d

Contents?: true

Size: 671 Bytes

Versions: 13

Compression:

Stored size: 671 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # Helpers related to the Conferences layout.
    module ConferenceProgramHelper
      include Decidim::ResourceHelper

      def meetings_for_day(component, day, user)
        meetings = Decidim::Conferences::ConferenceProgramMeetingsByDay.new(component, day, user).query

        meetings_by_time = {}
        meetings.each do |meeting|
          meetings_by_time[start_time: meeting.start_time, end_time: meeting.end_time] ||= []
          meetings_by_time[start_time: meeting.start_time, end_time: meeting.end_time] << { meeting: }
        end
        meetings_by_time
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-conferences-0.29.1 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.4 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.29.0 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.3 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.29.0.rc4 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.29.0.rc3 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.29.0.rc2 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.29.0.rc1 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.2 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.1 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.0 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.0.rc5 app/helpers/decidim/conferences/conference_program_helper.rb
decidim-conferences-0.28.0.rc4 app/helpers/decidim/conferences/conference_program_helper.rb