Skip to content

Commit cd658ea

Browse files
authored
Merge pull request #46 from sourcefuse/saas-ui-10
fix(arc-saas): adding hyperlink and filters
2 parents f132c4e + 2b2abee commit cd658ea

File tree

10 files changed

+185
-150
lines changed

10 files changed

+185
-150
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
@use '../../styles/grid-styles.scss' as *;
2+
3+
.ag-theme-quartz {
4+
width: 100%;
5+
height: 400;
6+
}

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

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {TenantFacadeService} from '../../../shared/services/tenant-list-facade.s
88
import {Tenant} from '../../../shared/models';
99
import {BackendFilter} from '@project-lib/core/api';
1010
import {TenantStatus} from '../../../shared/enum/tenant-status.enum';
11+
import {environment} from 'projects/saas-ui/src/environment';
1112

1213
@Component({
1314
selector: 'app-onboarding-tenant-list',
@@ -18,11 +19,51 @@ export class OnboardingTenantListComponent
1819
extends RouteComponentBaseDirective
1920
implements OnInit
2021
{
22+
defaultColDef: ColDef = {
23+
flex: 1,
24+
minWidth: 150,
25+
filter: true,
26+
floatingFilter: true,
27+
resizable: true,
28+
};
29+
2130
colDefs: ColDef[] = [
22-
{field: 'name', headerName: 'Company Name', width: 300, minWidth: 20},
23-
{field: 'domains', width: 300, minWidth: 20},
24-
{field: 'address', width: 400, minWidth: 20},
25-
{field: 'status', width: 300, minWidth: 20},
31+
{
32+
field: 'name',
33+
headerName: 'Company Name',
34+
width: 300,
35+
minWidth: 20,
36+
filter: 'agTextColumnFilter',
37+
floatingFilter: true,
38+
cellRenderer: function (params) {
39+
console.log(params);
40+
console.log(params.data.key);
41+
return `<a href="${params.data.key}.${environment.baseApiUrl}" target="_blank" class="company-link">
42+
${params.value}
43+
</a>`;
44+
},
45+
},
46+
{
47+
field: 'domains',
48+
width: 300,
49+
minWidth: 20,
50+
filter: 'agTextColumnFilter',
51+
floatingFilter: true,
52+
},
53+
{
54+
field: 'address',
55+
width: 400,
56+
minWidth: 20,
57+
filter: 'agTextColumnFilter',
58+
floatingFilter: true,
59+
},
60+
{
61+
field: 'status',
62+
width: 300,
63+
minWidth: 20,
64+
filter: 'agTextColumnFilter',
65+
floatingFilter: true,
66+
},
2667
];
2768

2869
rowData = [];
@@ -31,6 +72,7 @@ export class OnboardingTenantListComponent
3172
filter: BackendFilter<Tenant> = {
3273
include: [{relation: 'address'}],
3374
};
75+
variable: any;
3476
constructor(
3577
protected override readonly location: Location,
3678
protected override readonly route: ActivatedRoute,
@@ -49,9 +91,11 @@ export class OnboardingTenantListComponent
4991
.pipe(takeUntil(this._destroy$))
5092
.subscribe(res => {
5193
this.rowData = res.map(item => {
94+
this.variable = item.key;
5295
const addressString = `${item.address.city}, ${item.address.state}, ${item.address.zip}, ${item.address.country}`;
5396
return {
5497
name: item.name,
98+
key: item.key,
5599
domains: item.domains.join(', '),
56100
address: addressString,
57101
status: TenantStatus[item.status],

projects/saas-ui/src/app/main/main.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<nb-menu [items]="menu"> </nb-menu>
3838
</nb-sidebar>
3939

40-
<nb-layout-column>
40+
<nb-layout-column class="column-wrapper">
4141
<router-outlet class="main-router"></router-outlet>
4242
</nb-layout-column>
4343
</nb-layout>

projects/saas-ui/src/app/main/main.component.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
width: 100%;
1414
}
1515

16+
.column-wrapper{
17+
height:calc(100% - 200px);
18+
}
1619
.logo-container {
1720
display: flex;
1821
align-items: center;

projects/saas-ui/src/app/on-boarding/components/add-lead/add-lead.component.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
}
1818
}
1919

20-
21-
2220
.input-box {
2321
.inputTags {
2422
input {
@@ -58,4 +56,3 @@
5856
margin-top: 0 !important;
5957
}
6058
}
61-

projects/saas-ui/src/app/on-boarding/components/add-tenant/add-tenant.component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
/* Media Queries for Responsiveness */
6161

6262
@media (max-width: 575px) {
63-
6463
.plan-card-container .plan-card-wrapper {
6564
flex-direction: column;
6665
}
@@ -72,7 +71,6 @@
7271

7372
/* Small devices */
7473
@media (min-width: 576px) and (max-width: 767px) {
75-
7674
.plan-card-container .plan-card-wrapper {
7775
flex-direction: column;
7876
}
@@ -84,7 +82,6 @@
8482

8583
/* Medium devices */
8684
@media (min-width: 768px) and (max-width: 991px) {
87-
8885
.plan-card-container .plan-card-wrapper {
8986
flex-direction: row;
9087
}
@@ -96,7 +93,6 @@
9693

9794
/* Large devices */
9895
@media (min-width: 992px) {
99-
10096
.plan-card-container .plan-card-wrapper {
10197
flex-direction: row;
10298
}

projects/saas-ui/src/app/on-boarding/components/email-verification/email-verification.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ p {
2121

2222
.verifiaction-wrapper {
2323
padding: 0 18px;
24-
}
24+
}

0 commit comments

Comments
 (0)