|
1 | | -@using FWO.Ui.Display |
| 1 | +@using FWO.Ui.Display |
2 | 2 | @using System.Text.Json |
| 3 | +@using FWO.Services.EventMediator.Events |
| 4 | +@using FWO.Services.EventMediator.Interfaces |
| 5 | +@inject IEventMediator EventMediator |
3 | 6 |
|
4 | 7 | @attribute [Authorize(Roles = $"{Roles.Admin}, {Roles.Auditor}")] |
5 | 8 |
|
|
17 | 20 | </button> |
18 | 21 | <div class="vheight75"> |
19 | 22 | <Table class="table table-bordered th-bg-secondary table-responsive overflow-auto sticky-header" TableItem="ModellingAppServer" |
20 | | - Items="appServerListHandler.ManualAppServers" PageSize="0" ColumnReorder="true"> |
| 23 | + Items="appServerListHandler.ManualAppServers" PageSize="0" ColumnReorder="true"> |
21 | 24 | <Column TableItem="ModellingAppServer" Title="@(userConfig.GetText("actions"))" Field="(x => x.Id)" Sortable="false" Filterable="false"> |
22 | 25 | <Template> |
23 | 26 | <div class="btn-group"> |
|
84 | 87 | </PopUp> |
85 | 88 | <EditAppServer @bind-Display="appServerListHandler.EditAppServerMode" @bind-AppServerHandler="appServerListHandler.AppServerHandler" /> |
86 | 89 | <ConfirmDelete @bind-Display="appServerListHandler.DeleteAppServerMode" PerformAction="Delete" |
87 | | - Title="@userConfig.GetText("delete_app_server")" DeleteMessage="@appServerListHandler.Message" /> |
| 90 | + Title="@userConfig.GetText("delete_app_server")" DeleteMessage="@appServerListHandler.Message" /> |
88 | 91 | <Confirm @bind-Display="appServerListHandler.ReactivateAppServerMode" PerformAction="Reactivate" |
89 | | - Title="@userConfig.GetText("reactivate")" Message="@appServerListHandler.Message" /> |
| 92 | + Title="@userConfig.GetText("reactivate")" Message="@appServerListHandler.Message" /> |
90 | 93 | } |
91 | 94 | <InProgress Display="workInProgress" /> |
92 | 95 |
|
|
109 | 112 | private bool workInProgress = false; |
110 | 113 | private bool firstTry = true; |
111 | 114 |
|
| 115 | + private readonly static CollectionChangedEvent OnCollectionChanged = new(); |
112 | 116 |
|
113 | 117 | protected override void OnInitialized() |
114 | 118 | { |
|
142 | 146 | workInProgress = true; |
143 | 147 | await appServerListHandler!.DeleteAppServer(); |
144 | 148 | workInProgress = false; |
| 149 | + |
145 | 150 | StateHasChanged(); |
146 | 151 | } |
147 | 152 |
|
|
155 | 160 |
|
156 | 161 | private void Close() |
157 | 162 | { |
| 163 | + EventMediator.Publish<CollectionChangedEvent>(OnCollectionChanged); |
158 | 164 | firstTry = true; |
159 | 165 | Display = false; |
160 | 166 | DisplayChanged.InvokeAsync(Display); |
|
0 commit comments