Project

General

Profile

Download (5.95 KB) Statistics
| Branch: | Tag: | Revision:

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ 76e49aa3

1
{% load url from future %}
2
<div>
3
  {% for appointment in worker_agenda.appointments %}
4
  <h3 class="{{ appointment.type }} {% if appointment.act_absence %}act-absence{% endif %} appointment"
5
      {% if appointment.act_absence %}title="{{appointment.act_absence}}"{% endif %}>
6
    <span class="hour">{{ appointment.begin_hour }}</span>
7
    {% if appointment.event_type %} — {{ appointment.event_type }}  {% endif %}
8
    {% if appointment.title %} — {{ appointment.title }}  {% endif %}
9
    {% if appointment.length %} — {{ appointment.length }} mn {% endif %}
10
    {% if appointment.workers_initial %} —{{ appointment.workers_initial }} {% endif %}
11
    {% if appointment.act_type %} — {{ appointment.act_type }} {% endif %}
12
    {% if appointment.room %} — {{ appointment.room }} {% endif %}
13
    <span class="right">
14
        {% for service_name in appointment.other_services_names %}
15
        <span class="box {{ service_name }}" title="{{ service_name }}"></span>
16
        {% endfor %}
17
        {% if appointment.convocation_sent %}
18
        <span title="Une convocation a été envoyée" class="icon-envelope"></span>
19
        {% endif %}
20
        {% if appointment.description %}
21
        <span title="Un commentaire existe" class="icon-comment"></span>
22
        {% endif %}
23
        {% if appointment.event_id %}
24
        {% if appointment.is_recurrent %} R {% endif %}
25
         {% if appointment.patient_record_id %}
26
           <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
27
         {% else %}
28
           <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
29
         {% endif %}
30
        <button class="remove-appointment icon-remove-sign" title="Supprimer un rendez-vous" data-url="{% url 'delete-event' service=service date=date pk=appointment.event_id %}" data-rdv="{{ appointment.title }}"></button>
31
        {% endif %}
32
   </span>
33
  </h3>
34

    
35
  <div>
36
      {% if appointment.type == 'free' %}
37
      <button class='newrdv' data-url="{% url 'nouveau-rdv' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouveau rendez-vous patient</button>
38
      <button class='newevent' data-url="{% url 'new-event' service=service date=date %}" data-hour="{{ appointment.begin_hour }}">Nouvel événement</button>
39
      {% endif %}
40
    {% if appointment.event_id %}
41
    {% if appointment.workers %}
42
      <p class="workers">
43
      Intervenants :
44
      {% for worker in appointment.workers %}
45
        {{ worker.first_name }} <span class="lastname">{{ worker.last_name }}</span>{% if forloop.last %}.{% else %}, {% endif %}
46
      {% endfor %}
47
      </p>
48
    {% endif %}
49
    <div class="tabs-worker-{{ worker_agenda.worker.id }} textedit">
50
        <span></span>
51
        <textarea>{{ appointment.description }}</textarea>
52
        <button disabled="disabled" data-event-id="{{ appointment.event_id }}"></button>
53
    </div>
54
    {% else %}
55
        {% if appointment.description %}
56
        <p>{{ appointment.description }}</p>
57
        {% endif %}
58
    {% endif %}
59
    {% if appointment.patient_record_id %}
60
    <p class="phones">
61
    {% if appointment.patient.mobile %}
62
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Perso)" class="icon-user-space">
63
    {{ appointment.patient.mobile }}
64
    </span>
65
    {% endif %}
66
    {% if appointment.patient.phone %}
67
    <span title="{{ appointment.patient.first_name }} {{ appointment.patient.last_name|upper }} (Patient - Pro)" class="icon-user-space">
68
    {{ appointment.patient.phone }}
69
    </span>
70
    {% endif %}
71
    {% for address in appointment.patient.addresses.all %}
72
      {% if address.place_of_life %}
73
        {% if address.phone %}<span title="{{ address.number }} {{ address.street }} {{ address.zip_code }} {{ address.city }}" class="icon-home-space">{{ address.phone }}</span>{% endif %}
74
        {% for contact in address.patientcontact_set.all  %}
75
          {% if contact.id != appointment.patient.id %}
76
          {% if contact.mobile %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Perso)" class="icon-user-space">{{ contact.mobile }}</span>{% endif %}
77
          {% if contact.phone %}<span title="{{ contact.first_name }} {{ contact.last_name|upper }} (Pro)" class="icon-user-space">{{ contact.phone }}</span>{% endif %}
78
          {% endif %}
79
        {% endfor %}
80
      {% endif %}
81
    {% endfor %}
82
    </p>
83
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view" target="_blank">Dossier patient</a> -
84
    <a href="/{{ service }}/dossiers/{{ appointment.patient_record_id }}/view#tab=5" target="_blank">Prochains rendez-vous</a> -
85
    <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>
86
    {% endif %}
87
    {% if appointment.validation %}
88
      <div><span>{% if appointment.validation.1 %}<strong>{{ appointment.validation.2 }}</strong>, le {{ appointment.validation.1.created }}. {% if appointment.validation.0.is_billed %}<strong>Acte facturé</strong>{% endif %}
89
        {% else %}
90
          Non pointé.
91
        {% endif %}
92
        </span>
93
        {% if not appointment.validation.0.validation_locked and appointment.validation.3 %}
94
          <form method="post" class="inline-form">
95
          {% csrf_token %}
96
          <input type="hidden" value="{{appointment.validation.0.id}}" name="acte-id">
97
          <select data-previous="{{ last_status.state_name }}" name="act_state">
98
            {% for state_name, display_state_name in appointment.validation.3 %}
99
            <option value="{{ state_name }}" {% if state_name == appointment.validation.1.state_name %}selected{% endif %}>{{ display_state_name }}</option>
100
            {% endfor %}
101
          </select>
102
          <button>Modifier</button>
103
          </form>
104
        {% endif %}
105
     </div>
106
     {% endif %}
107
  </div>
108
  {% endfor %}
109
</div>
(4-4/16)