Add severity filter (#11190)

* Allow viewing all types on single screen

* Implement for mobile as well

* fix import

* Show all is optional
This commit is contained in:
Nicolas Mowen
2024-05-01 08:11:16 -06:00
committed by GitHub
parent 499f70cfd3
commit b5b819c866
5 changed files with 66 additions and 6 deletions

View File

@@ -270,6 +270,7 @@ export default function EventView({
? ["cameras", "date", "motionOnly"]
: ["cameras", "reviewed", "date", "general"]
}
currentSeverity={severityToggle}
reviewSummary={reviewSummary}
filter={filter}
onUpdateFilter={updateFilter}
@@ -370,7 +371,13 @@ function DetectionReview({
return null;
}
const current = reviewItems[severity];
let current;
if (filter?.showAll) {
current = reviewItems.all;
} else {
current = reviewItems[severity];
}
if (!current || current.length == 0) {
return [];