Feat: business hours settings page (#1812)

Co-authored-by: Sojan <sojan@pepalo.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2021-03-13 11:42:51 +05:30
committed by GitHub
parent dbf515ab5a
commit 1d2e1a2823
8 changed files with 577 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ module OutOfOffisable
end
def weekly_schedule
working_hours.select(*OFFISABLE_ATTRS).as_json(except: :id)
working_hours.order(day_of_week: :asc).select(*OFFISABLE_ATTRS).as_json(except: :id)
end
# accepts an array of hashes similiar to the format of weekly_schedule