diff --git a/src/Server.UI/Pages/Transfers/Transfers.razor b/src/Server.UI/Pages/Transfers/Transfers.razor index fb2e225e..43978f06 100644 --- a/src/Server.UI/Pages/Transfers/Transfers.razor +++ b/src/Server.UI/Pages/Transfers/Transfers.razor @@ -10,145 +10,92 @@ @attribute [Authorize(Policy = SecurityPolicies.UserHasAdditionalRoles)] - - - -
-
- -
- Incoming Transfers -
-
-
- - - Participant - Occurred - From - To - Type - Action - - - - @foreach(var transfer in incomingTransfers.OrderByDescending(t => t.MoveOccured)) - { - - -
- @transfer.Participant.FullName - @transfer.Participant.Id -
- - - - @transfer.MoveOccured.ToLocalTime().ToString("dd/MM/yyyy HH:mm") - - - - - @transfer.FromLocation.Name (@transfer.FromLocation.LocationType.Name) - - - - - @transfer.ToLocation.Name (@transfer.ToLocation.LocationType.Name) - - - - - @transfer.TransferType.Name - - - - Process - - - } - @if(incomingTransfers.Count is 0) - { - - -
- @ConstantString.NoRecords -
- - - } - -
- - - - -
-
- -
- Outgoing Transfers -
-
-
- - - Participant - Occurred - From - To - Type - Action - - - - @foreach (var transfer in outgoingTransfers.OrderByDescending(t => t.MoveOccured)) - { - - -
- @transfer.Participant.FullName - @transfer.Participant.Id -
- - - - @transfer.MoveOccured.ToLocalTime().ToString("dd/MM/yyyy HH:mm") - - - - - @transfer.FromLocation.Name (@transfer.FromLocation.LocationType.Name) - - - - - @transfer.ToLocation.Name (@transfer.ToLocation.LocationType.Name) - - - - - @transfer.TransferType.Name - - - - View - - - } - @if (outgoingTransfers.Count is 0) - { - - -
- @ConstantString.NoRecords -
- - - } - -
+ + + + + Incoming Transfers + + + + Participant + Occurred + From + To + Type + Action + + + +
+ @context.Participant.FullName + @context.Participant.Id +
+
+ + @context.MoveOccured.ToLocalTime().ToString("dd/MM/yyyy HH:mm") + + + @context.FromLocation.Name (@context.FromLocation.LocationType.Name) + + + @context.ToLocation.Name (@context.ToLocation.LocationType.Name) + + + @context.TransferType.Name + + + Process + +
+
+ + + + + Outgoing Transfers + + + + Participant + Occurred + From + To + Type + Action + + + +
+ @context.Participant.FullName + @context.Participant.Id +
+
+ + @context.MoveOccured.ToLocalTime().ToString("dd/MM/yyyy HH:mm") + + + @context.FromLocation.Name (@context.FromLocation.LocationType.Name) + + + @context.ToLocation.Name (@context.ToLocation.LocationType.Name) + + + @context.TransferType.Name + + + View + +
+
+ + @code { + + private bool isLoadingIncomingTransfers = true; + private bool isLoadingOutgoingTransfers = true; + private List incomingTransfers = []; private List outgoingTransfers = []; @@ -162,13 +109,17 @@ private async Task> GetIncomingTransfers() { + isLoadingIncomingTransfers = true; var query = await GetNewMediator().Send(new GetIncomingTransfers.Query()); + isLoadingIncomingTransfers = false; return query.Data?.ToList() ?? []; } private async Task> GetOutgoingTransfers() { + isLoadingOutgoingTransfers = true; var query = await GetNewMediator().Send(new GetOutgoingTransfers.Query()); + isLoadingOutgoingTransfers = false; return query.Data?.ToList() ?? []; }