From 23c8ba70cb2ba08ea94d4f957e7e0cce5affe241 Mon Sep 17 00:00:00 2001 From: Reversean Date: Fri, 3 Jul 2026 14:14:40 +0300 Subject: [PATCH] feat(events): show per-repetition occurrence count in repetitions table - expose count field on Event via GraphQL fragment and HawkEvent type - add optional Count column to the repetitions table, shown only when at least one repetition in the list has a count greater than one --- src/api/fragments.ts | 1 + src/components/event/RepetitionsList.vue | 17 +++++++++++++++-- src/types/events.ts | 8 ++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/api/fragments.ts b/src/api/fragments.ts index a3b0b4d81..179674746 100644 --- a/src/api/fragments.ts +++ b/src/api/fragments.ts @@ -37,6 +37,7 @@ export const EVENT_FRAGMENT = ` id catcherType totalCount + count assignee { id name diff --git a/src/components/event/RepetitionsList.vue b/src/components/event/RepetitionsList.vue index 39c5157bb..803520b79 100644 --- a/src/components/event/RepetitionsList.vue +++ b/src/components/event/RepetitionsList.vue @@ -27,6 +27,14 @@ {{ formatTimeByRepetition(repetition) }} + + + {{ repetition.count || '—' }} + + { if (repetition.payload.release) { @@ -217,11 +226,15 @@ export default defineComponent({ userSpecifiedSomewhere = true; } - if (titleSpecifiedSomewhere && userSpecifiedSomewhere && releaseSpecifiedSomewhere) { - return; + if (repetition.count) { + countSpecifiedSomewhere = true; } }); + if (countSpecifiedSomewhere) { + cols.push('Count'); + } + if (userSpecifiedSomewhere) { cols.push('User'); } diff --git a/src/types/events.ts b/src/types/events.ts index 526d387c8..ce4378541 100644 --- a/src/types/events.ts +++ b/src/types/events.ts @@ -76,6 +76,14 @@ export interface HawkEvent { */ totalCount: number; + /** + * Number of real occurrences this single repetition represents. Undefined + * for the original event and for ordinary repetitions (both mean "single + * occurrence") — distinct from totalCount, which is the group's grand + * total across all repetitions. + */ + count?: number; + /** * Users who visited this event */