feat(usability): confirm saves and guard booking submissions against duplicates (U07)
This commit is contained in:
@@ -121,7 +121,7 @@ public class EntryService : IEntryService
|
||||
return new EntryDto(entry.Id, entry.AccountId, entry.DisplayId, entry.Type, entry.Date, entry.Title, entry.Amount, false, false, null, null, null);
|
||||
}
|
||||
|
||||
public async Task CreateTransferAsync(int sourceAccountId, int targetAccountId, DateTime date, string title, decimal amount)
|
||||
public async Task<int> CreateTransferAsync(int sourceAccountId, int targetAccountId, DateTime date, string title, decimal amount)
|
||||
{
|
||||
BookingInput.Validate(date, title, amount);
|
||||
if (sourceAccountId == targetAccountId)
|
||||
@@ -173,6 +173,7 @@ public class EntryService : IEntryService
|
||||
await db.SaveChangesAsync();
|
||||
|
||||
await transaction.CommitAsync();
|
||||
return sourceEntry.Id;
|
||||
}
|
||||
|
||||
public async Task DeleteEntryAsync(int entryId)
|
||||
|
||||
Reference in New Issue
Block a user