Class: RestaurantGroupDecorator

Inherits:
Draper::Decorator
  • Object
show all
Includes:
OwnerDashboardPaths
Defined in:
app/decorators/restaurant_group_decorator.rb

Overview

typed: ignore frozen_string_literal: true

Instance Method Summary collapse

Methods included from OwnerDashboardPaths

#dashboard_v2_block_inventories_path, #dashboard_v2_confirm_reservation_path, #dashboard_v2_create_or_update_inventories_path, #dashboard_v2_create_reservation_path, #dashboard_v2_edit_reservation_path, #dashboard_v2_filter_form_url, #dashboard_v2_group_voucher_marketplace_search_history, #dashboard_v2_group_voucher_marketplace_search_list, #dashboard_v2_inventories_path, #dashboard_v2_inventory_undo_path, #dashboard_v2_log_out_path, #dashboard_v2_new_reservation_path, #dashboard_v2_package_menus_path, #dashboard_v2_reports_path, #dashboard_v2_reservation_cancel_path, #dashboard_v2_reservation_send_reminder_path, #dashboard_v2_reservation_send_review_link_path, #dashboard_v2_reservations_path, #dashboard_v2_reset_inventories_path, #dashboard_v2_reviews_path, #dashboard_v2_root_path, #dashboard_v2_self_checkin_path, #dashboard_v2_self_redeem_path, #dashboard_v2_send_custom_sms_path, #dashboard_v2_staff_path, #dashboard_v2_staffs_path, #dashboard_v2_update_reservation_path, #dashboard_v2_voucher_marketplace_edit_history, #dashboard_v2_voucher_marketplace_history, #dashboard_v2_voucher_marketplace_list, #dashboard_v2_voucher_marketplace_redeem, #edit_dashboard_v2_staff_path, #many_restaurants?, #new_dashboard_v2_staff_path, #override_report_dashboard_v2_inventories_path, #partner_path, #restaurant_group_id_hash, #restaurant_id_hash

Instance Method Details

#dashboard_v2_restaurant_nameObject



7
8
9
# File 'app/decorators/restaurant_group_decorator.rb', line 7

def dashboard_v2_restaurant_name
  object.name
end

#delivery_restaurant?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/decorators/restaurant_group_decorator.rb', line 15

def delivery_restaurant?
  object.restaurants.select(&:is_take_away?).present?
end

#dine_in_restaurant?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/decorators/restaurant_group_decorator.rb', line 11

def dine_in_restaurant?
  object.restaurants.select(&:is_dine_in?).present?
end