Hi,
how i can get value of viewObject.options.entityType in the {{each}} context ?
Thanks
how i can get value of viewObject.options.entityType in the {{each}} context ?
Thanks
PHP Code:
<div class="margin-bottom">
<p>{{viewObject.options.entityType}}</p> // NOT EMPTY
<p>{{viewObject.options.entityId}}</p> // NOT EMPTY
</div>
<div>
<table width='100%'>
<tr>
<td width='70%'>nomenclature</td>
<td width='10%'>amount</td>
<td width='20%'>nomenCode</td>
</tr>
</table>
</div>
<br />
<div>
{{#each viewObject.nomenclatureDataList}}
<span title='{{tooltip}}'>
<table width='100%'>
<tr>
<td width='70%'>
<button
class="action btn btn-warning btn-x-wide"
type="button"
data-action="setCare"
data-entity-type="{{viewObject.options.entityType}}" // <==== EMPTY
data-entity-id="{{viewObject.options.entityId}}" // <==== EMPTY
data-nomenclature-id="{{nomenclatureId}}"
data-nomen-code="{{nomenCode}}"
data-amount-base="{{amount}}"
data-profession-id="{{professionId}}"
data-profession-name="{{professionName}}"
>
{{nomenclatureName}}
</button>
</td>
<td width='10%'>
{{amount}}
</td>
<td width='20%'>
<a href='#Nomenclature/view/{{nomenclatureId}}' target='_blank'>{{nomenCode}}</a>
</td>
{{#if selected}}<span class="check-icon fas fa-check" style="vertical-align: middle; margin: 0 10px;"></span>{{/if}}
</tr>
</table>
</span>
{{/each}}
</div>
<br/>
<div class="margin-bottom">
</div>
Comment