36 lines
841 B
HTML
36 lines
841 B
HTML
{{#restrict section="users" level="read"}}
|
|
<div>
|
|
<h3>Matériel en prêt - {{$user._name}}</h3>
|
|
<table class="list">
|
|
<thead>
|
|
<tr>
|
|
<td>Matériel</td>
|
|
<td>Date</td>
|
|
<td>Quantité</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#select
|
|
json_extract(eqpmt.document, '$.name') as mat,
|
|
json_extract(mvt.document, '$.date') as date,
|
|
json_extract(mvt.document, '$.amount') as qte
|
|
FROM module_data_equipment AS mvt
|
|
INNER JOIN users ON json_extract(mvt.document, '$.user') = users.id
|
|
INNER JOIN module_data_equipment AS eqpmt
|
|
ON json_extract(mvt.document, '$.equipment') = eqpmt.key
|
|
WHERE users.id = :user
|
|
ORDER BY mat
|
|
;
|
|
:user = $user.id
|
|
}}
|
|
<tr>
|
|
<td>{{$mat}}</td>
|
|
<td>{{$date|date_short}}</td>
|
|
<td>{{$qte}}</td>
|
|
</tr>
|
|
{{/select}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{/restrict}}
|