Project

General

Profile

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

calebasse / calebasse / actes / templates / actes / act_listing.html @ 90ff0811

1
{% extends "calebasse/base.html" %}
2

    
3
{% load url from future %}
4

    
5
{% block extrascripts %}
6
{{ block.super }}
7
<script src="{{ STATIC_URL }}js/calebasse.datesel.js"></script>
8
<script src="{{ STATIC_URL }}js/calebasse.dialog.js"></script>
9
<script>
10
  $(function() {
11
    $('table#actes tr').click(function() {
12
        if ($(this).data('isbilled') == "False") {
13
        generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
14
            '#acte-dlg', '700px', 'Enregistrer', '..');
15
        } else {
16
            alert('Vous ne pouvez pas éditer un acte déjà facturé')
17
        }
18
    });
19
    $('.date').datepicker();
20
    $('#new-acte').click(function() {
21
      $('#new-acte-dlg').dialog({title: 'Nouvel acte',
22
        width: '550px',
23
        buttons: [ { text: "Fermer",
24
          click: function() { $(this).dialog("close"); } },
25
        { text: "Ajouter",
26
          click: function() { $(this).dialog("close"); } }
27
        ]}
28
      );
29
    });
30
    $('#search-form input[type="checkbox"]').on('change', function () {
31
      $('#search-form').submit();
32
    });
33

    
34
  });
35
</script>
36
{% endblock %}
37

    
38
{% block header %}
39
  {{ block.super }}
40
  <span>Actes - {{ service_name }}</spam>
41
{% endblock %}
42

    
43
{% block appbar %}
44
<div id="appbar">
45
  <h2>Saisie des actes</h2>
46
  <a href="../..">Retourner à l'accueil</a>
47
  <button class="dialog-button"
48
          data-url="nouvel-acte/"
49
          data-default-button="Ajouter"
50
      >Ajouter un acte</button>
51
</div>
52
{% endblock %}
53

    
54

    
55
{% block content %}
56
<div id="sidebar">
57
  <form method="get" id="search-form">
58
    <div>
59
      <h3>Rechercher dans les actes</h3>
60
      <h4>Patient</h4>
61
      {{ search_form.non_field_errors }}
62
      <label>Nom: {{ search_form.last_name }}</label>
63
      {{ search_form.last_name.errors }}
64
      <label>Numéro de dossier: {{ search_form.patient_record_id }}</label>
65
      {{ search_form.patient_record_id.errors }}
66
      <label>Numéro de sécu: {{ search_form.social_security_number }}</label>
67
      {{ search_form.social_security_number.errors }}
68
      <button>Rechercher</button>
69
      <h4>Intervenant</h4>
70
      <label>Nom: {{ search_form.doctor_name }}</label>
71
      {{ search_form.doctor_name.errors }}
72
      <button>Rechercher</button>
73
    </div>
74
    <div id="filtre">
75
      <h3>Filtrer les actes</h3>
76
      {{ search_form.filters }}
77
    </div>
78
  </form>
79
</div>
80

    
81
<div class="content">
82
  {% include 'calebasse/datesel.html' %}
83
  <br/>
84

    
85
  <table id="actes" class="main">
86
    <thead>
87
    <tr>
88
      <th>Dossier</th>
89
      <th>État</th>
90
      <th>Type d'acte</th>
91
      <th>Facturé</th>
92
      <th>Facturable</th>
93
      <th>Perdu</th>
94
      <th>Pause</th>
95
      <th>Intervenants</th>
96
      <th>Heure</th>
97
      <th>Durée</th>
98
    </tr>
99
    </thead>
100
    <tbody>
101
      {% for act in object_list %}
102
      <tr data-id="{{ act.id }}" data-isbilled="{{ act.is_billed }}"
103
      {% if not act.is_billed %}class="non-factu"{% endif %}>
104
        <td>1
105
            {{ act.patient.id }}
106
            {{ act.patient.first_name }}
107
            <span class="lastname">{{ act.patient.last_name }}</span>
108
        </td>
109
        <td>{{ act.get_state }}</td>
110
        <td>({{ act.act_type.id }}) {{ act.act_type }}</td>
111
        <td>{% if act.invoice_set.all %}{{ act.invoice_set.all.0.number }}{% endif %}</td>
112
        <td>{{ act.is_billable|yesno:"Oui,Non," }}{% if act.switch_billable %} (I){% endif %}</td>
113
        <td>{{ act.is_lost|yesno:"Oui,Non," }}</td>
114
        <td>{{ act.pause|yesno:"Oui,Non," }}</td>
115
        <td>
116
            {% for doctor in act.doctors.all %}
117
            ({{ doctor.id }}) {{ doctor }}
118
            {% if not forloop.last %}
119
            <br/>
120
            {% endif %}
121
            {% endfor %}
122
        </td>
123
        <td>{{ act.time|date:"H:i" }}</td>
124
        <td>{{ act.duration }}</td>
125
      </tr>
126
    {% endfor %}
127
    </tbody>
128
  </table>
129
</div>
130
{% endblock %}
131

    
132
{% block dialogs %}
133

    
134
<div id="acte-dlg" style="display: none;"></div>
135
{% endblock %}
(1-1/2)