[AC-1078] feat: do not block client org creating (#4899)
Single org policy shouldn't not block provider from creating client organizations
This commit is contained in:
parent
720b61076a
commit
c223567cae
|
@ -71,7 +71,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
this.formGroup?.controls?.plan?.setValue(plan);
|
||||
}
|
||||
private _plan = PlanType.Free;
|
||||
@Input() providerId: string;
|
||||
@Input() providerId?: string;
|
||||
@Output() onSuccess = new EventEmitter<OnSuccessArgs>();
|
||||
@Output() onCanceled = new EventEmitter<void>();
|
||||
@Output() onTrialBillingSuccess = new EventEmitter();
|
||||
|
@ -80,7 +80,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
selfHosted = false;
|
||||
productTypes = ProductType;
|
||||
formPromise: Promise<string>;
|
||||
singleOrgPolicyBlock = false;
|
||||
singleOrgPolicyAppliesToActiveUser = false;
|
||||
isInTrialFlow = false;
|
||||
discount = 0;
|
||||
|
||||
|
@ -146,7 +146,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
.policyAppliesToActiveUser$(PolicyType.SingleOrg)
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe((policyAppliesToActiveUser) => {
|
||||
this.singleOrgPolicyBlock = policyAppliesToActiveUser;
|
||||
this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
|
@ -157,6 +157,10 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
|
|||
this.destroy$.complete();
|
||||
}
|
||||
|
||||
get singleOrgPolicyBlock() {
|
||||
return this.singleOrgPolicyAppliesToActiveUser && this.providerId == null;
|
||||
}
|
||||
|
||||
get createOrganization() {
|
||||
return this.organizationId == null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue