diff --git a/src/Yavsc.Abstract/Workflow/INominativeQuery.cs b/src/Yavsc.Abstract/Workflow/INominativeQuery.cs index f0adebdc..7e0b5983 100644 --- a/src/Yavsc.Abstract/Workflow/INominativeQuery.cs +++ b/src/Yavsc.Abstract/Workflow/INominativeQuery.cs @@ -4,8 +4,8 @@ namespace Yavsc.Abstract.Workflow { public interface IDecidableQuery: ITrackedEntity, IQuery { - bool Decided { get; set; } + bool Reviewed { get; set; } bool Accepted { get; set; } - + } } diff --git a/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs b/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs index 935de524..75813c4e 100644 --- a/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs +++ b/src/Yavsc.Api/Controllers/Business/FrontOfficeApiController.cs @@ -34,7 +34,7 @@ namespace Yavsc.ApiControllers if (queryId == 0) return BadRequest("queryId"); var billing = BillingService.GetBillable(dbContext, billingCode, queryId); if (billing == null) return BadRequest(); - billing.Decided = true; + billing.Reviewed = true; billing.Accepted = false; dbContext.SaveChanges(); return Ok(); @@ -48,7 +48,7 @@ namespace Yavsc.ApiControllers var billing = BillingService.GetBillable(dbContext, billingCode, queryId); if (billing == null) return BadRequest(); billing.Accepted = true; - billing.Decided = true; + billing.Reviewed = true; dbContext.SaveChanges(); return Ok(); } diff --git a/src/Yavsc.Org/Controllers/Contracting/CommandFormsController.cs b/src/Yavsc.Org/Controllers/Contracting/CommandFormsController.cs index 05c98138..b5d8ca24 100644 --- a/src/Yavsc.Org/Controllers/Contracting/CommandFormsController.cs +++ b/src/Yavsc.Org/Controllers/Contracting/CommandFormsController.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; -using Yavsc.Helpers; using Yavsc.Models; using Yavsc.Models.Workflow; using Yavsc.Server.Helpers; @@ -50,7 +49,13 @@ namespace Yavsc.Controllers private void SetViewBag(CommandForm commandForm = null) { ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode); - ViewBag.ActionName = new SelectList(_context.CommandForm, nameof(CommandForm.Id), nameof(CommandForm.Title), commandForm?.Id); + ViewBag.ActionName = new SelectList( + new[]{ + new SelectListItem { Value = "Create", Text = "Create" }, + new SelectListItem { Value = "Update", Text = "Update" }, + new SelectListItem { Value = "Delete", Text = "Delete" } + }); + } // POST: CommandForms/Create [HttpPost] diff --git a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs index b2a1cd22..b234dfff 100644 --- a/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs +++ b/src/Yavsc.Org/Controllers/Contracting/FrontOfficeController.cs @@ -65,14 +65,14 @@ namespace Yavsc.Controllers } [AllowAnonymous] - public async Task HairCut(string id) + public async Task ListPerformersAsync(string activityCode) { - if (id == null) + if (activityCode == null) { throw new NotImplementedException("No Activity code"); } - ViewBag.Activity = await _context.Activities.FirstOrDefaultAsync(a => a.Code == id); - var result = await _context.ListPerformersAsync(_billing, id); + ViewBag.Activity = await _context.Activities.FirstOrDefaultAsync(a => a.Code == activityCode); + var result = await _context.ListPerformersAsync(_billing, activityCode); return View(result); } diff --git a/src/Yavsc.Org/Views/Project/Delete.cshtml b/src/Yavsc.Org/Views/Project/Delete.cshtml index f3fa4384..57a48603 100644 --- a/src/Yavsc.Org/Views/Project/Delete.cshtml +++ b/src/Yavsc.Org/Views/Project/Delete.cshtml @@ -54,10 +54,10 @@ @Html.DisplayFor(model => model.Previsional)
- @Html.DisplayNameFor(model => model.Decided) + @Html.DisplayNameFor(model => model.Reviewed)
- @Html.DisplayFor(model => model.Decided) + @Html.DisplayFor(model => model.Reviewed)
@Html.DisplayNameFor(model => model.DateModified) @@ -96,7 +96,7 @@ @Html.DisplayFor(model => model.Version) - +
| diff --git a/src/Yavsc.Org/Views/Project/Details.cshtml b/src/Yavsc.Org/Views/Project/Details.cshtml index 6199d75e..af716bbd 100644 --- a/src/Yavsc.Org/Views/Project/Details.cshtml +++ b/src/Yavsc.Org/Views/Project/Details.cshtml @@ -59,10 +59,10 @@ @Html.DisplayFor(model => model.Previsional)
- @Html.DisplayNameFor(model => model.Decided) + @Html.DisplayNameFor(model => model.Reviewed)
- @Html.DisplayFor(model => model.Decided) + @Html.DisplayFor(model => model.Reviewed)
@Html.DisplayNameFor(model => model.DateModified) diff --git a/src/Yavsc.Org/Views/Project/Edit.cshtml b/src/Yavsc.Org/Views/Project/Edit.cshtml index 403870f6..b07859ac 100644 --- a/src/Yavsc.Org/Views/Project/Edit.cshtml +++ b/src/Yavsc.Org/Views/Project/Edit.cshtml @@ -45,8 +45,8 @@
- - + +
diff --git a/src/Yavsc.Org/Views/Project/Index.cshtml b/src/Yavsc.Org/Views/Project/Index.cshtml index 50cbc88d..e428fd07 100644 --- a/src/Yavsc.Org/Views/Project/Index.cshtml +++ b/src/Yavsc.Org/Views/Project/Index.cshtml @@ -33,7 +33,7 @@ @Html.DisplayNameFor(model => model.Previsional) - @Html.DisplayNameFor(model => model.Decided) + @Html.DisplayNameFor(model => model.Reviewed) @Html.DisplayNameFor(model => model.DateModified) @@ -55,7 +55,7 @@ - + @foreach (var item in Model) { @@ -80,7 +80,7 @@ @Html.DisplayFor(modelItem => item.Previsional) - @Html.DisplayFor(modelItem => item.Decided) + @Html.DisplayFor(modelItem => item.Reviewed) @Html.DisplayFor(modelItem => item.DateModified) diff --git a/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs b/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs index 74ed3ac5..ff1a1dca 100644 --- a/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs +++ b/src/Yavsc.Server/Models/Billing/NominativeServiceCommand.cs @@ -78,7 +78,7 @@ namespace Yavsc.Models.Billing [ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")] public virtual Activity Context  { get; set ; } - public bool Decided { get; set; } + public bool Reviewed { get; set; } public abstract System.Collections.Generic.List GetBillItems(); @@ -95,9 +95,9 @@ namespace Yavsc.Models.Billing var bcode = billingService.BillingMap[type]; return $"facture-{bcode}-{Id}{ack}"; } - + [ForeignKey("Regularisation")] - + public string? PaymentId { get; set; } [Display(Name = "Acquittement de la facture")]