Revision db33aecd
Added by Benjamin Dauvergne over 12 years ago
calebasse/agenda/views.py | ||
---|---|---|
220 | 220 |
template_name = 'agenda/act-validation.html' |
221 | 221 |
|
222 | 222 |
def acts_of_the_day(self): |
223 |
return [e.act for e in EventWithAct.objects.filter(patient__service=self.service) |
|
224 |
.today_occurrences(self.date)] |
|
223 |
acts = [e.act for e in EventWithAct.objects.filter(patient__service=self.service) |
|
224 |
.today_occurrences(self.date)] + list(Act.objects.filter(date=self.date, parent_event__isnull=True)) |
|
225 |
return sorted(acts, key=lambda a: a.time) |
|
225 | 226 |
|
226 | 227 |
def post(self, request, *args, **kwargs): |
227 | 228 |
if 'unlock-all' in request.POST: |
... | ... | |
375 | 376 |
holidays_workers[worker.id] = holidays_worker |
376 | 377 |
daily_appointments = get_daily_appointments(context['date'], worker, self.service, |
377 | 378 |
time_tables_worker, events_worker, holidays_worker) |
378 |
if all(map(lambda x: x.type == 'busy-here', daily_appointments)):
|
|
379 |
if all(map(lambda x: x.holiday, daily_appointments)):
|
|
379 | 380 |
continue |
380 | 381 |
context['workers_agenda'].append({'worker': worker, |
381 | 382 |
'appointments': daily_appointments}) |
Also available in: Unified diff
agenda: do not show agenda containing only holidays (fix of previous implementation)