Project

General

Profile

« Previous | Next » 

Revision bba85766

Added by Serghei Mihai about 10 years ago

Inactive participants highlighted in patien's next schedules

View differences:

calebasse/agenda/models.py
393 393
    def is_event_absence(self):
394 394
        return False
395 395

  
396
    def get_inactive_participants(self):
397
        return self.participants.filter(worker__enabled=False)
398

  
396 399
    def get_missing_participants(self):
397 400
        missing_participants = []
398 401
        for participant in self.participants.all():
calebasse/dossiers/templates/dossiers/patientrecord_tab6_next_rdv.html
4 4
      <tr> <th>Date</th> <th>Pointage</th> <th>Type d'acte</th> <th>Intervenants</th> <th>Commentaire</th> </tr>
5 5
    </thead>
6 6
    <tbody>
7
    {% for event, state, missing_participants in next_rdvs %}
7
    {% for event, state, missing_participants, inactive_participants in next_rdvs %}
8 8
    <tr>
9
      <td>{% firstof event.start_datetime|date:"l d/m/y H:i"|title %}{% if missing_participants %} <span title="Au moins un intervenant est absent" class="icon-warning-sign absent"></span>{% endif %}</td>
9
      <td>{% firstof event.start_datetime|date:"l d/m/y H:i"|title %}{% if missing_participants or inactive_participants %} <span title="Au moins un intervenant est absent ou ne fait plus partie du service" class="icon-warning-sign absent"></span>{% endif %}</td>
10 10
      <td>{% if state %}{% if state.state_name != 'VALIDE' %}<strong>{% endif %}{{ state }}{% if state.state_name != 'VALIDE' %}</strong>{% endif %}{% else %}Non pointé.{% endif %}</td>
11 11
      <td>{{ event.act_type }}</td>
12 12
      <td class="width-limited">{% for participant in event.participants.all %}
13
        {% if participant in missing_participants %}<span class="absent" title="Absent">{% endif %}
13
        {% if participant in missing_participants %}
14
        <span class="absent" title="Absent">
14 15
          {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
15
          {% if participant in missing_participants %}</span>{% endif %}
16
        </span>
17
        {% elif participant in inactive_participants %}
18
        <span class="inactive" title="Ne fait plus parti du service">
19
          {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
20
        </span>
21
        {% else %}
22
        {{ participant.first_name }} <span class="lastname">{{ participant.last_name }}</span>
23
        {% endif %}
16 24
        {% endfor %}</td>
17 25
      {% if event.act.id %}
18 26
      <td class="width-limited">{{ event.act.comment }}</td>
calebasse/dossiers/views.py
433 433
                state = event.act.get_state()
434 434
            if state and not state.previous_state and state.state_name == 'NON_VALIDE':
435 435
                state = None
436
            ctx['next_rdvs'].append((event, state, event.get_missing_participants()))
436
            ctx['next_rdvs'].append((event, state, event.get_missing_participants(), event.get_inactive_participants()))
437 437
        return ctx
438 438

  
439 439
tab6_next_rdv = PatientRecordNextAppointmentsView.as_view()
calebasse/static/css/style.css
472 472
	font-style: italic;
473 473
}
474 474

  
475
span.inactive {
476
	color: #8B008B;
477
	font-style: italic;
478
}
479

  
475 480
td#agendas {
476 481
	vertical-align: top;
477 482
	width: 100%;

Also available in: Unified diff