1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

[PM-24412] Make billing api service call in members component non blocking (#16103)

* refactor organization to signal, unblock loading due to api call

* continue refactor WIP

* clean up

* refactor billingMetadata signal to observble

* deffer billing call

* refactor billingMetadata

* cleanup, add comment

* qa bug: add missing param
This commit is contained in:
Brandon Treston
2025-09-08 09:42:02 -04:00
committed by GitHub
parent 0b73b97d7a
commit b93602b09e
8 changed files with 714 additions and 675 deletions

View File

@@ -36,7 +36,7 @@ export class Policy extends Domain {
return new Policy(new PolicyData(response));
}
static fromListResponse(response: ListResponse<PolicyResponse>): Policy[] | undefined {
return response.data?.map((d) => Policy.fromResponse(d)) ?? undefined;
static fromListResponse(response: ListResponse<PolicyResponse>): Policy[] {
return response.data.map((d) => Policy.fromResponse(d));
}
}

View File

@@ -13,7 +13,7 @@ import { ResetPasswordPolicyOptions } from "../../models/domain/reset-password-p
import { POLICIES } from "./policy-state";
export function policyRecordToArray(policiesMap: { [id: string]: PolicyData }) {
export function policyRecordToArray(policiesMap: { [id: string]: PolicyData }): Policy[] {
return Object.values(policiesMap || {}).map((f) => new Policy(f));
}