fix
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
namespace MyOffice.Web.Controllers;
|
||||
|
||||
using Core.Extensions;
|
||||
using Infrastructure.Attributes;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using MyOffice.Services.Account;
|
||||
using MyOffice.Services.Item;
|
||||
using Services.Dashboard;
|
||||
|
||||
[Authorize]
|
||||
@@ -31,4 +31,21 @@ public class DashboardController : BaseApiController
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
[HttpGet("~/api/dashboard/income")]
|
||||
public object Income(DateTime from, DateTime to, [AsGuid(true)] string? category)
|
||||
{
|
||||
var data = _dashboardService.GetDashboardIncomeData(UserId, from.StartOfDay(), to.EndOfDay(), category?.AsGuidNull());
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("~/api/dashboard/outcome")]
|
||||
public object Outcome(DateTime from, DateTime to, [AsGuid(true)] string? category)
|
||||
{
|
||||
var data = _dashboardService.GetDashboardOutcomeData(UserId, from.StartOfDay(), to.EndOfDay(), category?.AsGuidNull());
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ using MyOffice.Services.Mapper;
|
||||
//TODO: SPA all http requests -> services
|
||||
//TODO: Items, select category -> save url to allow refresh
|
||||
//TODO: Accounts, select category -> save url to allow refresh
|
||||
//TODO: report income
|
||||
//TODO: report outcome
|
||||
|
||||
public class Program
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user