Révision 63076556
Ajouté par Serghei Mihai il y a plus de 9 ans
calebasse/agenda/appointments.py | ||
---|---|---|
125 | 125 |
self.init_busy_time(title, length, begin_time, description) |
126 | 126 |
self.holiday = True |
127 | 127 |
|
128 |
def init_start_stop(self, title, time): |
|
128 |
def init_start_stop(self, title, time, type):
|
|
129 | 129 |
""" |
130 | 130 |
title: Arrivee ou Depart |
131 | 131 |
""" |
132 |
self.type = "info"
|
|
132 |
self.type = type
|
|
133 | 133 |
self.title = title |
134 | 134 |
self.__set_time(time) |
135 | 135 |
|
... | ... | |
203 | 203 |
start_time = interval_set.lower_bound() |
204 | 204 |
end_time = interval_set.upper_bound() |
205 | 205 |
services = [s.slug for s in time_table.services.all() if s != service] |
206 |
|
|
207 |
if services: |
|
208 |
appointment_type = 'busy-elsewhere' |
|
209 |
else: |
|
210 |
appointment_type = 'info' |
|
211 |
|
|
206 | 212 |
appointment = Appointment() |
207 | 213 |
appointment.other_services_names = services |
208 |
appointment.init_start_stop(u"Arrivée", start_time) |
|
214 |
appointment.init_start_stop(u"Arrivée", start_time, appointment_type)
|
|
209 | 215 |
activity['arrival'] = start_time |
210 | 216 |
appointment.weight = -1 |
211 | 217 |
appointments.append(appointment) |
212 | 218 |
appointment = Appointment() |
213 |
appointment.init_start_stop(u"Départ", end_time) |
|
219 |
appointment.init_start_stop(u"Départ", end_time, appointment_type)
|
|
214 | 220 |
appointment.other_services_names = services |
215 | 221 |
activity['departure'] = end_time |
216 | 222 |
appointment.weight = 1 |
Formats disponibles : Unified diff
agenda: mark worker's arrival and departure times in other services
Closes #2532