Projet

Général

Profil

« Précédent | Suivant » 

Révision 055d68a5

Ajouté par Serghei Mihai il y a plus de 9 ans

agenda: displaying overlapping appointments is a service option

Closes #5459

Voir les différences:

calebasse/agenda/views.py
22 22
from calebasse.actes.models import Act, ValidationMessage
23 23
from calebasse.actes.validation import (automated_validation, unlock_all_acts_of_the_day)
24 24
from calebasse import cbv
25
from calebasse.utils import get_service_setting
25 26

  
26 27
from calebasse.agenda.forms import (NewAppointmentForm, NewEventForm, UpdatePeriodicAppointmentForm,
27 28
        DisablePatientAppointmentForm, UpdateAppointmentForm, UpdatePeriodicEventForm,
......
614 615

  
615 616
            if events:
616 617
                for event in events:
617
                    overlap_events = Event.objects.overlap_occurences(start_datetime, events)
618
                    if get_service_setting('show_overlapping_appointments'):
619
                        overlap_events = Event.objects.overlap_occurences(start_datetime, events)
620
                    else:
621
                        overlap_events = []
618 622
                    if len(overlap_events) > 1:
619 623
                        dispo = 'overlap'
620 624
                    elif event.start_datetime <= start_datetime and event.end_datetime >= end_datetime:

Formats disponibles : Unified diff