aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/FeaturesStore.js2
-rw-r--r--src/stores/ServicesStore.js3
-rw-r--r--src/stores/index.js2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js
index e7832088b..1ac05d3b9 100644
--- a/src/stores/FeaturesStore.js
+++ b/src/stores/FeaturesStore.js
@@ -16,6 +16,7 @@ import workspaces from '../features/workspaces';
16import shareFranz from '../features/shareFranz'; 16import shareFranz from '../features/shareFranz';
17import announcements from '../features/announcements'; 17import announcements from '../features/announcements';
18import settingsWS from '../features/settingsWS'; 18import settingsWS from '../features/settingsWS';
19import serviceLimit from '../features/serviceLimit';
19 20
20import { DEFAULT_FEATURES_CONFIG } from '../config'; 21import { DEFAULT_FEATURES_CONFIG } from '../config';
21 22
@@ -75,5 +76,6 @@ export default class FeaturesStore extends Store {
75 shareFranz(this.stores, this.actions); 76 shareFranz(this.stores, this.actions);
76 announcements(this.stores, this.actions); 77 announcements(this.stores, this.actions);
77 settingsWS(this.stores, this.actions); 78 settingsWS(this.stores, this.actions);
79 serviceLimit(this.stores, this.actions);
78 } 80 }
79} 81}
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 13f929c2f..349de2c9b 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -13,6 +13,7 @@ import CachedRequest from './lib/CachedRequest';
13import { matchRoute } from '../helpers/routing-helpers'; 13import { matchRoute } from '../helpers/routing-helpers';
14import { gaEvent, statsEvent } from '../lib/analytics'; 14import { gaEvent, statsEvent } from '../lib/analytics';
15import { workspaceStore } from '../features/workspaces'; 15import { workspaceStore } from '../features/workspaces';
16import { serviceLimitStore } from '../features/serviceLimit';
16 17
17const debug = require('debug')('Franz:ServiceStore'); 18const debug = require('debug')('Franz:ServiceStore');
18 19
@@ -164,6 +165,8 @@ export default class ServicesStore extends Store {
164 165
165 // Actions 166 // Actions
166 @action async _createService({ recipeId, serviceData, redirect = true }) { 167 @action async _createService({ recipeId, serviceData, redirect = true }) {
168 if (serviceLimitStore.userHasReachedServiceLimit) return;
169
167 const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData); 170 const data = this._cleanUpTeamIdAndCustomUrl(recipeId, serviceData);
168 171
169 const response = await this.createServiceRequest.execute(recipeId, data)._promise; 172 const response = await this.createServiceRequest.execute(recipeId, data)._promise;
diff --git a/src/stores/index.js b/src/stores/index.js
index 1912418a2..ff01a3dd3 100644
--- a/src/stores/index.js
+++ b/src/stores/index.js
@@ -12,6 +12,7 @@ import RequestStore from './RequestStore';
12import GlobalErrorStore from './GlobalErrorStore'; 12import GlobalErrorStore from './GlobalErrorStore';
13import { workspaceStore } from '../features/workspaces'; 13import { workspaceStore } from '../features/workspaces';
14import { announcementsStore } from '../features/announcements'; 14import { announcementsStore } from '../features/announcements';
15import { serviceLimitStore } from '../features/serviceLimit';
15 16
16export default (api, actions, router) => { 17export default (api, actions, router) => {
17 const stores = {}; 18 const stores = {};
@@ -31,6 +32,7 @@ export default (api, actions, router) => {
31 globalError: new GlobalErrorStore(stores, api, actions), 32 globalError: new GlobalErrorStore(stores, api, actions),
32 workspaces: workspaceStore, 33 workspaces: workspaceStore,
33 announcements: announcementsStore, 34 announcements: announcementsStore,
35 serviceLimit: serviceLimitStore,
34 }); 36 });
35 // Initialize all stores 37 // Initialize all stores
36 Object.keys(stores).forEach((name) => { 38 Object.keys(stores).forEach((name) => {