class Api::Restaurant::ZonesController < Api::ApiController

  def index
      if (params[:filter] && params[:filter] = "all" )
        @all_tables = Table.includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).active
        @all_rooms = Room.includes(:zone, :current_checkin_booking, :current_checkout_booking, :current_reserved_booking).active
      else
        @zones = Zone.includes([:tables, :rooms]).where("is_active = true")
      end
  end

  private
  def zones_params
    params.permit(:filter)
  end
end
