Skip to content

Commit dd630c8

Browse files
committed
fix(arc-saas): detailed list of tenant onboarding
detailed list of tenant onboarding GH-76
1 parent af46d61 commit dd630c8

17 files changed

+574
-91
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {
2+
ApiService,
3+
GetAPICommand,
4+
GetListAPICommand,
5+
IAdapter,
6+
} from '@project-lib/core/api';
7+
8+
import {IAnyObject} from '@project-lib/core/i-any-object';
9+
import {tenantDetails} from '../../shared/models/tenantDetails.model';
10+
11+
export class GetTenantDetailsCommand<T> extends GetAPICommand<tenantDetails[]> {
12+
constructor(
13+
apiService: ApiService,
14+
adapter: IAdapter<tenantDetails[]>,
15+
appConfig: IAnyObject,
16+
) {
17+
super(
18+
apiService,
19+
adapter,
20+
`${appConfig.baseApiUrl}${appConfig.tenantMgmtFacadeUrl}/tenants`,
21+
);
22+
}
23+
}

projects/saas-ui/src/app/main/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ export * from './add-features-for-plan.command';
1919
export * from './edit-features-by-planid.command';
2020
export * from './get-feature-by-planid.command';
2121
export * from './get-features.command';
22+
export * from './get-tenant-details.command';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<nb-icon
2+
class="eye-icon"
3+
icon="eye-outline"
4+
pack="eva"
5+
status="primary"
6+
size="large"
7+
(click)="onClick($event)"
8+
></nb-icon>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:host {
2+
display: flex;
3+
justify-content: center;
4+
align-items: center;
5+
}
6+
7+
.eye-icon{
8+
color: #ff3d71;
9+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { EyeIconRendererComponent } from './eye-icon-renderer.component';
4+
5+
describe('EyeIconRendererComponent', () => {
6+
let component: EyeIconRendererComponent;
7+
let fixture: ComponentFixture<EyeIconRendererComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ EyeIconRendererComponent ]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(EyeIconRendererComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {Component} from '@angular/core';
2+
import {Router} from '@angular/router';
3+
import {ICellRendererAngularComp} from 'ag-grid-angular';
4+
5+
@Component({
6+
selector: 'app-eye-icon-renderer',
7+
templateUrl: './eye-icon-renderer.component.html',
8+
styleUrls: ['./eye-icon-renderer.component.scss'],
9+
})
10+
export class EyeIconRendererComponent implements ICellRendererAngularComp {
11+
private params: any;
12+
13+
constructor(private router: Router) {}
14+
15+
agInit(params: any): void {
16+
this.params = params;
17+
}
18+
19+
refresh(params: any): boolean {
20+
return false;
21+
}
22+
23+
onClick(event: Event): void {
24+
event.stopPropagation();
25+
const rowDataId = this.params.node.data.id;
26+
console.log(rowDataId);
27+
this.router.navigate([`/main/tenant-details/${rowDataId}`]);
28+
}
29+
}

projects/saas-ui/src/app/main/components/onboarding-tenant-list/onboarding-tenant-list.component.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ <h2 class="heading">Onboarded Tenant List</h2>
2222
</div> -->
2323

2424
<!-- ag-grid -->
25-
<div class="grid">
26-
<ag-grid-angular
27-
style="width: 1350px; height: 650px"
28-
class="ag-theme-quartz"
29-
[columnDefs]="colDefs"
30-
[gridOptions]="gridOptions"
31-
>
32-
</ag-grid-angular>
25+
<div class="grid-wrapper">
26+
<div class="grid">
27+
<ag-grid-angular
28+
style="width: calc(100vw-200px); height: 650px"
29+
class="ag-theme-quartz"
30+
[columnDefs]="colDefs"
31+
[gridOptions]="gridOptions"
32+
>
33+
</ag-grid-angular>
34+
</div>
3335
</div>
3436
</nb-card-body>
3537
</nb-card>

projects/saas-ui/src/app/main/components/onboarding-tenant-list/onboarding-tenant-list.component.scss

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
@use '../../styles/grid-styles.scss' as *;
22

3-
.ag-theme-quartz {
3+
.ag-theme-alpine {
44
width: 100%;
5-
height: 400;
5+
height: 100%;
6+
overflow-x: auto; /* Enable horizontal scroll */
67
}
78

8-
.header-wrapper{
9+
.header-wrapper {
910
display: flex;
1011
justify-content: space-between;
1112
align-items: center;
@@ -41,11 +42,19 @@
4142
}
4243

4344
@-webkit-keyframes spin {
44-
0% { transform: rotate(0deg); }
45-
100% { transform: rotate(360deg); }
45+
0% {
46+
transform: rotate(0deg);
47+
}
48+
100% {
49+
transform: rotate(360deg);
50+
}
4651
}
4752

4853
@keyframes spin {
49-
0% { transform: rotate(0deg); }
50-
100% { transform: rotate(360deg); }
54+
0% {
55+
transform: rotate(0deg);
56+
}
57+
100% {
58+
transform: rotate(360deg);
59+
}
5160
}

0 commit comments

Comments
 (0)