personnes: holidays from foreign services marked gray and services icons displayed

Closes #4114
This commit is contained in:
Serghei Mihai 2013-12-12 18:32:56 +01:00
parent d8d699017a
commit 54e6ef3d4c
1 changed files with 4 additions and 1 deletions

View File

@ -114,7 +114,6 @@ class Appointment(object):
def init_busy_time(self, title, length, begin_time, description=None):
self.title = title
self.type = "busy-here"
self.length = length
self.__set_time(begin_time)
self.description = description
@ -169,6 +168,10 @@ def get_daily_appointments(date, worker, service, time_tables, events, holidays)
delta_minutes,
time(interval.lower_bound.hour, interval.lower_bound.minute),
description=holiday.comment)
services = holiday.services.all()
if service not in services:
appointment.type = 'busy-elsewhere'
appointment.other_services_names = [s.slug for s in services]
appointments.append(appointment)
for time_table in time_tables:
interval_set = IntervalSet.between(time_table.to_interval(date).lower_bound.time(),