display the /HairCut/Brush profile

This commit is contained in:
Paul Schneider 2018-06-15 15:44:21 +02:00
commit 64d49c661d
24 changed files with 516 additions and 364 deletions

View file

@ -5,6 +5,7 @@ using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Workflow;
using Yavsc.Services;
using Yavsc.ViewModels.FrontOffice;
namespace Yavsc.ApiControllers
{
@ -12,18 +13,21 @@ namespace Yavsc.ApiControllers
public class FrontOfficeApiController: Controller
{
ApplicationDbContext dbContext;
public FrontOfficeApiController(ApplicationDbContext context)
private IBillingService billing;
public FrontOfficeApiController(ApplicationDbContext context, IBillingService billing)
{
dbContext = context;
this.billing = billing;
}
[HttpGet,Route("profiles/{actCode}")]
IEnumerable<PerformerProfile> Profiles (string actCode)
[HttpGet("profiles/{actCode}")]
IEnumerable<PerformerProfileViewModel> Profiles (string actCode)
{
return dbContext.ListPerformers(actCode);
return dbContext.ListPerformers(billing, actCode);
}
[HttpPost,Route("query/reject")]
[HttpPost("query/reject")]
public IActionResult RejectQuery (string billingCode, long queryId)
{
if (billingCode==null) return HttpBadRequest("billingCode");

View file

@ -9,15 +9,19 @@ namespace Yavsc.Controllers
{
using Models;
using Yavsc.Helpers;
using Yavsc.Services;
[Produces("application/json")]
[Route("api/performers")]
public class PerformersApiController : Controller
{
ApplicationDbContext dbContext;
public PerformersApiController(ApplicationDbContext context)
private IBillingService billing;
public PerformersApiController(ApplicationDbContext context, IBillingService billing)
{
dbContext = context;
this.billing = billing;
}
/// <summary>
@ -56,7 +60,7 @@ namespace Yavsc.Controllers
[HttpGet("doing/{id}"),AllowAnonymous]
public IActionResult ListPerformers(string id)
{
return Ok(dbContext.ListPerformers(id));
return Ok(dbContext.ListPerformers(billing, id));
}
}
}