refs TryGhost/Team#627
This updates the new Products settings screens to use real data from API for existing Custom Products and Prices to populate them on UI and allow site owners to edit them.
- List all Products of site and allow editing Product name
- List all Prices for a product and allow editing individual Price names
- Add new Prices on a Product
refs https://github.com/TryGhost/Team/issues/627
This is the reworked Member detail screen for Custom Products and adds
new functionality, or includes existing including:
- List Products for a Member, and the associated Subscriptions
- Allow cancelling/continuing said Subscriptions
- Adding a Product to a Member with a zero-amount Price
This reverts commit 7c6bace12e.
- the previous wording was correct and the behaviour needs to be changed to match rather than following the "allow free member signup" toggle behaviour
no issue
- `<GhTokenInput>` is based around `<PowerSelect>` but using Power Select's grouped options feature didn't work because we weren't falling back to it's built-in group component
- updated the `<GhTokenInput>` template to use a supplied block as the option display rather than only displaying the option's label (allows for counts etc to be shown alongside dropdown options)
refs https://github.com/TryGhost/Team/issues/579
"Only people I invite" did not marry with behaviour. When selected it matches the old "Allow free member signup = false" toggle setting which only disables free member signup rather than disabling all front-end signup
refs https://github.com/TryGhost/Team/issues/627
Wires the real Products data from API to the mock Product settings screen including Product Prices list as well as opening of edit/new price modals. The new Product setting is still behind the developer experiment flag as is under active development, the changes in this commit only allows readonly data but not save/edit upstream.
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
refs https://github.com/TryGhost/Team/issues/579
- new Access settings screen that moves subscription access and default post visibility from the Payments settings screen
- expanded "Free signup" toggle into three signup access options
- "anyone" - same as previous "allow free member signup" option set to `true`
- "invite only" - same as previous "allow free member signup" option set to `false`
- "nobody" - completely disables member signup and login. Removes injected portal and stripe scripts on the front-end and hides member related sections on the admin dashboard
(this commit moves the above changes out from behind the developer experiments flag and cleans up now-unused code)
no issue
- The modal only appears when the user hits a limitation trying to activate a custom theme not part of the allowlist (if the custom theme allowlist is configured)
- Changed the upgrade button to green to match the design
no issue
Unsaved changes handling hadn't been moved across fully to the payments screen when settings were re-jigged meaning changes on the payments screen would make settings dirty and show unsaved changes modal unexpectedly on other screens.
- refactored `members-payments` route to use native classes
- used same unsaved changes pattern as `members-access` route/controller
no issue
- having owner-only access control in the template meant the route was accessible but would show a blank page
- updated access control in the `members-payments` route to redirect admins to the settings index screen and non-admins to the default home screen
no issue
- when the role selection was extracted to an external component the limit validation was also extracted but had no way of feeding back to the consumer
- added `onValidationSuccess` and `onValidationFailure` arguments to the role selection component to allow validation feedback to the consumer
- updated staff invite modal with actions to update state based on validation so the modal's buttons can update accordingly
refs https://github.com/TryGhost/Team/issues/579
Members is essentially disabled when signup access is set to "Nobody" so it doesn't make sense to show members related charts and actions in the dashboard.
- adds `showMembersData` property to the dashboard controller that returns `false` when members is disabled
- wraps members related sections of the dashboard in conditionals
refs https://github.com/TryGhost/Team/issues/579
- adds "Nobody" option that will set `members_signup_access` setting to `'none'`
- when selected also sets `default_content_visibility` setting to `'public'`, expands it if collapsed and disables other options (that setting doesn't make sense when members is disabled, individual post access can still be set manually if needed)
requires https://github.com/TryGhost/Ghost/pull/12886
- renamed `membersAllowFreeSignup` to `membersSignupAccess` and changed type to match new setting
- added `membersAllowFreeSignup` computed property to map to the new setting to avoid having to migrate code elsewhere that will be removed once the new options are out of developer experiments