Add ability to mark review items as unreviewed (#20446)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions

* new body param

* use new body param in endpoint

* explicitly use new param in frontend endpoint

* use reviewsegment as type instead of list of strings

* add toggle function to mark as unreviewed when all selected are reviewed

* i18n

* fix tests
This commit is contained in:
Josh Hawkins
2025-10-12 08:10:56 -05:00
committed by GitHub
parent a2ad77c36e
commit 6d5098a0c2
7 changed files with 60 additions and 28 deletions
+5 -1
View File
@@ -356,6 +356,7 @@ export default function Events() {
if (itemsToMarkReviewed.length > 0) {
await axios.post(`reviews/viewed`, {
ids: itemsToMarkReviewed,
reviewed: true,
});
reloadData();
}
@@ -365,7 +366,10 @@ export default function Events() {
const markItemAsReviewed = useCallback(
async (review: ReviewSegment) => {
const resp = await axios.post(`reviews/viewed`, { ids: [review.id] });
const resp = await axios.post(`reviews/viewed`, {
ids: [review.id],
reviewed: true,
});
if (resp.status == 200) {
updateSegments(