37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
@model WritingIntentDisplayViewModel
|
|
@{
|
|
var scene = Model.Context?.Scene;
|
|
var goal = Model.ChapterWorkflow?.Goal;
|
|
var notes = scene?.Notes.OrderByDescending(x => x.IsPinned).ThenBy(x => x.IsResolved).ThenByDescending(x => x.UpdatedDate).ToList() ?? [];
|
|
static string TextOr(string? value, string fallback) => string.IsNullOrWhiteSpace(value) ? fallback : value.Trim();
|
|
}
|
|
|
|
<div class="writing-context-grid">
|
|
<article class="writing-context-card">
|
|
<p class="eyebrow">Chapter Risks</p>
|
|
<p>@TextOr(goal?.RisksOrConcerns, "No chapter risks or concerns recorded.")</p>
|
|
</article>
|
|
|
|
<article class="writing-context-card">
|
|
<p class="eyebrow">Scene Notes</p>
|
|
@if (!notes.Any())
|
|
{
|
|
<p>No writing notes for this scene.</p>
|
|
}
|
|
else
|
|
{
|
|
<ul class="writing-context-list">
|
|
@foreach (var note in notes)
|
|
{
|
|
<li>
|
|
<strong>@(string.IsNullOrWhiteSpace(note.NoteTitle) ? note.TypeName : note.NoteTitle)</strong>
|
|
@if (note.IsPinned) { <span class="writing-intent-status-label">Pinned</span> }
|
|
@if (note.IsResolved) { <span class="writing-intent-status-label">Resolved</span> }
|
|
<p>@note.NoteText</p>
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</article>
|
|
</div>
|