Projet

Général

Profil

Télécharger (9,04 ko) Statistiques
| Branche: | Tag: | Révision:

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ 9aa3425b

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 id="{{ appointment.event_id }}" 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 }} min{% endif %}</span>
10
    <span class="title">
11
      {% if appointment.title %}
12
      {{ appointment.title }}
13
      {% if appointment.timetable_type and appointment.other_services_names %}
14
      {% if appointment.timetable_type == 'arrival' %}
15
      dans le{{appointment.other_services_names|pluralize}}
16
      {% else %}
17
      d{{appointment.other_services_names|pluralize:'u,es'}}
18
      {% endif %}
19
      service{{ appointment.other_services_names|pluralize }}
20
      {% for service_name in appointment.other_services_names %}
21
      {{ service_name }}{% if not forloop.last %},{% endif %}
22
      {% endfor %}
23
      {% endif %}
24

    
25
      {% endif %}
26
      {% if appointment.patient.paper_id %}
27
      {{ appointment.patient.paper_id }}
28
      {% endif %}
29
    </span>
30
    <span class="participants">
31
    {% if appointment.len_workers > 4 %}
32
        {% if appointment.workers_absent %}<span class="absent" title="Au moins un intervenant est absent">{% endif %}
33
        {{ appointment.len_workers }} inter.
34
        {% if appointment.workers_absent %}</span>{% endif %}
35
    {% else %}
36
        {% if appointment.workers %}
37
          {% for worker in appointment.workers %}
38
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
39
            {{ worker.worker.initials }}{% if not forloop.last %} {% endif %}
40
            {% if worker in appointment.workers_absent %}</span>{% endif %}
41
          {% endfor %}
42
        {% endif %}
43
    {% endif %}
44
    </span>
45
    <span class="act_type">{% if appointment.act_type %}{{ appointment.act_type|trunc_act_type }}{% endif %}</span>
46
    <span class="ressource">{% if appointment.ressource %}{{ appointment.ressource }}{% endif %}</span>
47
    <span class="right">
48
        {% if appointment.is_recurrent %}
49
        {% if appointment.patient.periodic_appointment_transport %}
50
        <span title="Transport" class="icon-car"></span>
51
        {% endif %}
52
        {% elif appointment.patient.simple_appointment_transport %}
53
        <span title="Transport" class="icon-car"></span>
54
        {% endif %}
55

    
56
        {% if appointment.workers_absent %}
57
        <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>
58
        {% endif %}
59
        {% if appointment.timetable_type %}
60
        <span class="icon-{{ appointment.timetable_type }}"></span>
61
        {% else %}
62
        {% for service_name in appointment.other_services_names %}
63
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
64
        {% endfor %}
65
        {% endif %}
66
        <span title="Un commentaire existe" class="icon-comment" {% if appointment.description %}style='display: inline'{% endif %}></span>
67
        {% if appointment.event_id %}
68
        {% if appointment.is_recurrent %} R {% endif %}
69
          {% if appointment.patient.confidential %}
70
          <span title="Dossier confidentiel" class="icon-lock"></span>
71
          {% endif %}
72
          {% if appointment.convocation_sent %}
73
          <button title="Courrier envoyé" class="icon-envelope">
74
          {% endif %}
75
         {% if service in appointment.services_names or not appointment.services_names %}
76
          {% if appointment.patient_record_id %}
77
            {% if not appointment.is_billed %}
78
            <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
79
            {% endif %}
80
          {% else %}
81
            <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
82
          {% endif %}
83
          {% if not appointment.already_billed %}
84
          <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>
85
          {% endif %}
86
         {% endif %}
87
        {% endif %}
88
   </span>
89
  </h3>
90

    
91
  <div>
92
      {% if appointment.type == 'free' %}
93
      <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}" data-duration="{{ appointment.length }}">Nouveau rendez-vous patient</button>
94
      <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}" data-duration="{{ appointment.length }}">Nouvel événement</button>
95
      {% endif %}
96
    {% if appointment.event_id %}
97
        {% if appointment.workers %}
98
          <p class="workers">
99
          Intervenants :
100
          {% for worker in appointment.workers %}
101
            {% if worker in appointment.workers_absent %}<span class="absent" title="Absent">{% endif %}
102
            {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
103
            {% if worker in appointment.workers_absent %}</span>{% endif %}
104
          {% endfor %}
105
          </p>
106
        {% endif %}
107
    {% endif %}
108
    {% if appointment.patient_record_id %}
109
    <p class="phones">
110
    {% if appointment.patient.mobile %}
111
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
112
    {{ appointment.patient.mobile }}
113
    </span>
114
    {% endif %}
115
    {% if appointment.patient.phone %}
116
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
117
    {{ appointment.patient.phone }}
118
    </span>
119
    {% endif %}
120
    {% for address in appointment.patient.addresses.all %}
121
      {% if address.place_of_life %}
122
        {% if address.phone %}<span title="{{ address.display_name }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
123
        {% for contact in address.patientcontact_set.all  %}
124
          {% if contact.id != appointment.patient.id %}
125
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
126
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
127
          {% endif %}
128
        {% endfor %}
129
      {% endif %}
130
    {% endfor %}
131
    </p>
132
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
133
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a>
134
    {% 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 %}
135
    {% endif %}
136
    {% if appointment.validation %}
137
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong> {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
138
        {% else %}
139
          Non pointé.
140
        {% endif %}
141
        </span>
142
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
143
          <form method="post" class="inline-form">
144
          {% csrf_token %}
145
          <input type="hidden" value="{{appointment.event_id}}" name="event-id">
146
          <select name="act_state">
147
            {% for state_name, display_state_name in appointment.validation.3 %}
148
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
149
            {% endfor %}
150
          </select>
151
          <button>Pointer</button>
152
          </form>
153
        {% endif %}
154
       </div>
155
    {% endif %}
156
    {% if appointment.event_id %}
157
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
158
            <span></span>
159
            {% if service in appointment.services_names or not appointment.services_names %}
160
            <textarea>{{ appointment.description }}</textarea>
161
            <button disabled="disabled" data-event-id="{{ appointment.event_id }}" data-date="{{ date|date:"Y-m-d" }}"></button>
162
            {% else %}
163
            <p>{{ appointment.description }}</p>
164
            {% endif %}
165
        </div>
166
    {% else %}
167
        {% if appointment.description %}
168
        <p>{{ appointment.description }}</p>
169
        {% endif %}
170
    {% endif %}
171
  </div>
172
  {% endfor %}
173
</div>
(5-5/18)