renaming Reviewed
This commit is contained in:
parent
c74ac71b5d
commit
ee6cb34c23
9 changed files with 28 additions and 23 deletions
|
|
@ -4,7 +4,7 @@ namespace Yavsc.Abstract.Workflow
|
||||||
{
|
{
|
||||||
public interface IDecidableQuery: ITrackedEntity, IQuery
|
public interface IDecidableQuery: ITrackedEntity, IQuery
|
||||||
{
|
{
|
||||||
bool Decided { get; set; }
|
bool Reviewed { get; set; }
|
||||||
bool Accepted { get; set; }
|
bool Accepted { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace Yavsc.ApiControllers
|
||||||
if (queryId == 0) return BadRequest("queryId");
|
if (queryId == 0) return BadRequest("queryId");
|
||||||
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
|
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
|
||||||
if (billing == null) return BadRequest();
|
if (billing == null) return BadRequest();
|
||||||
billing.Decided = true;
|
billing.Reviewed = true;
|
||||||
billing.Accepted = false;
|
billing.Accepted = false;
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
return Ok();
|
return Ok();
|
||||||
|
|
@ -48,7 +48,7 @@ namespace Yavsc.ApiControllers
|
||||||
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
|
var billing = BillingService.GetBillable(dbContext, billingCode, queryId);
|
||||||
if (billing == null) return BadRequest();
|
if (billing == null) return BadRequest();
|
||||||
billing.Accepted = true;
|
billing.Accepted = true;
|
||||||
billing.Decided = true;
|
billing.Reviewed = true;
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Yavsc.Helpers;
|
|
||||||
using Yavsc.Models;
|
using Yavsc.Models;
|
||||||
using Yavsc.Models.Workflow;
|
using Yavsc.Models.Workflow;
|
||||||
using Yavsc.Server.Helpers;
|
using Yavsc.Server.Helpers;
|
||||||
|
|
@ -50,7 +49,13 @@ namespace Yavsc.Controllers
|
||||||
private void SetViewBag(CommandForm commandForm = null)
|
private void SetViewBag(CommandForm commandForm = null)
|
||||||
{
|
{
|
||||||
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode);
|
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
|
// POST: CommandForms/Create
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,14 @@ namespace Yavsc.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task <ActionResult> HairCut(string id)
|
public async Task <ActionResult> ListPerformersAsync(string activityCode)
|
||||||
{
|
{
|
||||||
if (id == null)
|
if (activityCode == null)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("No Activity code");
|
throw new NotImplementedException("No Activity code");
|
||||||
}
|
}
|
||||||
ViewBag.Activity = await _context.Activities.FirstOrDefaultAsync(a => a.Code == id);
|
ViewBag.Activity = await _context.Activities.FirstOrDefaultAsync(a => a.Code == activityCode);
|
||||||
var result = await _context.ListPerformersAsync(_billing, id);
|
var result = await _context.ListPerformersAsync(_billing, activityCode);
|
||||||
return View(result);
|
return View(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@
|
||||||
@Html.DisplayFor(model => model.Previsional)
|
@Html.DisplayFor(model => model.Previsional)
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
@Html.DisplayNameFor(model => model.Decided)
|
@Html.DisplayNameFor(model => model.Reviewed)
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(model => model.Decided)
|
@Html.DisplayFor(model => model.Reviewed)
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
@Html.DisplayNameFor(model => model.DateModified)
|
@Html.DisplayNameFor(model => model.DateModified)
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,10 @@
|
||||||
@Html.DisplayFor(model => model.Previsional)
|
@Html.DisplayFor(model => model.Previsional)
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
@Html.DisplayNameFor(model => model.Decided)
|
@Html.DisplayNameFor(model => model.Reviewed)
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(model => model.Decided)
|
@Html.DisplayFor(model => model.Reviewed)
|
||||||
</dd>
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
@Html.DisplayNameFor(model => model.DateModified)
|
@Html.DisplayNameFor(model => model.DateModified)
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-md-offset-2 col-md-10">
|
<div class="col-md-offset-2 col-md-10">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<input asp-for="Decided" />
|
<input asp-for="Reviewed" />
|
||||||
<label asp-for="Decided"></label>
|
<label asp-for="Reviewed"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
@Html.DisplayNameFor(model => model.Previsional)
|
@Html.DisplayNameFor(model => model.Previsional)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.Decided)
|
@Html.DisplayNameFor(model => model.Reviewed)
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@Html.DisplayNameFor(model => model.DateModified)
|
@Html.DisplayNameFor(model => model.DateModified)
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
@Html.DisplayFor(modelItem => item.Previsional)
|
@Html.DisplayFor(modelItem => item.Previsional)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.Decided)
|
@Html.DisplayFor(modelItem => item.Reviewed)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@Html.DisplayFor(modelItem => item.DateModified)
|
@Html.DisplayFor(modelItem => item.DateModified)
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ namespace Yavsc.Models.Billing
|
||||||
[ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")]
|
[ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")]
|
||||||
public virtual Activity Context { get; set ; }
|
public virtual Activity Context { get; set ; }
|
||||||
|
|
||||||
public bool Decided { get; set; }
|
public bool Reviewed { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public abstract System.Collections.Generic.List<IBillItem> GetBillItems();
|
public abstract System.Collections.Generic.List<IBillItem> GetBillItems();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue