1
0
mirror of https://github.com/bitwarden/web synced 2026-01-01 16:13:15 +00:00

check status and types for org management

This commit is contained in:
Kyle Spearrin
2017-03-25 21:52:27 -04:00
parent 3c83741b13
commit 77ddc83a04
4 changed files with 21 additions and 10 deletions

View File

@@ -23,9 +23,16 @@
if (user.Organizations) {
var orgs = [];
for (var i = 0; i < user.Organizations.length; i++) {
// Only confirmed
if (user.Organizations[i].Status !== 2) {
continue;
}
orgs.push({
id: user.Organizations[i].Id,
name: user.Organizations[i].Name
name: user.Organizations[i].Name,
status: user.Organizations[i].Status,
type: user.Organizations[i].Type
});
}

View File

@@ -118,8 +118,10 @@
</div>
<div class="list-group" ng-if="model.organizations && model.organizations.length">
<a ng-repeat="org in model.organizations | orderBy: ['name']"
href="javascript:void(0)" ng-click="viewOrganization(org.id)" class="list-group-item">
<i class="fa fa-sitemap fa-fw"></i> {{org.name}}
href="javascript:void(0)" ng-click="org.type !== 2 && viewOrganization(org.id)" class="list-group-item">
<i class="fa fa-sitemap"></i>
{{org.name}}
<i class="fa fa-certificate" ng-show="org.type !== 2"></i>
</a>
</div>
<div class="box-footer">