File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
projects/saas-ui/src/app/main/components/tenant-registration Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ <h5>{{ plan.name }}</h5>
358
358
nbButton
359
359
size ="medium "
360
360
status ="danger "
361
- [disabled] ="!tenantRegForm.valid "
361
+ [disabled] ="!tenantRegForm.valid || isSubmitting "
362
362
type ="submit "
363
363
>
364
364
Submit
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export class TenantRegistrationComponent {
37
37
subscriptionPlans : AnyObject [ ] ;
38
38
leadId = '' ;
39
39
countryOptions = COUNTRIES ;
40
+ isSubmitting = false ;
40
41
41
42
constructor (
42
43
private route : ActivatedRoute ,
@@ -121,6 +122,7 @@ export class TenantRegistrationComponent {
121
122
122
123
onSubmit ( ) {
123
124
if ( this . tenantRegForm . valid ) {
125
+ this . isSubmitting = true ;
124
126
const userData = this . tenantRegForm . value ;
125
127
const user : TenantLeadWithPaymentMethod = {
126
128
name : userData . name ,
@@ -142,6 +144,7 @@ export class TenantRegistrationComponent {
142
144
this . onBoardingService . registerTenant ( user ) . subscribe (
143
145
( ) => {
144
146
this . toastrService . show ( 'Tenant Added , successfully' ) ;
147
+ this . isSubmitting = false ;
145
148
this . router . navigate ( [ 'main/onboard-tenant-list' ] ) ;
146
149
} ,
147
150
( error : string ) => {
You can’t perform that action at this time.
0 commit comments