Skip to content

Commit 65588dc

Browse files
mattjokexkureck
authored andcommitted
fix(admin): Fixed error message
* fixed error when displaying table with group
1 parent 3f71658 commit 65588dc

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</div>
1212
<table
1313
[dataSource]="dataSource"
14-
class="w-100 h-50"
14+
class="w-100"
1515
mat-table
1616
matSort
1717
matSortActive="createdAt"
@@ -108,13 +108,11 @@
108108
<td *matCellDef="let application" mat-cell>{{application.fedInfo}}</td>
109109
</ng-container>
110110

111-
<ng-container *ngFor="let col of parsedColumns; let i = index">
112-
<ng-container matColumnDef="{{col}}">
113-
<th *matHeaderCellDef mat-header-cell>{{col}}</th>
114-
<td *matCellDef="let application" mat-cell>
115-
{{getValue(application.formData, col)}}
116-
</td>
117-
</ng-container>
111+
<ng-container *ngFor="let i = index; let col of parsedColumns;" matColumnDef="{{col}}">
112+
<th *matHeaderCellDef mat-header-cell>{{col}}</th>
113+
<td *matCellDef="let application" mat-cell>
114+
{{getValue(application.formData, col)}}
115+
</td>
118116
</ng-container>
119117

120118
<tr *matHeaderRowDef="displayedColumns" mat-header-row></tr>

apps/admin-gui/src/app/vos/components/applications-dynamic-list/applications-dynamic-list.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ export class ApplicationsDynamicListComponent implements OnInit, OnChanges, Afte
120120
);
121121

122122
this.dataSource.loading$.subscribe((val) => {
123-
if (val) return;
124-
if (!this.displayedColumns.includes('fedInfo')) {
125-
this.parsedColumns = [];
126-
return;
127-
}
123+
if (val || !this.displayedColumns.includes('fedInfo')) return;
124+
125+
this.displayedColumns = this.displayedColumns.filter((v) => !this.parsedColumns.includes(v));
126+
this.parsedColumns = [];
127+
128128
const data = <RichApplication>this.dataSource.getData()[0];
129129
this.parseColumns(data.formData);
130130
});

libs/perun/services/src/lib/dynamicDataSource.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
SortingOrder,
1616
UsersOrderColumn,
1717
VoMemberStatuses,
18-
RichApplication,
1918
} from '@perun-web-apps/perun/openapi';
2019
import { BehaviorSubject, Observable, of } from 'rxjs';
2120
import { catchError, finalize } from 'rxjs/operators';

0 commit comments

Comments
 (0)