fix(activities): return to the same group after opening a card

The back link dropped the board from the address, so the desk reopened on the default group.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-29 09:22:23 +03:30
co-authored by Cursor
parent 63a1803adc
commit 6f42440b3b
3 changed files with 52 additions and 12 deletions
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import axios from 'axios';
import type {
ActivityDto,
@@ -389,8 +389,15 @@ async function onAddStage(name: string) {
}
}
const route = useRoute();
function openActivity(id: string) {
void router.push({ name: 'activity-detail', params: { id } });
const query: Record<string, string> = {};
for (const key of ['board', 'view', 'desk', 'filter', 'stage', 'q', 'typeDefId', 'status', 'assigneeId']) {
const value = route.query[key];
if (typeof value === 'string' && value) query[key] = value;
}
void router.push({ name: 'activity-detail', params: { id }, query });
}
</script>