mandant-crm/frontend/components/client/ClientCard.vue
Tim Stollberg e5e0be57da feat(frontend): scaffold Nuxt 3 CSR SPA with full auth + client/history UI
- Nuxt 3 CSR (ssr:false), @nuxtjs/tailwindcss, dev proxy to backend
- useAuth composable: CSRF cookie, XSRF token, login/logout/fetchUser
- auth middleware: redirects to /login if no session
- Login page, client list with search + create modal
- Client detail with editable name, dynamic notes (JSON), history feed
- History form with type select, inline edit/delete per entry
- Print layout at /clients/:id/print (calls window.print on mount)
- TypeScript interfaces: User, Client, HistoryEntry, PaginatedResponse
- German UI labels throughout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 17:33:39 +07:00

17 lines
536 B
Vue

<script setup lang="ts">
import type { Client } from '~/types'
const props = defineProps<{ client: Client }>()
</script>
<template>
<NuxtLink
:to="`/clients/${client.id}`"
class="block border border-gray-200 bg-white px-4 py-3 hover:bg-blue-50 cursor-pointer"
>
<div class="flex items-baseline gap-4">
<span class="text-sm font-mono text-gray-500 w-20 shrink-0">{{ client.client_number }}</span>
<span class="text-sm font-medium text-gray-900">{{ client.name }}</span>
</div>
</NuxtLink>
</template>