From e957d055cfdb010b3d221fa5806b0976756fd9ba Mon Sep 17 00:00:00 2001 From: Chris Searle Date: Thu, 12 Sep 2024 09:42:33 +0200 Subject: [PATCH] Add remove filter. Lint and type-check --- .../java/conf/model/search/SessionResponse.kt | 1 + web/src/components/AggregateCard.vue | 17 ++++++++- web/src/components/AggregateTotals.vue | 35 +++++++++++++++---- web/src/components/SessionItem.vue | 2 +- web/src/types/aggregates.ts | 12 +++++-- web/src/types/api.ts | 1 + web/src/views/AllVideosView.vue | 16 ++------- web/src/views/SearchView.vue | 31 ++++++++++++++-- 8 files changed, 90 insertions(+), 25 deletions(-) diff --git a/src/main/kotlin/no/java/conf/model/search/SessionResponse.kt b/src/main/kotlin/no/java/conf/model/search/SessionResponse.kt index c137056..1ed7a88 100644 --- a/src/main/kotlin/no/java/conf/model/search/SessionResponse.kt +++ b/src/main/kotlin/no/java/conf/model/search/SessionResponse.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.Serializable @Serializable data class SessionResponse( + val id: String, val title: String, val video: String?, val year: Int, diff --git a/web/src/components/AggregateCard.vue b/web/src/components/AggregateCard.vue index 1916b43..6e5ccdc 100644 --- a/web/src/components/AggregateCard.vue +++ b/web/src/components/AggregateCard.vue @@ -4,16 +4,22 @@ import type {AggregateCardRow} from "@/types/helpers"; const props = defineProps<{ title: string aggregate: AggregateCardRow[] + filter?: string }>() const emit = defineEmits<{ filter: [value: string] + clear: [] }>() const performFilter = (value: string) => { emit('filter', value) } +const clearFilter = () => { + emit('clear') +} +