🎨 Frontend komplett implementiert

Views:
- Login/Registrierung
- Dashboard mit Stats
- Aufträge (Liste + Detail)
- Mitarbeiterverwaltung
- Verfügbarkeitskalender
- Stundenzettel
- Einstellungen
- Module (Dev-Panel)

Features:
- Vue 3 + Composition API
- TailwindCSS mit Dark Mode
- Pinia State Management
- JWT Auth mit Refresh
- Responsive Design
- Rollen-basierte Navigation
This commit is contained in:
2026-02-20 15:18:06 +00:00
parent 82d388f555
commit 474c6d2470
27 changed files with 2328 additions and 2 deletions

View File

@@ -0,0 +1,97 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
defineProps<{
open: boolean
}>()
defineEmits<{
close: []
}>()
const route = useRoute()
const authStore = useAuthStore()
const navigation = computed(() => {
const items = [
{ name: 'Dashboard', href: '/', icon: '📊' },
{ name: 'Aufträge', href: '/orders', icon: '📋' },
]
if (authStore.canManageUsers) {
items.push({ name: 'Mitarbeiter', href: '/users', icon: '👥' })
}
items.push(
{ name: 'Verfügbarkeit', href: '/availability', icon: '📅' },
{ name: 'Stundenzettel', href: '/timesheets', icon: '⏱️' },
)
if (authStore.isChef) {
items.push({ name: 'Module', href: '/modules', icon: '⚙️' })
}
items.push({ name: 'Einstellungen', href: '/settings', icon: '🔧' })
return items
})
function isActive(href: string) {
if (href === '/') return route.path === '/'
return route.path.startsWith(href)
}
</script>
<template>
<aside
:class="[
'fixed inset-y-0 left-0 z-50 w-64 bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 transform transition-transform lg:translate-x-0',
open ? 'translate-x-0' : '-translate-x-full'
]"
>
<!-- Logo -->
<div class="h-16 flex items-center px-6 border-b border-gray-200 dark:border-gray-700">
<span class="text-2xl font-bold text-primary-600">🔐 SeCu</span>
</div>
<!-- Navigation -->
<nav class="mt-6 px-3">
<router-link
v-for="item in navigation"
:key="item.href"
:to="item.href"
:class="[
'flex items-center gap-3 px-3 py-2 rounded-lg mb-1 transition-colors',
isActive(item.href)
? 'bg-primary-100 text-primary-700 dark:bg-primary-900 dark:text-primary-200'
: 'text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700'
]"
@click="$emit('close')"
>
<span class="text-xl">{{ item.icon }}</span>
<span class="font-medium">{{ item.name }}</span>
</router-link>
</nav>
<!-- User info -->
<div class="absolute bottom-0 left-0 right-0 p-4 border-t border-gray-200 dark:border-gray-700">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center">
<span class="text-primary-600 dark:text-primary-300 font-medium">
{{ authStore.user?.first_name?.[0] }}{{ authStore.user?.last_name?.[0] }}
</span>
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-medium text-gray-900 dark:text-white truncate">
{{ authStore.fullName }}
</p>
<p class="text-xs text-gray-500 dark:text-gray-400 capitalize">
{{ authStore.user?.role }}
</p>
</div>
</div>
</div>
</aside>
</template>