Blame view

app/main/templates/agent.html 3.91 KB
d9f5cfc9   hitier   New agent page dy...
1
{% extends "base_page.html" %}
04e2a90d   hitier   Show agent charge...
2
3

{% block more_heads %}
715c0527   Anais Amato   Make tables sorta...
4
5
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='lib/datatables-1.10.24/css/datatables.min.css') }}"/>
    <link href="{{ url_for('main.static', filename='css/charges.css', version=config.VERSION) }}" rel="stylesheet"
96346598   hitier   Insert descriptio...
6
      type="text/css"/>
04e2a90d   hitier   Show agent charge...
7
8
{% endblock %}

d9f5cfc9   hitier   New agent page dy...
9
{% block content %}
9f86aeea   Anais Amato   Change navbar act...
10
11
12
13

<!-- Invisible span to definte wich ul and a in the navbar are actived -->
<span id="nav_actived" style="display: none">agent,agents</span>

96346598   hitier   Insert descriptio...
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<div class="card">
  <div class="card-header">
    Fiche Agent
  </div>
  <div class="card-body">
    <dl class="row agent">
      <dt class="col-sm-2 text-right">ID :</dt>
      <dd class="col-sm-10 text-left">{{agent.id}}</dd>
      <dt class="col-sm-2 text-right">Genre :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Date de naissance :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">E-mail :</dt>
      <dd class="col-sm-10 text-left"></dd>
      {# TODO: put different spacing #}
      <dt class="col-sm-2 text-right"></dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Statut :</dt>
f3dbebc2   hitier   New agent relatio...
32
      <dd class="col-sm-10 text-left">{{agent.status.name}}</dd>
96346598   hitier   Insert descriptio...
33
      <dt class="col-sm-2 text-right">Organisme :</dt>
f3dbebc2   hitier   New agent relatio...
34
      <dd class="col-sm-10 text-left">{{agent.company.name}}</dd>
96346598   hitier   Insert descriptio...
35
36
      <dt class="col-sm-2 text-right">Corps :</dt>
      <dd class="col-sm-10 text-left"></dd>
ac2fa9fd   hitier   Use select_option...
37
38
      <dt class="col-sm-2 text-right">Grade :</dt>
      <dd class="col-sm-10 text-left">{{agent.grade.name}}</dd>
96346598   hitier   Insert descriptio...
39
      <dt class="col-sm-2 text-right">BAP :</dt>
f3dbebc2   hitier   New agent relatio...
40
      <dd class="col-sm-10 text-left">{{agent.bap.name}}</dd>
96346598   hitier   Insert descriptio...
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
      {# TODO: puth different spacing #}
      <dt class="col-sm-2 text-right"></dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Quotité :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Date arrivée :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Date départ :</dt>
      <dd class="col-sm-10 text-left"></dd>
      {# TODO: put different spacing #}
      <dt class="col-sm-2 text-right"></dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Commentaires :</dt>
      <dd class="col-sm-10 text-left"></dd>
      {# TODO: put different spacing #}
      <dt class="col-sm-2 text-right"></dt>
      <dd class="col-sm-10 text-left"></dd>
96346598   hitier   Insert descriptio...
58
59
60
61
62
63
64
65
66
67
      <dt class="col-sm-2 text-right">Fiche de poste :</dt>
      <dd class="col-sm-10 text-left"></dd>
      {# TODO: put different spacing #}
      <dt class="col-sm-2 text-right"></dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Compétences :</dt>
      <dd class="col-sm-10 text-left"></dd>
      <dt class="col-sm-2 text-right">Besoin en formation :</dt>
      <dd class="col-sm-10 text-left"></dd>
    </dl>
ca0797d6   hitier   New agent edit form
68
    <a class="card-link" href="{{url_for('main.agent_edit', agent_id=agent.id)}}">Modifier</a>
09551925   hitier   New charge add pa...
69
    <a class="card-link" href="{{url_for('main.charge_add', agent_id=agent.id)}}">Charger</a>
96346598   hitier   Insert descriptio...
70
71
72
73
  </div>
</div>

<div class="charge_chart" id="projects_chart"></div>
70da5dd5   hitier   Insert charges ta...
74
75
76
<table id="charge_table">
  <thead>
  <tr>
96346598   hitier   Insert descriptio...
77
    {% for header in charges[0] %}
b9d90810   hitier   Tweak charges tab...
78
    <th>{{header}}</th>
96346598   hitier   Insert descriptio...
79
    {% endfor %}
70da5dd5   hitier   Insert charges ta...
80
81
82
83
84
  </tr>
  </thead>
  <tbody>
  {% for line in charges[1:] %}
  <tr>
796a5688   hitier   Add % sign in cha...
85
    {% for i in range(line|length) %}
96346598   hitier   Insert descriptio...
86
87
88
89
90
91
    {%if 'Charge' in charges[0][i] %}
    {% set charge = line[i] | int %}
    <td>{{charge / 100}}</td>
    {%else%}
    <td>{{line[i]}}</td>
    {%endif%}
70da5dd5   hitier   Insert charges ta...
92
93
94
95
96
97
    {% endfor %}
  </tr>
  {% endfor %}

  </tbody>
</table>
d9f5cfc9   hitier   New agent page dy...
98
{% endblock %}
04e2a90d   hitier   Show agent charge...
99
100


d9f5cfc9   hitier   New agent page dy...
101
{% block more_scripts %}
b15e4db5   hitier   Tooltip on mouseo...
102
{% include 'd3js-includes.html' %}
5e6f4e07   hitier   Set Rokotyan Solu...
103
{% include 'charges-includes.html' %}
715c0527   Anais Amato   Make tables sorta...
104
105
{% include 'datatables-includes.html' %}

b15e4db5   hitier   Tooltip on mouseo...
106
<script>
c8b7caf5   hitier   Agent now uses co...
107
108
  build_chart("#projects_chart",
      "{{url_for('main.charge_agent_csv', agent_id=agent.id)}}",
ca0797d6   hitier   New agent edit form
109
      "{{agent.fullname}}",
c8b7caf5   hitier   Agent now uses co...
110
      "project");
b15e4db5   hitier   Tooltip on mouseo...
111
</script>
715c0527   Anais Amato   Make tables sorta...
112

d9f5cfc9   hitier   New agent page dy...
113
{% endblock %}