2022-02-10 20:51:50 +00:00
|
|
|
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
|
|
<D.Trigger
|
|
|
|
data-test-popup-menu-trigger="true"
|
|
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
|
|
@htmlTag="button"
|
|
|
|
>
|
|
|
|
{{or this.startMonth "Month"}}
|
|
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
|
|
</D.Trigger>
|
2022-02-15 17:43:37 +00:00
|
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
2022-02-10 20:51:50 +00:00
|
|
|
<nav class="box menu scroll">
|
|
|
|
<ul class="menu-list">
|
2022-02-17 20:17:59 +00:00
|
|
|
{{#each this.months as |month index|}}
|
2022-02-10 20:51:50 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
2022-02-17 20:17:59 +00:00
|
|
|
class="button link"
|
|
|
|
disabled={{if (lt index this.allowedMonthMax) false true}}
|
|
|
|
{{on "click" (fn this.selectStartMonth month D.actions)}}
|
2022-02-10 20:51:50 +00:00
|
|
|
>
|
|
|
|
{{month}}
|
|
|
|
</button>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</D.Content>
|
|
|
|
</BasicDropdown>
|
|
|
|
<BasicDropdown @class="popup-menu" @horizontalPosition="auto-right" @verticalPosition="below" as |D|>
|
|
|
|
<D.Trigger
|
|
|
|
data-test-popup-menu-trigger="true"
|
|
|
|
class={{concat "toolbar-link" (if D.isOpen " is-active")}}
|
|
|
|
@htmlTag="button"
|
|
|
|
>
|
|
|
|
{{or this.startYear "Year"}}
|
|
|
|
<Chevron @direction="down" @isButton={{true}} />
|
|
|
|
</D.Trigger>
|
2022-02-15 17:43:37 +00:00
|
|
|
<D.Content @defaultClass="popup-menu-content is-wide">
|
2022-02-10 20:51:50 +00:00
|
|
|
<nav class="box menu">
|
|
|
|
<ul class="menu-list">
|
|
|
|
{{#each this.years as |year|}}
|
2022-02-17 20:17:59 +00:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="button link"
|
|
|
|
disabled={{if (eq year this.disabledYear) true false}}
|
|
|
|
{{on "click" (fn this.selectStartYear year D.actions)}}
|
|
|
|
>
|
2022-02-10 20:51:50 +00:00
|
|
|
{{year}}
|
|
|
|
</button>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</D.Content>
|
|
|
|
</BasicDropdown>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="button is-primary"
|
|
|
|
disabled={{if (and this.startMonth this.startYear) false true}}
|
2022-02-14 18:27:09 +00:00
|
|
|
{{on "click" this.saveDateSelection}}
|
2022-02-10 20:51:50 +00:00
|
|
|
>
|
2022-02-17 20:17:59 +00:00
|
|
|
{{or @submitText "Submit"}}
|
2022-02-10 20:51:50 +00:00
|
|
|
</button>
|