From 1818dad0d194f3119be47b20db258c5c41b18bb2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 23 Mar 2017 23:01:22 -0400 Subject: [PATCH] remove sharing module. move subvaults --- src/app/app.js | 1 - src/app/config.js | 12 +++---- .../organizationPeopleController.js | 32 +++++++++++++++++-- .../views/organizationPeople.html | 10 +++--- .../views/organizationSubvaults.html | 22 ++++--------- src/app/sharing/sharingModule.js | 2 -- src/app/vault/vaultController.js | 1 - .../vaultSubvaultsController.js} | 4 +-- src/app/vault/views/vault.html | 8 ++--- .../views/vaultSubvaults.html} | 2 +- src/app/views/userLayout.html | 4 +-- src/index.html | 4 +-- 12 files changed, 55 insertions(+), 47 deletions(-) delete mode 100644 src/app/sharing/sharingModule.js rename src/app/{sharing/sharingController.js => vault/vaultSubvaultsController.js} (91%) rename src/app/{sharing/views/sharing.html => vault/views/vaultSubvaults.html} (99%) diff --git a/src/app/app.js b/src/app/app.js index 6d11648157..4f5366e094 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -15,7 +15,6 @@ 'bit.global', 'bit.accounts', 'bit.vault', - 'bit.sharing', 'bit.settings', 'bit.tools', 'bit.organization' diff --git a/src/app/config.js b/src/app/config.js index 684ac0d756..d368098c57 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -91,6 +91,12 @@ angular controller: 'vaultController', data: { pageTitle: 'My Vault' } }) + .state('backend.user.subvaults', { + url: '^/subvaults', + templateUrl: 'app/vault/views/vaultSubvaults.html', + controller: 'vaultSubvaultsController', + data: { pageTitle: 'Subvaults' } + }) .state('backend.user.settings', { url: '^/settings', templateUrl: 'app/settings/views/settings.html', @@ -109,12 +115,6 @@ angular controller: 'toolsController', data: { pageTitle: 'Tools' } }) - .state('backend.user.sharing', { - url: '^/sharing', - templateUrl: 'app/sharing/views/sharing.html', - controller: 'sharingController', - data: { pageTitle: 'Sharing Center' } - }) .state('backend.org', { templateUrl: 'app/views/organizationLayout.html', abstract: true diff --git a/src/app/organization/organizationPeopleController.js b/src/app/organization/organizationPeopleController.js index a08794e0cb..6f7085dac0 100644 --- a/src/app/organization/organizationPeopleController.js +++ b/src/app/organization/organizationPeopleController.js @@ -83,14 +83,42 @@ var users = []; for (var i = 0; i < list.Data.length; i++) { - users.push({ + var user = { id: list.Data[i].Id, userId: list.Data[i].UserId, name: list.Data[i].Name, email: list.Data[i].Email, status: list.Data[i].Status, type: list.Data[i].Type - }); + }; + + switch (user.type) { + case 0: + user.typeName = 'Owner'; + break; + case 1: + user.typeName = 'Admin'; + break; + case 2: + default: + user.typeName = 'User'; + break; + } + + switch (user.status) { + case 0: + user.statusName = 'Invited'; + break; + case 1: + user.statusName = 'Accepted'; + break; + case 2: + default: + user.statusName = 'Confirmed'; + break; + } + + users.push(user); } $scope.users = users; diff --git a/src/app/organization/views/organizationPeople.html b/src/app/organization/views/organizationPeople.html index cedd2d3dd2..88e986658e 100644 --- a/src/app/organization/views/organizationPeople.html +++ b/src/app/organization/views/organizationPeople.html @@ -7,7 +7,7 @@
-

Organization Users

+