Skip to content

Commit

Permalink
Refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyprain-okeke committed Dec 31, 2024
1 parent f141f8f commit 4dfdab9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions apps/web/src/app/vault/org-vault/vault.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export class VaultComponent implements OnInit, OnDestroy {
protected currentSearchText$: Observable<string>;
protected freeTrial$: Observable<FreeTrial>;
protected resellerWarning$: Observable<ResellerWarning | null>;
protected resellerWarning: ResellerWarning;
/**
* A list of collections that the user can assign items to and edit those items within.
* @protected
Expand Down Expand Up @@ -619,14 +618,14 @@ export class VaultComponent implements OnInit, OnDestroy {
}),
);

this.resellerWarning$ = combineLatest([organization$]).pipe(
filter(([org]) => org.isOwner),
switchMap(([org]) =>
combineLatest([of(org), this.billingApiService.getOrganizationBillingMetadata(org.id)]),
this.resellerWarning$ = organization$.pipe(
filter((org) => org.isOwner),

Check warning on line 622 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L621-L622

Added lines #L621 - L622 were not covered by tests
switchMap((org) =>
from(this.billingApiService.getOrganizationBillingMetadata(org.id)).pipe(
map((metadata) => ({ org, metadata })),

Check warning on line 625 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L624-L625

Added lines #L624 - L625 were not covered by tests
),
),
map(([org, organizationMetaData]) => {
return this.resellerWarningService.getWarning(org, organizationMetaData);
}),
map(({ org, metadata }) => this.resellerWarningService.getWarning(org, metadata)),

Check warning on line 628 in apps/web/src/app/vault/org-vault/vault.component.ts

View check run for this annotation

Codecov / codecov/patch

apps/web/src/app/vault/org-vault/vault.component.ts#L628

Added line #L628 was not covered by tests
);

firstSetup$
Expand Down

0 comments on commit 4dfdab9

Please sign in to comment.