chore: 🤖 add feature flag to toolbar

This commit is contained in:
dharini committed 2021-11-15 13:49:19 -08:00
1 parent bfa240cc9e
commit ac3d42ba41
1 file changed
+48 -41
@@ -13,50 +13,57 @@
</page.header>
<page.body>
{{#if
(or @model (has-resource-filter-param-selections 'scopes.scope.sessions'))
}}
<Rose::Toolbar>
<Rose::Form as |form|>
{{#with
(resource-filter-param 'scopes.scope.sessions' 'status')
as |filter|
}}
<Rose::Dropdown
@text={{t (concat 'form.' filter.name '.label')}}
@count={{filter.selectedValue.length}}
@ignoreClickInside={{true}}
as |dropdown|
>
<form.checkboxGroup
@name={{filter.name}}
@items={{filter.allowedValues}}
@selectedItems={{filter.selectedValue}}
@onChange={{route-action 'filterBy' filter.name}}
as |group|
{{#if (feature-flag 'filter')}}
{{#if
(or
@model (has-resource-filter-param-selections 'scopes.scope.sessions')
)
}}
<Rose::Toolbar>
<Rose::Form as |form|>
{{#with
(resource-filter-param 'scopes.scope.sessions' 'status')
as |filter|
}}
<Rose::Dropdown
@text={{t (concat 'form.' filter.name '.label')}}
@count={{filter.selectedValue.length}}
@ignoreClickInside={{true}}
as |dropdown|
>
<dropdown.item>
<group.checkbox
@label={{t (concat 'resources.session.status.' group.item)}}
value={{group.item}}
/>
</dropdown.item>
</form.checkboxGroup>
</Rose::Dropdown>
{{/with}}
<form.checkboxGroup
@name={{filter.name}}
@items={{filter.allowedValues}}
@selectedItems={{filter.selectedValue}}
@onChange={{route-action 'filterBy' filter.name}}
as |group|
>
<dropdown.item>
<group.checkbox
@label={{t
(concat 'resources.session.status.' group.item)
}}
value={{group.item}}
/>
</dropdown.item>
</form.checkboxGroup>
</Rose::Dropdown>
{{/with}}
{{#if (has-resource-filter-param-selections 'scopes.scope.sessions')}}
<Rose::Button
@style='inline-link-action'
@iconLeft='flight-icons/svg/x-16'
{{on 'click' (route-action 'clearAllFilters')}}
>{{t 'actions.clear-all-filters'}}
</Rose::Button>
{{/if}}
</Rose::Form>
</Rose::Toolbar>
{{#if
(has-resource-filter-param-selections 'scopes.scope.sessions')
}}
<Rose::Button
@style='inline-link-action'
@iconLeft='flight-icons/svg/x-16'
{{on 'click' (route-action 'clearAllFilters')}}
>{{t 'actions.clear-all-filters'}}
</Rose::Button>
{{/if}}
</Rose::Form>
</Rose::Toolbar>
{{/if}}
{{/if}}
{{#if @model}}
<Rose::Table as |table|>
<table.header as |header|>