https://github.com/TryGhost/Team/issues/581
The API now supports `posts.visibility` being an NQL string as well as the special-case `'members'` and `'paid'` values so the post settings menu visibility select needs to be updated to reflect that.
- swapped visibility dropdown for two radio buttons, "Public" and "Members-only" which uses the `<GhMembersSegmentSelect>` component
- updated post model to use a `visibility-string` transform
- converts `members` and `paid` to/from the NQL equivalent for correct display in the segment select
- updated post model with two additional properties `isPublic` and `visibilitySegment`
- `isPublic` helps with the radio button display
- `visibilitySegment` allows fallback to the default content visibility setting when set to public
- added validation for `post.visibility` so we can show an error and skip saving when members-only is selected and the segment select is cleared
- deleted the now-unused `<GhPsmVisibilityInput>` component
no refs
If a custom price is already set before completing the wizard, the set pricing wizard hides the UI to create default custom prices as it doesn't make sense and instead shows a custom message.
closes https://github.com/TryGhost/Team/issues/672
Custom products and prices were behind dev experiment flag as it was under active development over last couple of releases. Now that its coming out of development, this removes the dev flag for custom products changes.
closes https://github.com/TryGhost/Team/issues/678
closes https://github.com/TryGhost/Team/issues/681
The prices in "Add subscription" modal should follow the same ordering as on the product detail screen, ie. currency, amount. Also, we only want to allow adding subscriptions for active prices, so the list is filtered on that. Since a Stripe customer is not allowed to have subscriptions in multiple currencies, this also filters the available currency prices based on any active subscription for a member.
refs https://github.com/TryGhost/Team/issues/678
Covers error handling for missing name/amount/billing period for a price modal when adding a new price or editing existing price.
refs https://github.com/TryGhost/Team/issues/678
Product name is a mandatory field for a custom product, this change adds error handling on save and custom error message if product is attempted to save without name.
refs https://github.com/TryGhost/Team/issues/588
- When the email limit was reached the hardcoded "members" error message was shown. Have changed implementation of the upgrade modal to take the "message" coming from the server into account
no refs
Disables Edit/Archive actions on a price while an active save is ongoing for Product to avoid unwanted states due to multiple saves being called.
no refs
On (un)archiving a price, the visible amount for a price fluctuated till the save was completed due to incorrect amount calculation, fixed here.
refs https://github.com/TryGhost/Team/issues/641
When default prices are created via the setup wizard, this adds a default description for Monthly and Yearly prices that mimics the values set for them currently in Portal.
refs https://github.com/TryGhost/Team/issues/496
- all/free/paid are selectable via the segment select
- radio buttons should be kept to 3-4 max
- fixed pluralisation of member count below member segment when only 1 member is selected
refs https://github.com/TryGhost/Team/issues/637
With custom products it's possible to change the name and description of any price. This assumes that people would want to change the same properties of a Free membership, and wires up the values for free membership price settings to API
Co-authored-by: Peter Zimon <zimo@ghost.org>
refs https://github.com/TryGhost/Team/issues/643
Currently, the whole setup for choosing plans is built around hardcoded `monthly` / `yearly` which is also exposed in the Portal links/data attributes. Since we now have custom prices, this updates the UI to show links/attributes for all available custom prices and allowing them to function via their price ids.
refs https://github.com/TryGhost/Team/issues/581
requires https://github.com/TryGhost/Ghost/pull/12932
- added segment option and select to default newsletter recipients setting
- updated segment selector to fetch labels/products and show as options
- updated segment selector and count component to call an action when count changes so we can use it in the email confirmation modal
- removed usage and mapping of older `'none'`, `'all'`, `'free'`, and `'paid'` email recipient filter values
This reverts commit 0cf2fc9c24.
Hiding the launch wizard when there are existing prices causes an annoying flicker on the dashboard everytime we reload the page or navigate away. Instead of handling this client side, we'll push up the logic to hide the wizard on server.
refs https://github.com/TryGhost/Team/issues/644
In case the prices are already set for the default product, its confusing to have the launch wizard show the price setup again. We remove the wizard completely if the prices are already created for the default product.
refs https://github.com/TryGhost/Team/issues/496
reqs https://github.com/TryGhost/Ghost/pull/12925
The publish menu was meant to default to matching post visibility but that wasn't working consistently and didn't make sense for sites which don't email every post to their members.
A "Default newsletter recipients" option has been added to the "Email newsletter" settings screen and the publish menu updated to reflect the option. The free/paid toggles in the publish menu have also been swapped out for a multi-select style component that will cater to more complex member segmentation.
refs https://github.com/TryGhost/Team/issues/611
The UI for welcome page for paid signups is moved from Portal settings to Product page, this change wires up the new UI to the settings API as in Portal settings to function correctly
refs https://github.com/TryGhost/Team/issues/637
The paid signup setting was incorrectly still checking only for Monthly and yearly prices instead of custom prices list to show the paid signup input.
no issue
- simplified query params as they are only used to display a notification
- removed all controller knowledge and associated reset behaviour for query params
- moved notification display from `setupController` to `beforeModel` so the raw query params can be pulled off of the transition object
- removed unused service injections from `<GhMembersEmailSetting>`
- removed unused service injections and properties from members-email controller that were left over from a copy/paste
- converted members-email controller to a native class
- fixed "leave settings" confirmation modal behaviour that wasn't moved across in the the settings screen re-org