Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-14443] Cannot view pending MOE provider page #4970

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Admin/AdminConsole/Models/ProviderEditModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
GatewayCustomerUrl = gatewayCustomerUrl;
GatewaySubscriptionUrl = gatewaySubscriptionUrl;
Type = provider.Type;

if (Type == ProviderType.MultiOrganizationEnterprise)
{
var plan = providerPlans.Single();
EnterpriseMinimumSeats = plan.SeatMinimum;
Plan = plan.PlanType;
var plan = providerPlans.SingleOrDefault();

Check warning on line 39 in src/Admin/AdminConsole/Models/ProviderEditModel.cs

View check run for this annotation

Codecov / codecov/patch

src/Admin/AdminConsole/Models/ProviderEditModel.cs#L39

Added line #L39 was not covered by tests
EnterpriseMinimumSeats = plan?.SeatMinimum ?? 0;
Plan = plan?.PlanType;
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/Core/Billing/Extensions/BillingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ namespace Bit.Core.Billing.Extensions;
public static class BillingExtensions
{
public static bool IsBillable(this Provider provider) =>
provider is
{
Type: ProviderType.Msp or ProviderType.MultiOrganizationEnterprise,
Status: ProviderStatusType.Billable
};
provider.SupportsConsolidatedBilling() && provider.Status == ProviderStatusType.Billable;

public static bool SupportsConsolidatedBilling(this Provider provider)
=> provider.Type is ProviderType.Msp or ProviderType.MultiOrganizationEnterprise;

public static bool IsValidClient(this Organization organization)
=> organization is
Expand Down
Loading