From 76559f2895012803aed3256ce521b9cfff2f63b8 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Mon, 5 Aug 2019 13:24:35 +0200 Subject: WIP: add option to activate trial --- src/models/User.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/models') diff --git a/src/models/User.js b/src/models/User.js index bec78fc16..0a2b1f62a 100644 --- a/src/models/User.js +++ b/src/models/User.js @@ -20,6 +20,10 @@ export default class User { @observable isSubscriptionOwner = false; + @observable hasSubscription = false; + + @observable hadSubscription = false; + @observable isPremium = false; @observable beta = false; @@ -32,6 +36,9 @@ export default class User { @observable locale = false; + @observable team = {}; + + constructor(data) { if (!data.id) { throw Error('User requires Id'); @@ -47,8 +54,13 @@ export default class User { this.beta = data.beta || this.beta; this.donor = data.donor || this.donor; this.isDonor = data.isDonor || this.isDonor; - this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; this.isMiner = data.isMiner || this.isMiner; this.locale = data.locale || this.locale; + + this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; + this.hasSubscription = data.hasSubscription || this.hasSubscription; + this.hadSubscription = data.hadSubscription || this.hadSubscription; + + this.team = data.team || this.team; } } -- cgit v1.2.3-54-g00ecf