Ghost/ghost/admin/app/components/offers/segment-select.hbs
Ronald Langeveld 0e2d1b3afd
Added redeemed offers filtering for members (#16071)
closes https://github.com/TryGhost/Team/issues/2011

- Gives publishers the ability to filter members based on which offer they used (redeemed) when they subscribed for a paid membership.
- On the offers page, the redemption count number links to a the members page with the filter already applied making it easy to have insight on which members used the offer / coupon.
2023-01-11 20:13:09 +08:00

23 lines
703 B
Handlebars

<GhTokenInput
@options={{this.options}}
@selected={{this.selectedOptions}}
@disabled={{or @disabled this.fetchOptionsTask.isRunning}}
@optionsComponent={{component "power-select/options"}}
@allowCreation={{false}}
@renderInPlace={{this.renderInPlace}}
@onChange={{this.setSegment}}
@class="select-members gh-offer-token-input"
@placeholder="Select an offer"
as |option|
>
<span data-test-offers-segment={{option.id}}>{{option.name}}</span>
</GhTokenInput>
{{#if @showMemberCount}}
<GhMembersSegmentCount
@segment={{@segment}}
@enforcedFilter={{@enforcedCountFilter}}
@onSegmentCountChange={{@onSegmentCountChange}}
/>
{{/if}}