Estimate lists
All checks were successful
Dotnet build and test / build (pull_request) Successful in 18m1s

This commit is contained in:
Paul Schneider 2026-09-15 00:19:23 +01:00
commit 110ed279f5
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
12 changed files with 556 additions and 75 deletions

View file

@ -198,6 +198,28 @@ namespace Yavsc.Controllers
return Ok(estimate);
}
// GET: api/estimate/asclient
// Ongoing estimates (not yet validated by the client) where the
// current user is the client who initiated the request.
[HttpGet("asclient")]
public IActionResult GetOngoingEstimatesAsClient()
{
var uid = User.GetUserId();
return Ok(_context.Estimates.Include(e => e.Bill)
.Where(e => e.ClientId == uid && e.ClientValidationDate == default));
}
// GET: api/estimate/asprovider
// Ongoing estimates (not yet validated by the client) established
// by the current user as the provider.
[HttpGet("asprovider")]
public IActionResult GetOngoingEstimatesAsProvider()
{
var uid = User.GetUserId();
return Ok(_context.Estimates.Include(e => e.Bill)
.Where(e => e.OwnerId == uid && e.ClientValidationDate == default));
}
protected override void Dispose(bool disposing)
{
if (disposing)