mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
Dashboard Data Refresh After creating a time entry, fixes ST-299
This commit is contained in:
committed by
Constantin Graf
parent
c09119af33
commit
b518187ecb
@@ -8,6 +8,7 @@ import ThisWeekOverview from '@/Components/Dashboard/ThisWeekOverview.vue';
|
||||
import ActivityGraphCard from '@/Components/Dashboard/ActivityGraphCard.vue';
|
||||
import MainContainer from '@/packages/ui/src/MainContainer.vue';
|
||||
import { canViewMembers } from '@/utils/permissions';
|
||||
import { router } from '@inertiajs/vue3';
|
||||
|
||||
const props = defineProps<{
|
||||
latestTasks: {
|
||||
@@ -46,13 +47,29 @@ const props = defineProps<{
|
||||
duration: number;
|
||||
}[];
|
||||
}>();
|
||||
|
||||
function refreshDashboardData() {
|
||||
router.reload({
|
||||
only: [
|
||||
'latestTasks',
|
||||
'latestTeamActivity',
|
||||
'lastSevenDays',
|
||||
'dailyTrackedHours',
|
||||
'weeklyProjectOverview',
|
||||
'totalWeeklyTime',
|
||||
'totalWeeklyBillableTime',
|
||||
'totalWeeklyBillableAmount',
|
||||
'weeklyHistory',
|
||||
],
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout title="Dashboard" data-testid="dashboard_view">
|
||||
<MainContainer
|
||||
class="pt-5 sm:pt-8 pb-4 sm:pb-6 border-b border-default-background-separator">
|
||||
<TimeTracker></TimeTracker>
|
||||
<TimeTracker @change="refreshDashboardData"></TimeTracker>
|
||||
</MainContainer>
|
||||
<MainContainer
|
||||
class="grid gap-5 sm:gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 pt-3 sm:pt-5 pb-4 sm:pb-6 border-b border-default-background-separator items-stretch">
|
||||
|
||||
Reference in New Issue
Block a user