Load operations on campaign page

This commit is contained in:
2025-11-05 16:14:21 +09:00
parent cdec2d53d1
commit 4e6157e61e
2 changed files with 5 additions and 2 deletions

View File

@ -93,7 +93,10 @@
async Task RowExpandAsync(Campaign campaign) async Task RowExpandAsync(Campaign campaign)
{ {
// TODO if (campaign.Operations == null)
{
campaign.Operations = await HeadquartersService.GetOperationsAsync(campaign.Id);
}
} }
void ChangeState(CampaignsPageState state) void ChangeState(CampaignsPageState state)

View File

@ -41,7 +41,7 @@ namespace Hcs.WebApp.Services
select operation).ToListAsync(); select operation).ToListAsync();
} }
public async Task<IEnumerable<Operation>> GetOperationsAsync(int campaignId) public async Task<ICollection<Operation>> GetOperationsAsync(int campaignId)
{ {
using var context = GetNewContext(); using var context = GetNewContext();
return await (from operation in context.Operations return await (from operation in context.Operations