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}}
|
||||||
{{/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,
|
eqpmt.key as eqpmt_key,
|
||||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||||
mvt.key AS mvt_key,
|
mvt.key AS mvt_key,
|
||||||
|
@ -40,10 +51,10 @@
|
||||||
!output_types=$output_types.temporaire
|
!output_types=$output_types.temporaire
|
||||||
!input_types=$input_types.retour
|
!input_types=$input_types.retour
|
||||||
assign="temp_mat."
|
assign="temp_mat."
|
||||||
}}
|
}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{if $temp_mat|count != 0}}
|
{{if $temp_mat|count != 0}}
|
||||||
<h3 class="ruler">Matériels attribués temporairement</h3>
|
<h3 class="ruler">Matériels attribués temporairement</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -89,9 +100,9 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
eqpmt.key as eqpmt_key,
|
eqpmt.key as eqpmt_key,
|
||||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||||
json_extract(mvt.document, '$.direction') as direction,
|
json_extract(mvt.document, '$.direction') as direction,
|
||||||
|
@ -109,10 +120,10 @@
|
||||||
:user = $user.id
|
:user = $user.id
|
||||||
!output_types=$output_types.définitif
|
!output_types=$output_types.définitif
|
||||||
assign="def_mat."
|
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>
|
<h3 class="ruler">Matériels attribués définitivement</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -146,4 +157,5 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue