Projet

Général

Profil

« Précédent | Suivant » 

Révision 6ab97b79

Ajouté par Serghei Mihai (congés, retour 15/05) il y a plus de 9 ans

agenda: displaying free periods only for current service in scheduled and
availability bar

Voir les différences:

calebasse/agenda/views.py
533 533
                .select_related()
534 534
        events = Event.objects.for_today(self.date) \
535 535
                .exclude(event_type_id=1) \
536
                .filter(participants=worker, services=self.service) \
536
                .filter(participants=worker) \
537 537
                .order_by('start_datetime') \
538 538
                .select_related() \
539 539
                .prefetch_related('services',
540 540
                        'exceptions',
541 541
                        'participants')
542 542
        eventswithact = EventWithAct.objects.for_today(self.date) \
543
                .filter(participants=worker, services=self.service) \
543
                .filter(participants=worker) \
544 544
                .order_by('start_datetime') \
545 545
                .select_related() \
546 546
                .prefetch_related('patient__addresses',
......
592 592
                                           self.date.day, 8, 0)
593 593
        end_datetime = datetime.datetime(self.date.year, self.date.month,
594 594
                                         self.date.day, 8, 15)
595
        events = Event.objects.filter(ressource__id=ressource_id,
596
                                      services=self.service).today_occurrences(self.date)
595
        events = Event.objects.filter(ressource__id=ressource_id).today_occurrences(self.date)
597 596

  
598 597
        while (start_datetime.hour <= 19):
599 598
            if start_datetime.hour not in disponibility:
......
628 627
                filter(services=self.service, worker=worker). \
629 628
                for_today(self.date). \
630 629
                order_by('start_date')
631
        holidays = Holiday.objects.for_worker(worker). \
630
        holidays = Holiday.objects.for_worker(worker).for_service(self.service). \
632 631
                for_period(self.date, self.date). \
633 632
                order_by('start_date')
634 633
        events = Event.objects.for_today(self.date) \
635 634
                .exclude(event_type_id=1) \
636
                .filter(services=self.service, participants=worker) \
635
                .filter(participants=worker, services=self.service) \
637 636
                .order_by('start_datetime') \
638 637
                .select_related() \
639 638
                .prefetch_related('participants', 'exceptions')
640 639
        eventswithact = EventWithAct.objects.for_today(self.date) \
641
                .filter(services=self.service, participants=worker) \
640
                .filter(participants=worker, services=self.service) \
642 641
                .order_by('start_datetime') \
643 642
                .select_related() \
644 643
                .prefetch_related('participants', 'exceptions',

Formats disponibles : Unified diff