From ee4b784c3e7abf19a7aed22cf4dbae598017c0af Mon Sep 17 00:00:00 2001 From: Jason Sylvestre Date: Fri, 8 Mar 2024 12:57:41 -0800 Subject: [PATCH] wip --- Sloth.Web/Controllers/ReportsController.cs | 2 +- Sloth.Web/Models/ReportViewModels/TransfersReportViewModel.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sloth.Web/Controllers/ReportsController.cs b/Sloth.Web/Controllers/ReportsController.cs index 4f3dd5a4..ddfd0f6d 100644 --- a/Sloth.Web/Controllers/ReportsController.cs +++ b/Sloth.Web/Controllers/ReportsController.cs @@ -86,7 +86,7 @@ public async Task DownloadableTransactions(TransactionsFilterMode }; model.Transactions = await DbContext.Transactions.Include(a => a.Transfers).Include(a => a.Metadata) - .Where(t => t.Source.Team.Slug == TeamSlug && t.TransactionDate >= filter.From && t.TransactionDate <= filter.To).Select(TransactionWithTransfers.Projection()).ToListAsync(); + .Where(t => t.Source.Team.Slug == TeamSlug && t.TransactionDate >= filter.From && t.TransactionDate <= filter.To).OrderBy(a => a.Id).ThenBy(a => a.TransactionDate).Select(TransactionWithTransfers.Projection()).ToListAsync(); var team = await DbContext.Teams.FirstAsync(t => t.Slug == TeamSlug); ViewBag.Title = $"Transactions with Transfers - {team.Name}"; diff --git a/Sloth.Web/Models/ReportViewModels/TransfersReportViewModel.cs b/Sloth.Web/Models/ReportViewModels/TransfersReportViewModel.cs index 6e7367d5..19969383 100644 --- a/Sloth.Web/Models/ReportViewModels/TransfersReportViewModel.cs +++ b/Sloth.Web/Models/ReportViewModels/TransfersReportViewModel.cs @@ -20,6 +20,7 @@ public class TransfersReportViewModel public class TransactionWithTransfers { public string Id { get; set; } + public string DisplayId => $"...{Id[^4..]}"; // last 4 characters of the id public string Status { get; set; }