Load operations on campaign page
This commit is contained in:
@ -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)
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user