add detailed reporting page

This commit is contained in:
Gregor Vostrak
2024-09-18 16:54:10 +02:00
parent 165391861a
commit 3ee7839ca9
13 changed files with 446 additions and 22 deletions

View File

@@ -1,12 +1,13 @@
<script setup lang="ts">
import Dropdown from '@/packages/ui/src/Input/Dropdown.vue';
import { defineProps, ref } from 'vue';
import { formatStartEnd } from '@/packages/ui/src/utils/time';
import { formatDate, formatStartEnd } from '@/packages/ui/src/utils/time';
import TimeRangeSelector from '@/packages/ui/src/Input/TimeRangeSelector.vue';
defineProps<{
start: string;
end: string | null;
showDate?: boolean;
}>();
const emit = defineEmits<{
@@ -26,8 +27,15 @@ const open = ref(false);
<template #trigger>
<button
data-testid="time_entry_range_selector"
class="text-muted w-[110px] px-2 py-2 bg-transparent text-center hover:bg-card-background rounded-lg border border-transparent hover:border-card-border text-sm font-medium">
class="text-muted w-[110px] px-2 bg-transparent text-center hover:bg-card-background rounded-lg border border-transparent hover:border-card-border"
:class="{
'text-sm py-2 font-medium': !showDate,
'text-xs py-1.5 font-semibold': showDate,
}">
{{ formatStartEnd(start, end) }}
<span v-if="showDate" class="text-text-tertiary font-medium"
>{{ formatDate(start) }}
</span>
</button>
</template>
<template #content>