Done. I updated [Edit.cshtml (line 200)](C:/Source/PlotLine/PlotLine/Views/FloorPlans/Edit.cshtml:200) so the Occupancy Warnings panel is hidden by default and only appears when the selected scene/floor has actual warning rows.
Also removed the “All scene occupants are placed.” message entirely, and filtered “Some occupants are on other floors.” out of the large panel so it can remain only as the compact contextual note near the plan. Verification: dotnet build PlotLine.slnx passes with 0 warnings and 0 errors. No occupancy model, floor rendering, transition, AJAX, or database changes.
This commit is contained in:
parent
f4a455f70b
commit
7874740f42
@ -200,12 +200,16 @@
|
||||
</label>
|
||||
<button class="btn btn-outline-secondary btn-sm" type="button" data-occupancy-prev>Previous Scene</button>
|
||||
<button class="btn btn-outline-secondary btn-sm" type="button" data-occupancy-next>Next Scene</button>
|
||||
<div class="floor-plan-occupancy-warning-panel" data-occupancy-warning-panel>
|
||||
<div class="floor-plan-occupancy-warning-panel" data-occupancy-warning-panel hidden>
|
||||
<strong>Occupancy Warnings</strong>
|
||||
<p class="floor-plan-occupancy-warning-empty" data-occupancy-warning-empty>All scene occupants are placed.</p>
|
||||
<ul>
|
||||
@foreach (var warning in Model.OccupancyWarnings)
|
||||
{
|
||||
if (string.Equals(warning.Message, "Some occupants are on other floors.", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
<li class="floor-plan-occupancy-warning floor-plan-occupancy-warning--@warning.Severity"
|
||||
data-occupancy-warning
|
||||
data-occupancy-scene="@warning.SceneID"
|
||||
@ -1010,8 +1014,8 @@
|
||||
const occupancyNext = editor.querySelector("[data-occupancy-next]");
|
||||
const occupancyTrays = [...editor.querySelectorAll("[data-occupancy-tray]")];
|
||||
const occupancyMessages = [...editor.querySelectorAll("[data-occupancy-message]")];
|
||||
const occupancyWarningPanel = editor.querySelector("[data-occupancy-warning-panel]");
|
||||
const occupancyWarnings = [...editor.querySelectorAll("[data-occupancy-warning]")];
|
||||
const occupancyWarningEmpty = editor.querySelector("[data-occupancy-warning-empty]");
|
||||
const initialSelectedBlockId = options.selectedBlockId || "@selectedBlockId";
|
||||
const saveStatusText = {
|
||||
saved: "Saved",
|
||||
@ -1106,8 +1110,8 @@
|
||||
warning.hidden = !visible;
|
||||
if (visible) visibleWarnings++;
|
||||
});
|
||||
if (occupancyWarningEmpty) {
|
||||
occupancyWarningEmpty.hidden = !showOccupancy || visibleWarnings > 0;
|
||||
if (occupancyWarningPanel) {
|
||||
occupancyWarningPanel.hidden = !showOccupancy || visibleWarnings === 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user