diff --git a/PlotLine/Views/Shared/SceneInspectorV2/_SceneContinuityCard.cshtml b/PlotLine/Views/Shared/SceneInspectorV2/_SceneContinuityCard.cshtml index b0c2d6e..2529a06 100644 --- a/PlotLine/Views/Shared/SceneInspectorV2/_SceneContinuityCard.cshtml +++ b/PlotLine/Views/Shared/SceneInspectorV2/_SceneContinuityCard.cshtml @@ -2,9 +2,15 @@ @{ var warningCount = Model.Warnings.Count + Model.AgeContinuityWarnings.Count; var dependencyCount = Model.DependenciesThisSceneNeeds.Count + Model.DependenciesNeedingThisScene.Count; - var summary = warningCount == 0 - ? "No active continuity warnings for this scene." - : $"{warningCount} warning{(warningCount == 1 ? "" : "s")} need review."; + var warnings = Model.Warnings.Concat(Model.AgeContinuityWarnings) + .OrderByDescending(x => x.LastDetectedDate) + .ThenByDescending(x => x.CreatedDate) + .Take(3) + .ToList(); + var lastValidated = Model.Warnings.Concat(Model.AgeContinuityWarnings) + .Select(x => (DateTime?)x.LastDetectedDate) + .OrderByDescending(x => x) + .FirstOrDefault(); }
@@ -16,19 +22,29 @@ -
-
- Warnings - @warningCount -
-
- Dependencies - @dependencyCount -
-
-
Continuity health summary -

@summary

+ @if (warningCount == 0) + { +

No active continuity warnings for this scene.

+ @if (lastValidated.HasValue) + { +

Last checked @lastValidated.Value.ToString("d MMM yyyy HH:mm").

+ } + @if (dependencyCount > 0) + { +

@dependencyCount scene dependenc@(dependencyCount == 1 ? "y" : "ies") linked.

+ } + } + else + { +

@warningCount warning@(warningCount == 1 ? "" : "s") need review.

+ + }
diff --git a/PlotLine/Views/Shared/SceneInspectorV2/_ScenePeopleCard.cshtml b/PlotLine/Views/Shared/SceneInspectorV2/_ScenePeopleCard.cshtml index b095c83..b9d669d 100644 --- a/PlotLine/Views/Shared/SceneInspectorV2/_ScenePeopleCard.cshtml +++ b/PlotLine/Views/Shared/SceneInspectorV2/_ScenePeopleCard.cshtml @@ -3,6 +3,7 @@ var povCharacterId = Model.POVCharacterID ?? Model.SceneCharacters.FirstOrDefault(x => x.RoleInSceneTypeName?.Contains("POV", StringComparison.OrdinalIgnoreCase) == true)?.CharacterID; var suggestionCount = Model.CharacterSuggestions.Count + Model.AssetSuggestions.Count + Model.LocationSuggestions.Count; + static string PreviewText(string? value, string fallback) => string.IsNullOrWhiteSpace(value) ? fallback : value.Trim(); }
@@ -21,12 +22,20 @@ } else { -