Fix activity session navigation
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, computed, onMounted } from 'vue';
|
import { ref, reactive, computed, onMounted } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
import { state, navigateToSession } from '../store.js';
|
import { state, navigateToSession } from '../store.js';
|
||||||
import { fmtTokens, fmtDuration, fmtTooltipDate, positionTooltip, escapeHTML, formatProjectLabel } from '../utils.js';
|
import { fmtTokens, fmtDuration, fmtTooltipDate, positionTooltip, escapeHTML, formatProjectLabel } from '../utils.js';
|
||||||
|
|
||||||
defineOptions({ name: 'Activity' });
|
defineOptions({ name: 'Activity' });
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
// --- State ---
|
// --- State ---
|
||||||
const activeTab = ref('daily');
|
const activeTab = ref('daily');
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
@@ -320,6 +323,7 @@ function updateTooltipPos(event) {
|
|||||||
|
|
||||||
function goToSession(sessionId) {
|
function goToSession(sessionId) {
|
||||||
navigateToSession(sessionId);
|
navigateToSession(sessionId);
|
||||||
|
router.push({ name: 'SessionDetail', params: { id: sessionId } });
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildMonthBlock(year, month) {
|
function buildMonthBlock(year, month) {
|
||||||
|
|||||||
Reference in New Issue
Block a user