Editor - Schedule

This view lists the times per week of anything, be it business hours or menu times

Main Models

  • schedule: array with the 7 days of the week each contains its own lapses and its enabled
  • schedule[day].lapses: contains an array with the lapses of this day
    curDay: Mark the day that is selected. useful to section

Utility Functions

  • hide(): close this modal
  • changeDay(day): changes the value of curDay
  • getWeekdayName(day): Returns the day name.
  • save(): save change in schedule usually enable.
  • edit(index): open the modal of the lapses to edit
  • remove(Index): remove a lapse
  • add(): open the modality of the lapses to add a new one

📘

Note: day goes from whole numbers between 0 and 6 being 0 on Sunday and 6 on Saturday.

Example of base theme

571
  1. hide()
  2. schedule
  3. save()
  4. add()
  5. lapses
  6. edit(index)
  7. changeDay(day)