Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Last active November 30, 2017 13:27
Show Gist options
  • Save edipofederle/defd6dff5dc6ddbb587ee795751a6c13 to your computer and use it in GitHub Desktop.
Save edipofederle/defd6dff5dc6ddbb587ee795751a6c13 to your computer and use it in GitHub Desktop.

TODO

From models side

  • adds column type to the bookings table. (STI);

  • Add news columns for PersonalBooking in bookings table:

    • Description:text

    • Linen:string (enum in rails side)

    • services:array

      Example: [checkin, cleaning] to support the selected task_types for PersonalBooking. For GuestBooking this will be set to [:cleaning, :checkin, :checkout] automatically. Based on the column the tasks will be created for Personal and Guest bookings.

      [Édipo] - So here in the view side, for PersonalBooking , will exists three checkboxes: 'checking, checking and cleaning' ?

  • create two models (subclasses) and intheriting from Booking:

    • PersonalBooking
    • GuestBooking
  • move logic specific logic from booking to GuestBooking and keep shared logic at the Booking.

    • Validations
    • Callbacks
    • Scopes
    • Methods
  • make specs green again!

From Controllers/Views side

  • Create a new controller called PersonalBookingsController
  • Will need a view to create a PersonalBooking. Because already we dont have way to create a booking 'manually'. We Need to discuss it. How the UI will look like and the flow.
    • A little wireframe can help here

From Reports side

  • Ignore PersonalBooking from Reports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment