Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const EVENT_FRAGMENT = `
id
catcherType
totalCount
count
assignee {
id
name
Expand Down
17 changes: 15 additions & 2 deletions src/components/event/RepetitionsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
{{ formatTimeByRepetition(repetition) }}
</td>

<!-- Count (optional, only when at least one repetition merges several occurrences) -->
<td
v-if="columns.includes('Count')"
class="repetitions-table__count"
>
{{ repetition.count || '—' }}
</td>

<!-- User (optional) -->
<td
v-if="columns.includes('User')"
Expand Down Expand Up @@ -203,6 +211,7 @@ export default defineComponent({
let releaseSpecifiedSomewhere = false;
let userSpecifiedSomewhere = false;
let titleSpecifiedSomewhere = false;
let countSpecifiedSomewhere = false;

this.repetitions.forEach((repetition) => {
if (repetition.payload.release) {
Expand All @@ -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');
}
Expand Down
8 changes: 8 additions & 0 deletions src/types/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Loading