Skip to content

Commit a0c90d8

Browse files
committed
feat(arc-saas): added a logic for domain name automatically fetched when we fill mail id
added a logic for domain name automatically fetched when we fill mail id GH-64
1 parent a806eab commit a0c90d8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

projects/saas-ui/src/app/main/components/tenant-registration/tenant-registration.component.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,16 @@ export class TenantRegistrationComponent {
7171
this.route.params.subscribe(params => {
7272
this.leadId = params['leadId'];
7373
});
74+
// for automatically writing domain name from email
75+
this.tenantRegForm.get('email').valueChanges.subscribe(email => {
76+
const emailDomain = email?.substring(email.lastIndexOf('@') + 1);
77+
if (emailDomain) {
78+
this.tenantRegForm.get('domains').setValue(emailDomain);
79+
}
80+
});
7481
}
7582

83+
7684
getRadioOptions() {
7785
this.billingPlanService.getPlanOptions().subscribe(res => {
7886
this.subscriptionPlans = res;

0 commit comments

Comments
 (0)