Skip to content

Commit aaa7302

Browse files
feat: Improve pending operation handling in AssignmentStatus view
1 parent e470950 commit aaa7302

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/XtremeIdiots.Portal.Web/Views/MapRotations/AssignmentStatus.cshtml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
@{
55
ViewData["Title"] = "Assignment Status - " + Model.GameServerDisplayName;
66
var pendingInstanceId = TempData["PendingInstanceId"] as string;
7+
var hasPendingWithNoRow = !string.IsNullOrEmpty(pendingInstanceId)
8+
&& !Model.Operations.Any(o => o.Status == AssignmentOperationStatus.InProgress
9+
&& o.DurableFunctionInstanceId == pendingInstanceId);
710
}
811

912
<div class="wrapper wrapper-content animated fadeInRight">
@@ -148,7 +151,7 @@
148151
<h5>Recent Operations (@Model.Operations.Count)</h5>
149152
</div>
150153
<div class="ibox-content">
151-
@if (Model.Operations.Count == 0 && string.IsNullOrEmpty(pendingInstanceId))
154+
@if (Model.Operations.Count == 0 && !hasPendingWithNoRow)
152155
{
153156
<p class="text-muted">No operations recorded for this assignment.</p>
154157
}
@@ -169,7 +172,7 @@
169172
</tr>
170173
</thead>
171174
<tbody>
172-
@if (Model.Operations.Count == 0 && !string.IsNullOrEmpty(pendingInstanceId))
175+
@if (hasPendingWithNoRow)
173176
{
174177
<tr class="table-info pending-bootstrap-row" data-instance-id="@pendingInstanceId">
175178
<td>—</td>

0 commit comments

Comments
 (0)