aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/User.js
diff options
context:
space:
mode:
authorLibravatar haraldox <hnaumann+github@gmail.com>2018-02-13 11:02:28 +0100
committerLibravatar haraldox <hnaumann+github@gmail.com>2018-02-13 11:02:28 +0100
commit4284b88f44caa9b7adb180a1e07bdd834f5b7ad6 (patch)
tree619e5a42fb9100c4b7982a6ecf55d28fe276e546 /src/models/User.js
parentMerge pull request #654 from meetfranz/feature/invite-button (diff)
downloadferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.tar.gz
ferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.tar.zst
ferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.zip
feat(App) Feature Added enterprise UI
##Account Dashboard: - CHANGE account type to 'Enterprise Account' (green badge) - REMOVE button 'Edit Account' if SSO login is used - ADD company name and contact information - REMOVE premium account plans section - REMOVE account deletion ##Settings Navigation - REMOVE available services if user not allowed to manage services ##Edit Service - REMOVE delete button if user not allowed to manage services - CHANGE disable team / custom URL if user not allowed to manage services ##Edit User - REMOVE account type ##User.js - ADD mock enterprise properties ##Input.js - FIX disabled passthrough
Diffstat (limited to 'src/models/User.js')
-rw-r--r--src/models/User.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/models/User.js b/src/models/User.js
index 2e5df4795..2eb48394f 100644
--- a/src/models/User.js
+++ b/src/models/User.js
@@ -1,4 +1,4 @@
1import { observable } from 'mobx'; 1import { observable, computed } from 'mobx';
2 2
3export default class User { 3export default class User {
4 id = null; 4 id = null;
@@ -15,6 +15,17 @@ export default class User {
15 @observable donor = {}; 15 @observable donor = {};
16 @observable isDonor = false; 16 @observable isDonor = false;
17 @observable isMiner = false; 17 @observable isMiner = false;
18 @observable isSSO = false;
19 @observable clientSettings = {
20 userCanManageServices: true,
21 };
22 @observable company = {
23 name: 'Happle Apps',
24 contact: {
25 technical: 'technical@company.com',
26 default: 'default@company.com',
27 },
28 };
18 29
19 constructor(data) { 30 constructor(data) {
20 if (!data.id) { 31 if (!data.id) {
@@ -33,5 +44,13 @@ export default class User {
33 this.isDonor = data.isDonor || this.isDonor; 44 this.isDonor = data.isDonor || this.isDonor;
34 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; 45 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner;
35 this.isMiner = data.isMiner || this.isMiner; 46 this.isMiner = data.isMiner || this.isMiner;
47 this.isSSO = data.isSSO || this.isSSO;
48 this.clientSettings = data.clientSettings || this.clientSettings;
49 this.company = data.company || this.company;
50 }
51
52 @computed get isEnterprise() {
53 // return false
54 return this.company.name !== undefined;
36 } 55 }
37} 56}