mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-18 05:02:14 +01:00
add dashboard frontend
This commit is contained in:
22
resources/js/Components/Dashboard/LastSevenDaysCard.vue
Normal file
22
resources/js/Components/Dashboard/LastSevenDaysCard.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import DashboardCard from '@/Components/Dashboard/DashboardCard.vue';
|
||||
import DayOverviewCardEntry from '@/Components/Dashboard/DayOverviewCardEntry.vue';
|
||||
import { CalendarIcon } from '@heroicons/vue/20/solid';
|
||||
defineProps<{
|
||||
last7Days: {
|
||||
date: string;
|
||||
duration: number; // Total duration in seconds
|
||||
history: number[]; // Array representing the duration in seconds of the 3h windows for the day
|
||||
}[];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DashboardCard title="Last 7 Days" :icon="CalendarIcon">
|
||||
<DayOverviewCardEntry
|
||||
v-for="day in last7Days"
|
||||
:key="day.date"
|
||||
:date="day.date"
|
||||
:duration="day.duration"></DayOverviewCardEntry>
|
||||
</DashboardCard>
|
||||
</template>
|
||||
Reference in New Issue
Block a user