Project

General

Profile

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

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ 1f9e881e

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

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