Skip to content

Instantly share code, notes, and snippets.

@bsturdivan
Created May 1, 2015 07:45
Show Gist options
  • Save bsturdivan/8fa067f0bf02386d50bd to your computer and use it in GitHub Desktop.
Save bsturdivan/8fa067f0bf02386d50bd to your computer and use it in GitHub Desktop.
CX Response times
# Original
@responseHours =
if E.lib.helpers.inRange day, 1, 5
if E.lib.helpers.inRange(hour, 17, 22)
'3 hr'
else if E.lib.helpers.inRange hour, 5, 16
'40 min'
else
'6 hr'
else if holiday
if E.lib.helpers.inRange hour, 5, 18
'3 hr'
else
'6 hr'
else
if E.lib.helpers.inRange hour, 11, 17
'3 hr'
else
'6 hr'
# Change
# TODO Creae an admin interface for this
@responseHours =
if E.lib.helpers.inRange day, 1, 5
if E.lib.helpers.inRange(hour, 17, 22)
'8 hr'
else if E.lib.helpers.inRange hour, 5, 16
'3 hr'
else
'8 hr'
else if holiday
if E.lib.helpers.inRange hour, 5, 18
'3 hr'
else
'6 hr'
else
'8 hr'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment