Skip to content

Commit 391f340

Browse files
michalberkyxflord
authored andcommitted
feat(admin): add bulk operations to applications overview
Application overview now allows to approve, reject, delete and resend notification in bulk. Selected applications have to have the same state. Each action will prompt a confirmation dialog. The page was refactored as it is shared for Vo and Groups
1 parent 8f95c33 commit 391f340

29 files changed

+1631
-325
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<h1 class="page-subtitle">{{'VO_DETAIL.APPLICATION.TITLE' | translate}}</h1>
2+
<div class="action-row">
3+
<perun-web-apps-refresh-button (refresh)="refreshTable()"></perun-web-apps-refresh-button>
4+
<span [matTooltip]="!canPerformAction.approve ? tooltipMessages.approve : ''">
5+
<button
6+
*ngIf="authRights.approve"
7+
[disabled]="!canPerformAction.approve"
8+
(click)="onApprove()"
9+
color="accent"
10+
mat-flat-button>
11+
{{'VO_DETAIL.APPLICATION.APPLICATION_DETAIL.APPROVE' | translate}}
12+
</button>
13+
</span>
14+
<span [matTooltip]="!canPerformAction.reject ? tooltipMessages.reject : ''">
15+
<button
16+
*ngIf="authRights.reject"
17+
[disabled]="!canPerformAction.reject"
18+
(click)="onReject()"
19+
color="warn"
20+
mat-flat-button>
21+
{{'VO_DETAIL.APPLICATION.APPLICATION_DETAIL.REJECT' | translate}}
22+
</button>
23+
</span>
24+
<span [matTooltip]="!canPerformAction.delete ? tooltipMessages.delete : ''">
25+
<button
26+
*ngIf="authRights.delete"
27+
[disabled]="!canPerformAction.delete"
28+
(click)="onDelete()"
29+
color="warn"
30+
mat-flat-button>
31+
{{'VO_DETAIL.APPLICATION.APPLICATION_DETAIL.DELETE' | translate}}
32+
</button>
33+
</span>
34+
<span [matTooltip]="!canPerformAction.resend ? tooltipMessages.resend : ''">
35+
<button
36+
*ngIf="authRights.resend"
37+
[disabled]="!canPerformAction.resend"
38+
(click)="onResend()"
39+
mat-stroked-button>
40+
<i class="material-icons"> mail_outline </i>
41+
{{'VO_DETAIL.APPLICATION.APPLICATION_DETAIL.SEND_NOTIFICATION' | translate}}
42+
</button>
43+
</span>
44+
<perun-web-apps-application-state-selector (stateChanged)="statesChanged($event)">
45+
</perun-web-apps-application-state-selector>
46+
<perun-web-apps-debounce-filter
47+
[placeholder]="'VO_DETAIL.APPLICATION.FILTER'"
48+
(filter)="applyFilter($event)">
49+
</perun-web-apps-debounce-filter>
50+
<perun-web-apps-date-range
51+
[endDate]="endDate"
52+
[startDate]="startDate"></perun-web-apps-date-range>
53+
<span [matTooltip]="tooltipMessages.columnSettings" matTooltipPosition="above">
54+
<button
55+
*ngIf="authRights.columnSettings"
56+
[disabled]="showAllDetails"
57+
(click)="viewChanged()"
58+
mat-stroked-button>
59+
<mat-icon>settings</mat-icon>
60+
</button>
61+
</span>
62+
</div>
63+
<div class="action-row">
64+
<mat-slide-toggle [checked]="showAllDetails" (change)="toggleDetailedView()">
65+
{{'VO_DETAIL.APPLICATION.SHOW_ALL_DETAILS' | translate}}
66+
</mat-slide-toggle>
67+
<mat-slide-toggle *ngIf="vo" [checked]="showGroupApps" (change)="toggleIncludeGroups()">
68+
{{'VO_DETAIL.APPLICATION.SHOW_GROUP_APPLICATIONS' | translate}}
69+
</mat-slide-toggle>
70+
</div>
71+
<ng-template #spinner>
72+
<perun-web-apps-loading-table></perun-web-apps-loading-table>
73+
</ng-template>
74+
<div class="position-relative">
75+
<perun-web-apps-applications-dynamic-list
76+
*perunWebAppsLoader="loading$ | async; indicator: spinner"
77+
(loading$)="loading$ = $event"
78+
(selectedApplications)="onSelectedApplicationsChange($event)"
79+
[tableId]="showAllDetails ? detailTableId : tableId"
80+
[searchString]="filterValue"
81+
[displayedColumns]="currentColumns"
82+
[fedColumnsFriendly]="showAllDetails ? [] : configuredFedColumns"
83+
[fedAttrs]="fedAttrs"
84+
[states]="currentStates"
85+
[dateFrom]="startDate.value"
86+
[dateTo]="endDate.value"
87+
[includeGroupApps]="showGroupApps"
88+
[refreshTable]="refresh"
89+
[vo]="vo"
90+
[group]="group">
91+
</perun-web-apps-applications-dynamic-list>
92+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.action-row {
2+
display: flex;
3+
flex-direction: row;
4+
flex-wrap: wrap;
5+
align-items: center;
6+
gap: 0.5rem;
7+
8+
margin-top: 1rem;
9+
margin-bottom: 1rem;
10+
}

0 commit comments

Comments
 (0)