If there are 0 envs, do not show the toggle arrow and disable the link

This commit is contained in:
leigh-mil
2019-08-06 10:19:54 -04:00
parent d7cd913881
commit 71e72bcbcf

View File

@@ -55,8 +55,10 @@
<span>{{ "portfolios.applications.team_text" | translate }} ({{ application.members | length }})</span> <span>{{ "portfolios.applications.team_text" | translate }} ({{ application.members | length }})</span>
</a> </a>
<div class='separator'></div> <div class='separator'></div>
<a class='icon-link triangle-box' v-on:click="toggleSection('{{ section_name }}')"> {% set has_environments = 0 < (application.environments|length) %}
<a class='icon-link triangle-box' v-on:click="toggleSection('{{ section_name }}')" disabled="{{ not has_environments }}">
<span>Environments ({{ application.environments|length }})</span> <span>Environments ({{ application.environments|length }})</span>
{% if has_environments %}
<span v-if="selectedSection === '{{ section_name }}'"> <span v-if="selectedSection === '{{ section_name }}'">
{{ Icon('caret_up') }} {{ Icon('caret_up') }}
</span> </span>
@@ -64,6 +66,7 @@
{{ Icon('caret_down') }} {{ Icon('caret_down') }}
</span> </span>
<div class="triangle-up" v-if="selectedSection === '{{ section_name }}'"></div> <div class="triangle-up" v-if="selectedSection === '{{ section_name }}'"></div>
{% endif %}
</a> </a>
</div> </div>
</div> </div>