80 lines
5.8 KiB
Plaintext
80 lines
5.8 KiB
Plaintext
@model StoryIntelligenceExceptionReviewViewModel
|
|
@{
|
|
ViewData["Title"] = Model.Module + " intelligence";
|
|
var editAction = "StoryIntelligence" + Model.Module;
|
|
}
|
|
<section class="onboarding-shell">
|
|
<div class="onboarding-panel onboarding-review-panel story-review-page">
|
|
<div class="onboarding-copy story-review-heading">
|
|
<p class="eyebrow">Story Intelligence</p>
|
|
<h1>@Model.Module</h1>
|
|
<p>@Model.Summary.IdentifiedCount observations identified · @Model.Summary.TrackedCount tracked · @Model.Summary.OptionalCount worth reviewing · @Model.Summary.AttentionCount need attention</p>
|
|
<p>Your manuscript is available to use. Review is optional work you can return to; tracked observations are already available in Story Intelligence.</p>
|
|
@if (Model.Module == "Relationships") { <p>Across @Model.Summary.PairCount character pairs. Each scene and direction is preserved in the relationship history.</p> }
|
|
</div>
|
|
@if (TempData["ReviewMessage"] is string message) { <div class="alert alert-success">@message</div> }
|
|
@if (TempData["ReviewError"] is string error) { <div class="alert alert-danger">@error</div> }
|
|
<nav class="story-review-card-actions" aria-label="Review priority">
|
|
@foreach (var tab in new[] { ("Attention", "Needs attention"), ("Optional", "Worth reviewing"), ("Tracked", "Tracked"), ("Unassessed", "Not yet assessed"), ("All", "All observations") })
|
|
{
|
|
<a class="btn btn-sm @(Model.Scope == tab.Item1 ? "btn-primary" : "btn-outline-secondary")" asp-action="Index" asp-route-batchId="@Model.BatchID" asp-route-module="@Model.Module" asp-route-scope="@tab.Item1" aria-current="@(Model.Scope == tab.Item1 ? "page" : null)">@tab.Item2</a>
|
|
}
|
|
</nav>
|
|
@if (Model.Summary.UnassessedCount > 0 || Model.Summary.OptionalCount > 0 || Model.Summary.AttentionCount > 0)
|
|
{
|
|
<form asp-action="Assess" method="post" class="story-review-note" data-story-review-form>
|
|
<input type="hidden" name="batchId" value="@Model.BatchID" /><input type="hidden" name="module" value="@Model.Module" />
|
|
<p>Update priorities from the saved analysis and automatically accept well-supported observations. No new AI analysis is requested. Your reviewed and ignored decisions stay unchanged.</p>
|
|
@if (Model.Summary.UnassessedCount > 0) { <p>@Model.Summary.UnassessedCount observations have not yet been assessed.</p> }
|
|
<button class="btn btn-outline-primary btn-sm" type="submit" data-busy-label="Updating priorities...">Update review priorities</button>
|
|
</form>
|
|
}
|
|
@if (Model.Items.Count == 0) { <div class="story-review-note">No observations in this view. Other observations remain accessible using the filters above.</div> }
|
|
<div class="story-character-card-grid">
|
|
@foreach (var item in Model.Items)
|
|
{
|
|
<details class="story-character-card" open>
|
|
<summary class="story-review-card-header"><span><strong>@item.Row.DisplayName</strong><small>@item.Status</small></span></summary>
|
|
<div class="story-character-card__body">
|
|
@if (!string.IsNullOrWhiteSpace(item.Direction)) { <p><strong>@item.Direction</strong> · @item.State</p> }
|
|
<p>@item.Detail</p>
|
|
@if (item.Pending || item.Row.DecisionStatus == "AutoAccepted") { <p>@string.Join(" ", item.Assessment.Reasons)</p> }
|
|
<details class="story-review-note"><summary>Scene evidence (@item.Observations.Count)</summary>
|
|
@if (item.Observations.Count == 0) { <p>@item.Evidence</p> }
|
|
@foreach (var observation in item.Observations) {
|
|
<p><strong>Chapter @observation.ChapterNumber.ToString("0.##"), scene @observation.SceneNumber.ToString("0.##")</strong> · @observation.Signal<br />@observation.Evidence</p>
|
|
}
|
|
</details>
|
|
@if (item.Pending) { <a class="btn btn-outline-primary btn-sm" asp-controller="Onboarding" asp-action="@editAction" asp-route-batchId="@Model.BatchID" asp-route-candidateKey="@item.Row.StableKey">Review this observation</a> }
|
|
</div>
|
|
</details>
|
|
}
|
|
</div>
|
|
@if (Model.History.Count > 0) {
|
|
<h2 class="h4 mt-4">Relationship journeys</h2>
|
|
<p>Complete saved history for the pairs on this page, including both directions and observations outside the selected filter.</p>
|
|
@foreach (var pair in Model.History.GroupBy(x => x.PairKey)) {
|
|
<details class="story-review-note"><summary>@pair.First().Pair · @pair.Count() observations</summary>
|
|
@foreach (var entry in pair) {
|
|
<div class="mb-3"><strong>@entry.Direction · @entry.State</strong><p>@entry.Detail · @entry.Status</p>
|
|
@foreach (var observation in entry.Observations) { <p>Chapter @observation.ChapterNumber.ToString("0.##"), scene @observation.SceneNumber.ToString("0.##"): @observation.Evidence</p> }
|
|
</div>
|
|
}
|
|
</details>
|
|
}
|
|
}
|
|
<div class="onboarding-actions">
|
|
@if (Model.Page > 1) { <a class="btn btn-outline-secondary" asp-action="Index" asp-route-batchId="@Model.BatchID" asp-route-module="@Model.Module" asp-route-scope="@Model.Scope" asp-route-page="@(Model.Page - 1)">Previous</a> }
|
|
<span>Page @Model.Page of @Model.PageCount</span>
|
|
@if (Model.Page < Model.PageCount) { <a class="btn btn-outline-secondary" asp-action="Index" asp-route-batchId="@Model.BatchID" asp-route-module="@Model.Module" asp-route-scope="@Model.Scope" asp-route-page="@(Model.Page + 1)">Next</a> }
|
|
<a class="btn btn-outline-secondary" asp-controller="Onboarding" asp-action="StoryIntelligenceReviewCentre" asp-route-batchId="@Model.BatchID">Back to Review Centre</a>
|
|
<a class="btn btn-outline-primary" asp-controller="@Model.CanonicalController" asp-action="Index" asp-route-projectId="@Model.ProjectID" asp-route-bookId="@Model.BookID">View tracked @Model.Module.ToLowerInvariant()</a>
|
|
<a class="btn btn-primary" asp-controller="Books" asp-action="Details" asp-route-id="@Model.BookID">Return to Book</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
@section Scripts {
|
|
<script src="~/js/story-review-actions.js" asp-append-version="true"></script>
|
|
}
|