Correction erreur si table du module pas encore créée
This commit is contained in:
parent
86d27e67d5
commit
b50778f572
1 changed files with 132 additions and 120 deletions
|
@ -19,7 +19,18 @@
|
|||
{{/foreach}}
|
||||
{{/foreach}}
|
||||
|
||||
{{#select
|
||||
{{*
|
||||
vérifier l'existence de la table du module
|
||||
eh oui, il se peut qu'elle ne soit pas encore créée si aucune donnée n'a été ajoutée dedans
|
||||
*}}
|
||||
{{#load limit="1"}}
|
||||
{{:assign table_presente=true}}
|
||||
{{else}}
|
||||
{{:assign table_presente=false}}
|
||||
{{/load}}
|
||||
|
||||
{{if $table_presente}}
|
||||
{{#select
|
||||
eqpmt.key as eqpmt_key,
|
||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||
mvt.key AS mvt_key,
|
||||
|
@ -40,10 +51,10 @@
|
|||
!output_types=$output_types.temporaire
|
||||
!input_types=$input_types.retour
|
||||
assign="temp_mat."
|
||||
}}
|
||||
{{/select}}
|
||||
}}
|
||||
{{/select}}
|
||||
|
||||
{{if $temp_mat|count != 0}}
|
||||
{{if $temp_mat|count != 0}}
|
||||
<h3 class="ruler">Matériels attribués temporairement</h3>
|
||||
<table class="list">
|
||||
<thead>
|
||||
|
@ -89,9 +100,9 @@
|
|||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#select
|
||||
{{#select
|
||||
eqpmt.key as eqpmt_key,
|
||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||
json_extract(mvt.document, '$.direction') as direction,
|
||||
|
@ -109,10 +120,10 @@
|
|||
:user = $user.id
|
||||
!output_types=$output_types.définitif
|
||||
assign="def_mat."
|
||||
}}
|
||||
{{/select}}
|
||||
}}
|
||||
{{/select}}
|
||||
|
||||
{{if $def_mat|count != 0}}
|
||||
{{if $def_mat|count != 0}}
|
||||
<h3 class="ruler">Matériels attribués définitivement</h3>
|
||||
<table class="list">
|
||||
<thead>
|
||||
|
@ -146,4 +157,5 @@
|
|||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Reference in a new issue