Class: Pike13::CLI::Commands::Front::Appointment
- Defined in:
- lib/pike13/cli/commands/front/appointment.rb
Instance Method Summary collapse
Methods inherited from Base
base_usage, format_options, handle_argument_error, printable_commands
Methods included from ThorNestedSubcommand
Instance Method Details
#available(service_id) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pike13/cli/commands/front/appointment.rb', line 13 def available(service_id) validate_date_format([:date], "date") handle_error do params = { date: [:date] } params[:location_ids] = [:location_ids] if [:location_ids] params[:staff_member_ids] = [:staff_member_ids] if [:staff_member_ids] result = with_progress("Fetching available slots") do Pike13::Front::Appointment.find_available_slots(service_id: service_id, **params) end output(result) end end |