2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Fixed syncing tiers status between Ember and AdminX (#18353)

refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 0ddea75</samp>

Added `membersUtils` service to `AdminXSettings` component to support
tiers feature. Reloaded service after saving settings with
`TiersResponseType`.
This commit is contained in:
Jono M 2023-09-26 12:13:09 +01:00 committed by GitHub
parent 1f2dbc95f9
commit ea64107f9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,6 +278,7 @@ export default class AdminXSettings extends Component {
@service store;
@service settings;
@service router;
@service membersUtils;
@inject config;
@ -323,6 +324,11 @@ export default class AdminXSettings extends Component {
// Blog title is based on settings, but the one stored in config is used instead in various places
this.config.blogTitle = response.settings.find(setting => setting.key === 'title').value;
}
if (dataType === 'TiersResponseType') {
// membersUtils has local state which needs to be updated
this.membersUtils.reload();
}
};
onInvalidate = (dataType) => {