Révision 6ab97b79
Ajouté par Serghei Mihai (congés, retour 15/05) il y a plus de 9 ans
calebasse/agenda/appointments.py | ||
---|---|---|
143 | 143 |
|
144 | 144 |
timetables_set = IntervalSet((t.to_interval(date) for t in time_tables)) |
145 | 145 |
holidays_set = IntervalSet((h.to_interval(date) for h in holidays)) |
146 |
busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence())) |
|
146 |
busy_occurrences_set = IntervalSet((o.to_interval() for o in events if not o.is_event_absence() and service in o.services.all()))
|
|
147 | 147 |
for free_time in timetables_set - (busy_occurrences_set+holidays_set): |
148 | 148 |
if free_time: |
149 | 149 |
delta = free_time.upper_bound - free_time.lower_bound |
... | ... | |
218 | 218 |
appointment.init_start_stop(u"Arrivée", start_time, 'arrival', |
219 | 219 |
appointment_kind) |
220 | 220 |
activity['arrival'] = start_time |
221 |
appointment.weight = 1 |
|
221 |
appointment.weight = -1
|
|
222 | 222 |
appointments.append(appointment) |
223 | 223 |
appointment = Appointment() |
224 | 224 |
appointment.init_start_stop(u"Départ", end_time, 'departure', |
Formats disponibles : Unified diff
agenda: displaying free periods only for current service in scheduled and
availability bar