mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
Instantiate all status map arrays on load (#1107)
* Instantiate all status map arrays on load * Update jslib * Linter fixes
This commit is contained in:
parent
2c1b06a5d8
commit
44f624e9a6
@ -7,6 +7,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { ToasterService } from 'angular2-toaster';
|
||||
|
||||
import { ApiService } from 'jslib-common/abstractions/api.service';
|
||||
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { UserService } from 'jslib-common/abstractions/user.service';
|
||||
@ -17,7 +18,7 @@ import { ProviderService } from '../services/provider.service';
|
||||
|
||||
import { Organization } from 'jslib-common/models/domain/organization';
|
||||
import { Provider } from 'jslib-common/models/domain/provider';
|
||||
import { ApiService } from 'jslib-common/abstractions';
|
||||
|
||||
import { PlanType } from 'jslib-common/enums/planType';
|
||||
|
||||
const DisallowedPlanTypes = [PlanType.Free, PlanType.FamiliesAnnually2019, PlanType.FamiliesAnnually];
|
||||
|
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit fdf0eb989be49e6f5d8215f2eac1da275923f427
|
||||
Subproject commit 65c998dd0d8798f1ea1ee321bb490d5b94074f0c
|
@ -106,6 +106,10 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
||||
async load() {
|
||||
const response = await this.getUsers();
|
||||
this.statusMap.clear();
|
||||
for (const status of Utils.iterateEnum(this.userStatusType)) {
|
||||
this.statusMap.set(status, []);
|
||||
}
|
||||
|
||||
this.allUsers = response.data != null && response.data.length > 0 ? response.data : [];
|
||||
this.allUsers.sort(Utils.getSortFunction(this.i18nService, 'email'));
|
||||
this.allUsers.forEach(u => {
|
||||
@ -311,4 +315,4 @@ export abstract class BasePeopleComponent<UserType extends ProviderUserUserDetai
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user