aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/serviceLimit/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/serviceLimit/store.js')
-rw-r--r--src/features/serviceLimit/store.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/features/serviceLimit/store.js b/src/features/serviceLimit/store.js
deleted file mode 100644
index b1e55a1fc..000000000
--- a/src/features/serviceLimit/store.js
+++ /dev/null
@@ -1,42 +0,0 @@
1import { computed, observable } from 'mobx';
2import { FeatureStore } from '../utils/FeatureStore';
3import { DEFAULT_SERVICE_LIMIT } from '../../config';
4
5const debug = require('debug')('Ferdi:feature:serviceLimit:store');
6
7export class ServiceLimitStore extends FeatureStore {
8 @observable isServiceLimitEnabled = false;
9
10 start(stores, actions) {
11 debug('start');
12 this.stores = stores;
13 this.actions = actions;
14
15 this.isServiceLimitEnabled = false;
16 }
17
18 stop() {
19 super.stop();
20
21 this.isServiceLimitEnabled = false;
22 }
23
24 @computed get userHasReachedServiceLimit() {
25 return false;
26 // if (!this.isServiceLimitEnabled) return false;
27
28 // return this.serviceLimit !== 0 && this.serviceCount >= this.serviceLimit;
29 }
30
31 @computed get serviceLimit() {
32 if (!this.isServiceLimitEnabled || this.stores.features.features.serviceLimitCount === 0) return 0;
33
34 return this.stores.features.features.serviceLimitCount || DEFAULT_SERVICE_LIMIT;
35 }
36
37 @computed get serviceCount() {
38 return this.stores.services.all.length;
39 }
40}
41
42export default ServiceLimitStore;