Project

General

Profile

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

calebasse / calebasse / agenda / templates / agenda / ajax-worker-tab.html @ 67de2724

1
{% load url from future %}
2
<p><a href="{% url 'periodic-events-for-worker' service=service date=date worker_id=worker_agenda.worker.id %}">Rendez-vous périodiques</a></p>
3
<div {% if appointment.event_id %}data-event-id="{{ appointment.event_id }}"{% endif %}>
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.title %} — {{ appointment.title }} {% endif %}
9
    {% if appointment.patient.paper_id %} — {{ appointment.patient.paper_id }} {% endif %}
10
    {% if appointment.length %} — {{ appointment.length }} mn {% 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.confidential %}
27
          <span title="Dossier confidentiel" class="icon-lock"></span>
28
          {% endif %}
29
         {% if service in appointment.services_names or not appointment.services_names %}
30
          {% if appointment.patient_record_id %}
31
            <button title="Éditer un rendez-vous" class="edit-appointment icon-edit" data-event-id="{{ appointment.event_id }}"></button>
32
          {% else %}
33
            <button title="Éditer un événement" class="edit-event icon-edit" data-event-id="{{ appointment.event_id }}">
34
          {% endif %}
35
          {% if not appointment.is_billed %}
36
          <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>
37
          {% endif %}
38
         {% endif %}
39
        {% endif %}
40
   </span>
41
  </h3>
42

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