67 lines
3.2 KiB
Plaintext
67 lines
3.2 KiB
Plaintext
@model PlotLine.Models.WriterScheduleRecalculation
|
|
@{
|
|
ViewData["Title"] = "Recalculate remaining writing time";
|
|
ViewData["ProjectSection"] = "Writer";
|
|
}
|
|
<header data-pwa-task>
|
|
<h1>Recalculate remaining writing time</h1>
|
|
<p>@Model.Plan?.PlanName · Target @Model.Plan?.DeadlineDate.ToString("d MMM yyyy")</p>
|
|
@if (Model.Plan?.OriginalTargetDate is { } original && original != Model.Plan.DeadlineDate)
|
|
{
|
|
<p>Original target @original.ToString("d MMM yyyy")</p>
|
|
}
|
|
</header>
|
|
<p>Choose when to resume. Completed work, remaining budgets, and the target date are preserved.</p>
|
|
<form asp-action="Recalculate" method="post">
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
<input type="hidden" asp-for="WritingPlanID" />
|
|
<input type="hidden" asp-for="ReviewFingerprint" />
|
|
<input type="hidden" name="authorUtcOffset" data-author-utc-offset />
|
|
@if (Model.PendingCount == 0)
|
|
{
|
|
<p>There is no remaining reviewed work to schedule.</p>
|
|
}
|
|
else
|
|
{
|
|
<label asp-for="StartDate" class="form-label">Resume on</label>
|
|
<input asp-for="StartDate" type="date" data-author-start-date required />
|
|
<label asp-for="ContingencyPercent" class="form-label">Reserve for contingency (%)</label>
|
|
<input asp-for="ContingencyPercent" class="form-control" min="1" max="99" required />
|
|
@if (Model.Capacity is { } capacity)
|
|
{
|
|
<dl class="mt-3">
|
|
<dt>Available</dt><dd>@capacity.Available min</dd>
|
|
<dt>Reserved for contingency</dt><dd>@capacity.Reserved min</dd>
|
|
<dt>Used by completed allocations</dt><dd>@capacity.AlreadyAllocated min</dd>
|
|
<dt>Usable</dt><dd>@capacity.Usable min</dd>
|
|
<dt>Required</dt><dd>@capacity.Required min</dd>
|
|
<dt>Shortfall</dt><dd>@capacity.Shortfall min</dd>
|
|
<dt>Forecast</dt><dd>@(capacity.Forecast?.ToString("d MMM yyyy") ?? "Unavailable")</dd>
|
|
</dl>
|
|
@if (Model.OverlapDates.Count > 0)
|
|
{
|
|
<p role="status">Other active plans also use @Model.OverlapDates.Count of these dates. Check your combined time before saving.</p>
|
|
}
|
|
@if (capacity.Shortfall > 0)
|
|
{
|
|
<p role="status">Remaining work exceeds usable time. Edit availability or explicitly change the target date, then preview again.</p>
|
|
}
|
|
}
|
|
}
|
|
<div class="button-row mt-3" data-pwa-context="Record">
|
|
@if (Model.PendingCount > 0)
|
|
{
|
|
<button class="btn btn-primary" type="submit" name="step" value="preview">Preview remaining work</button>
|
|
}
|
|
@if (Model.Capacity?.Allocations.Count > 0)
|
|
{
|
|
<button class="btn btn-primary" type="submit" name="step" value="save">Save revised allocations</button>
|
|
}
|
|
<a asp-controller="Writer" asp-action="EditWritingPlan" asp-route-writingPlanId="@Model.WritingPlanID">Edit availability or target date</a>
|
|
<a asp-controller="Writer" asp-action="SchedulePreview" asp-route-writingPlanId="@Model.WritingPlanID">Cancel</a>
|
|
</div>
|
|
</form>
|
|
@section Scripts {
|
|
<script src="~/js/writer-schedule-date.js" asp-append-version="true"></script>
|
|
}
|