1
- import { Component , OnInit } from '@angular/core' ;
1
+ import { Component , Inject , OnInit } from '@angular/core' ;
2
2
import { ActivatedRoute } from '@angular/router' ;
3
3
import { RouteComponentBaseDirective } from '@project-lib/core/route-component-base' ;
4
4
import { ColDef } from 'ag-grid-community' ;
@@ -9,6 +9,8 @@ import {Tenant} from '../../../shared/models';
9
9
import { BackendFilter } from '@project-lib/core/api' ;
10
10
import { TenantStatus } from '../../../shared/enum/tenant-status.enum' ;
11
11
import { environment } from 'projects/saas-ui/src/environment' ;
12
+ import { APP_CONFIG } from '@project-lib/app-config' ;
13
+ import { IAnyObject } from '@project-lib/core/i-any-object' ;
12
14
13
15
@Component ( {
14
16
selector : 'app-onboarding-tenant-list' ,
@@ -27,6 +29,15 @@ export class OnboardingTenantListComponent
27
29
resizable : true ,
28
30
} ;
29
31
32
+ constructor (
33
+ protected override readonly location : Location ,
34
+ protected override readonly route : ActivatedRoute ,
35
+ private readonly tenantFacade : TenantFacadeService ,
36
+ @Inject ( APP_CONFIG ) private readonly appConfig : IAnyObject ,
37
+ ) {
38
+ super ( route , location ) ;
39
+ }
40
+
30
41
colDefs : ColDef [ ] = [
31
42
{
32
43
field : 'name' ,
@@ -37,7 +48,7 @@ export class OnboardingTenantListComponent
37
48
floatingFilter : true ,
38
49
sortable : true ,
39
50
cellRenderer : function ( params ) {
40
- const url = environment . baseApiUrl . replace (
51
+ const url = this . appConfig . baseApiUrl . replace (
41
52
'//' ,
42
53
`//${ params . data . key } .` ,
43
54
) ;
@@ -76,13 +87,6 @@ export class OnboardingTenantListComponent
76
87
include : [ { relation : 'address' } ] ,
77
88
} ;
78
89
variable : any ;
79
- constructor (
80
- protected override readonly location : Location ,
81
- protected override readonly route : ActivatedRoute ,
82
- private readonly tenantFacade : TenantFacadeService ,
83
- ) {
84
- super ( route , location ) ;
85
- }
86
90
87
91
ngOnInit ( ) : void {
88
92
this . getOnBoardingTenants ( ) ;
0 commit comments