Projet

Général

Profil

Télécharger (8,03 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ dd986559

1
{% load url from future %}
2
{% load apptags %}
3
<p><a href="{% url 'periodic-events-for-worker' service=service date=date worker_id=worker_agenda.worker.id %}">Rendez-vous périodiques</a></p>
4
<div {% if appointment.event_id %}data-event-id="{{ appointment.event_id }}"{% endif %}>
5
  {% for appointment in worker_agenda.appointments %}
6
  <h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
7
      {% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
8
    <span class="hour">{{ appointment.begin_hour }}</span>
9
    <span class="length">{% if appointment.length %}{% if appointment.length|str_length_lt:3 %}&nbsp;{% endif %}{{ appointment.length }} mn{% endif %}</span>
10
    <span class="title">{% if appointment.title %}{{ appointment.title }}{% endif %}
11
    {% if appointment.patient.paper_id %} {{ appointment.patient.paper_id }} {% endif %}</span>
12
    <span class="participants">
13
    {% if appointment.len_workers > 4 %}
14
        {% if appointment.workers_absent %}<span class="absent" title="Au moins un intervenant est absent">{% endif %}
15
        {{ appointment.len_workers }} inter.
16
        {% if appointment.workers_absent %}</span>{% endif %}
17
    {% else %}
18
        {% if appointment.workers %}
19
          {% for worker in appointment.workers %}
20
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
21
            {{ worker.worker.initials }}{% if not forloop.last %} {% endif %}
22
            {% if worker in appointment.workers_absent %}</span>{% endif %}
23
          {% endfor %}
24
        {% endif %}
25
    {% endif %}
26
    </span>
27
    <span class="act_type">{% if appointment.act_type %}{{ appointment.act_type|trunc_act_type }}{% endif %}</span>
28
    <span class="ressource">{% if appointment.ressource %}{{ appointment.ressource }}{% endif %}</span>
29
    <span class="right">
30
        {% if appointment.workers_absent %}
31
        <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>
32
        {% endif %}
33
        {% for service_name in appointment.other_services_names %}
34
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
35
        {% endfor %}
36
        {% if appointment.description %}
37
        <span title="Un commentaire existe" class="icon-comment"></span>
38
        {% endif %}
39
        {% if appointment.event_id %}
40
        {% if appointment.is_recurrent %} R {% endif %}
41
          {% if appointment.patient.confidential %}
42
          <span title="Dossier confidentiel" class="icon-lock"></span>
43
          {% endif %}
44
          {% if appointment.convocation_sent %}
45
          <button title="Courrier envoyé" class="icon-envelope">
46
          {% endif %}
47
         {% if service in appointment.services_names or not appointment.services_names %}
48
          {% if appointment.patient_record_id %}
49
            {% if not appointment.is_billed %}
50
            <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
51
            {% endif %}
52
          {% else %}
53
            <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
54
          {% endif %}
55
          {% if not appointment.is_billed %}
56
          <button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-url="{% url 'delete-occurrence' service=service date=date pk=appointment.event_id %}" data-rdv="{{ appointment.title }}"></button>
57
          {% endif %}
58
         {% endif %}
59
        {% endif %}
60
   </span>
61
  </h3>
62

    
63
  <div>
64
      {% if appointment.type == 'free' %}
65
      <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
66
      <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
67
      {% endif %}
68
    {% if appointment.event_id %}
69
        {% if appointment.workers %}
70
          <p class="workers">
71
          Intervenants :
72
          {% for worker in appointment.workers %}
73
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
74
            {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
75
            {% if worker in appointment.workers_absent %}</span>{% endif %}
76
          {% endfor %}
77
          </p>
78
        {% endif %}
79
    {% endif %}
80
    {% if appointment.patient_record_id %}
81
    <p class="phones">
82
    {% if appointment.patient.mobile %}
83
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
84
    {{ appointment.patient.mobile }}
85
    </span>
86
    {% endif %}
87
    {% if appointment.patient.phone %}
88
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
89
    {{ appointment.patient.phone }}
90
    </span>
91
    {% endif %}
92
    {% for address in appointment.patient.addresses.all %}
93
      {% if address.place_of_life %}
94
        {% if address.phone %}<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
95
        {% for contact in address.patientcontact_set.all  %}
96
          {% if contact.id != appointment.patient.id %}
97
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
98
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
99
          {% endif %}
100
        {% endfor %}
101
      {% endif %}
102
    {% endfor %}
103
    </p>
104
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
105
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a>
106
    {% if mail %}- <a href="#" class="generate-mail-btn" data-dossier-id="{{ appointment.patient_record_id }}" data-date="{{date|date:"Y-m-d"}}" data-event-id="{{ appointment.event_id }}" data-next-url="{{ request.get_full_path }}">Courrier</a>{% endif %}
107
    {% endif %}
108
    {% if appointment.validation %}
109
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong> {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
110
        {% else %}
111
          Non pointé.
112
        {% endif %}
113
        </span>
114
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
115
          <form method="post" class="inline-form">
116
          {% csrf_token %}
117
          <input type="hidden" value="{{appointment.event_id}}" name="event-id">
118
          <select name="act_state">
119
            {% for state_name, display_state_name in appointment.validation.3 %}
120
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
121
            {% endfor %}
122
          </select>
123
          <button>Modifier</button>
124
          </form>
125
        {% endif %}
126
       </div>
127
    {% endif %}
128
    {% if appointment.event_id %}
129
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
130
            <span></span>
131
            {% if service in appointment.services_names or not appointment.services_names %}
132
            <textarea>{{ appointment.description }}</textarea>
133
            <button disabled="disabled" data-event-id="{{ appointment.event_id }}" data-date="{{ date|date:"Y-m-d" }}" {% if appointment.act_id %}data-act-id="{{ appointment.act_id }}{% endif %}"></button>
134
            {% else %}
135
            <p>{{ appointment.description }}</p>
136
            {% endif %}
137
        </div>
138
    {% else %}
139
        {% if appointment.description %}
140
        <p>{{ appointment.description }}</p>
141
        {% endif %}
142
    {% endif %}
143
  </div>
144
  {% endfor %}
145
</div>
(5-5/19)