Revision d8468991
Added by Jérôme Schneider over 12 years ago
calebasse/agenda/views.py | ||
---|---|---|
54 | 54 |
workers.extend(data['workers']) |
55 | 55 |
|
56 | 56 |
occurrences_workers = {} |
57 |
time_tables_workers = {} |
|
57 | 58 |
for worker in workers: |
58 | 59 |
time_tables_worker = [tt for tt in time_tables if tt.worker.id == worker.id] |
59 | 60 |
occurrences_worker = [o for o in occurrences if worker.id in o.event.participants.values_list('id', flat=True)] |
60 | 61 |
occurrences_workers[worker.id] = occurrences_worker |
62 |
time_tables_workers[worker.id] = time_tables_worker |
|
61 | 63 |
context['workers_agenda'].append({'worker': worker, |
62 | 64 |
'appointments': get_daily_appointments(context['date'], worker, self.service, |
63 | 65 |
time_tables_worker, occurrences_worker)}) |
64 | 66 |
|
65 | 67 |
context['disponibility'] = Occurrence.objects.daily_disponiblity(context['date'], |
66 |
occurrences_workers, workers) |
|
68 |
occurrences_workers, workers, time_tables_workers)
|
|
67 | 69 |
return context |
68 | 70 |
|
69 | 71 |
class AgendaServiceActivityView(TemplateView): |
Also available in: Unified diff
Fix #1842: daily disponnibility add away state