add timesheets page

This commit is contained in:
Gregor Vostrak
2026-04-30 02:50:02 +02:00
parent b73aa543fd
commit db4af2bcac
28 changed files with 2424 additions and 147 deletions

View File

@@ -1,11 +1,15 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { computed, onMounted, ref } from 'vue';
import { twMerge } from 'tailwind-merge';
const props = defineProps<{
name?: string;
class?: string;
}>();
const props = withDefaults(
defineProps<{
name?: string;
class?: string;
size?: 'sm' | 'base';
}>(),
{ size: 'base' }
);
const input = ref<HTMLInputElement | null>(null);
@@ -17,6 +21,10 @@ onMounted(() => {
defineExpose({ focus: () => input.value?.focus() });
const model = defineModel();
const sizeClasses = computed(() =>
props.size === 'sm' ? 'h-7 px-2 py-0.5 text-xs' : 'h-9 px-3 py-1 text-base sm:text-sm'
);
</script>
<template>
@@ -25,7 +33,8 @@ const model = defineModel();
v-model="model"
:class="
twMerge(
'h-9 px-3 py-1 text-base sm:text-sm border-input-border border bg-input-background text-text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent rounded-md shadow-sm',
'border-input-border border bg-input-background text-text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:border-transparent rounded-md shadow-sm',
sizeClasses,
props.class
)
"