Ajout archivage matériels de stock nul

This commit is contained in:
Jean-Christophe Engel 2025-02-20 10:29:57 +01:00
parent 3e0f3159ae
commit 4a46099275
10 changed files with 214 additions and 60 deletions

61
archives.html Normal file
View file

@ -0,0 +1,61 @@
{{* -*- brindille -*- *}}
{{:admin_header title="Matériels archivés" custom_css=$custom_css current="module_equipment"}}
{{:include file="_nav.html" current="archives"}}
{{if $_GET.ok}}
<p class="block confirm">Matériel remis en service</p>
{{/if}}
{{* Sélecteur catégories *}}
{{:assign var="options." value="" label="Toutes les catégories" href="?prop=1"}}
{{#load type="category" order="$$.name"}}
{{:assign
var="options."
value=$key
label=$name
href="?cat_key=%s&prop=1"|args:$key
}}
{{/load}}
<fieldset class="shortFormRight">
<legend>Filtrer par catégorie</legend>
{{:dropdown
title="Filtrer par catégorie"
options=$options
value="%s"|args:$_GET.cat_key
}}
</fieldset>
<div class="shortFormLeft">
<p class="help">Inventaire des matériels archivés</p>
</div>
{{* Liste des matériels archivés *}}
{{#list
select="
$$.name AS "Matériel" ;
(SELECT $$.name
FROM @TABLE as cat
WHERE cat.key = @TABLE.$$.category) AS "Catégorie"
"
type="equipment"
where="$$.status='archived'"
order=1
}}
<tr>
<td>{{$name}}</td>
<td>{{$col2}}</td>
<td class="actions">
{{:linkbutton
label="Historique"
href="historique.html?key=%s&prop=1&current=archives"|args:$key
shape="table"}}
{{:linkbutton
label="Modifier"
href="unarchive_equipment.html?key=%s"|args:$key
shape="edit"
target="_dialog"}}
</td>
</tr>
{{/list}}