Created
April 16, 2018 19:32
-
-
Save JKetelaar/a8932bda78175ae1c503353d593469d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for appointment in appointments %} | |
{% if appointment.inactive %} | |
var color = '#FF0000'; | |
{% else %} | |
var color = '#' + ({{ appointment.user.id / 25000 }} * 0xFFFFFF << 0).toString(16); | |
{% endif %} | |
events.push( | |
{ | |
id: '{{ appointment.id }}', | |
//TODO: Find way to display - D: {{ appointment.dentist }} - H: {{ appointment.hygienist }} - C: {{ appointment.user.name }} cleanly in title | |
title: '{{ appointment.type }} - {{ appointment.user.name }}', | |
start: '{{ appointment.start|date('Y-m-dTH:i') }}', | |
end: '{{ appointment.end|date('Y-m-dTH:i') }}', | |
dentist: '{{ appointment.dentist.name }}', | |
hygienist: '{{ appointment.hygienist.name }}', | |
user: '{{ appointment.user.name }}', | |
color: color | |
} | |
); | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment