mirror of
https://github.com/bitwarden/server.git
synced 2025-06-27 14:16:19 -05:00

* [NO LOGIC] Rename MultiOrganizationEnterprise to BusinessUnit * [Core] Add IMailService.SendBusinessUnitConversionInviteAsync * [Core] Add BusinessUnitConverter * [Admin] Add new permission * [Admin] Add BusinessUnitConverterController * [Admin] Add Convert to Business Unit button to Organization edit page * [Api] Add OrganizationBillingController.SetupBusinessUnitAsync action * [Multi] Propagate provider type to sync response * [Multi] Put updates behind feature flag * [Tests] BusinessUnitConverterTests * Run dotnet format * Fixing post-main merge compilation failure
76 lines
3.0 KiB
Plaintext
76 lines
3.0 KiB
Plaintext
@model Bit.Admin.Billing.Models.BusinessUnitConversionModel
|
|
|
|
@{
|
|
ViewData["Title"] = "Convert Organization to Business Unit";
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(Model.ProviderAdminEmail))
|
|
{
|
|
<h1>Convert @Model.Organization.Name to Business Unit</h1>
|
|
@if (!string.IsNullOrEmpty(Model.Success))
|
|
{
|
|
<div class="alert alert-success alert-dismissible fade show mb-3" role="alert">
|
|
@Model.Success
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
@if (Model.Errors?.Any() ?? false)
|
|
{
|
|
@foreach (var error in Model.Errors)
|
|
{
|
|
<div class="alert alert-danger alert-dismissible fade show mb-3" role="alert">
|
|
@error
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
}
|
|
<p>This organization has a business unit conversion in progress.</p>
|
|
|
|
<div class="mb-3">
|
|
<label asp-for="ProviderAdminEmail" class="form-label"></label>
|
|
<input type="email" class="form-control" asp-for="ProviderAdminEmail" disabled></input>
|
|
</div>
|
|
|
|
<div class="d-flex gap-2">
|
|
<form method="post" asp-controller="BusinessUnitConversion" asp-action="ResendInvite" asp-route-organizationId="@Model.Organization.Id">
|
|
<input type="hidden" asp-for="ProviderAdminEmail" />
|
|
<button type="submit" class="btn btn-primary mb-2">Resend Invite</button>
|
|
</form>
|
|
<form method="post" asp-controller="BusinessUnitConversion" asp-action="Reset" asp-route-organizationId="@Model.Organization.Id">
|
|
<input type="hidden" asp-for="ProviderAdminEmail" />
|
|
<button type="submit" class="btn btn-danger mb-2">Reset Conversion</button>
|
|
</form>
|
|
@if (Model.ProviderId.HasValue)
|
|
{
|
|
<a asp-controller="Providers"
|
|
asp-action="Edit"
|
|
asp-route-id="@Model.ProviderId"
|
|
class="btn btn-secondary mb-2">
|
|
Go to Provider
|
|
</a>
|
|
}
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<h1>Convert @Model.Organization.Name to Business Unit</h1>
|
|
@if (Model.Errors?.Any() ?? false)
|
|
{
|
|
@foreach (var error in Model.Errors)
|
|
{
|
|
<div class="alert alert-danger alert-dismissible fade show mb-3" role="alert">
|
|
@error
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
}
|
|
<form method="post" asp-controller="BusinessUnitConversion" asp-action="Initiate" asp-route-organizationId="@Model.Organization.Id">
|
|
<div asp-validation-summary="All" class="alert alert-danger"></div>
|
|
<div class="mb-3">
|
|
<label asp-for="ProviderAdminEmail" class="form-label"></label>
|
|
<input type="email" class="form-control" asp-for="ProviderAdminEmail" />
|
|
</div>
|
|
<button type="submit" class="btn btn-primary mb-2">Convert</button>
|
|
</form>
|
|
}
|