1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-05 10:03:21 +00:00

[AC-2319] remove the owned by business checkbox business name (#8674)

* Removed business name from organization create/upgrade flows, and org info page

* Prefilling the logged in user's email to the billing email when creating an organization
This commit is contained in:
Conner Turnbull
2024-04-12 10:17:38 -04:00
committed by GitHub
parent a12c7242d6
commit b914260705
5 changed files with 19 additions and 35 deletions

View File

@@ -20,19 +20,4 @@
<input bitInput type="email" formControlName="clientOwnerEmail" />
</bit-form-field>
</div>
<div *ngIf="!isProvider && !acceptingSponsorship">
<input
type="checkbox"
name="businessOwned"
formControlName="businessOwned"
(change)="changedBusinessOwned.emit()"
/>
<bit-label for="businessOwned" class="tw-mb-3">{{ "accountOwnedBusiness" | i18n }}</bit-label>
<div class="tw-mt-4" *ngIf="formGroup.controls['businessOwned'].value">
<bit-form-field class="tw-w-1/2">
<bit-label>{{ "businessName" | i18n }}</bit-label>
<input bitInput type="text" formControlName="businessName" />
</bit-form-field>
</div>
</div>
</form>

View File

@@ -1,15 +1,32 @@
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { UntypedFormGroup } from "@angular/forms";
import { firstValueFrom } from "rxjs";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
@Component({
selector: "app-org-info",
templateUrl: "organization-information.component.html",
})
export class OrganizationInformationComponent {
export class OrganizationInformationComponent implements OnInit {
@Input() nameOnly = false;
@Input() createOrganization = true;
@Input() isProvider = false;
@Input() acceptingSponsorship = false;
@Input() formGroup: UntypedFormGroup;
@Output() changedBusinessOwned = new EventEmitter<void>();
constructor(private accountService: AccountService) {}
async ngOnInit(): Promise<void> {
if (this.formGroup.controls.billingEmail.value) {
return;
}
const activeAccount = await firstValueFrom(this.accountService.activeAccount$);
if (activeAccount?.email) {
this.formGroup.controls.billingEmail.setValue(activeAccount.email);
}
}
}