diff --git a/frontend/components/IconArrowDown.vue b/frontend/components/IconArrowDown.vue new file mode 100644 index 0000000..adf355f --- /dev/null +++ b/frontend/components/IconArrowDown.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconArrowLeft.vue b/frontend/components/IconArrowLeft.vue new file mode 100644 index 0000000..91e7401 --- /dev/null +++ b/frontend/components/IconArrowLeft.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconArrowUp.vue b/frontend/components/IconArrowUp.vue new file mode 100644 index 0000000..f27b8c9 --- /dev/null +++ b/frontend/components/IconArrowUp.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconClose.vue b/frontend/components/IconClose.vue new file mode 100644 index 0000000..c489bfe --- /dev/null +++ b/frontend/components/IconClose.vue @@ -0,0 +1,12 @@ + diff --git a/frontend/components/IconEdit.vue b/frontend/components/IconEdit.vue new file mode 100644 index 0000000..57e1cf9 --- /dev/null +++ b/frontend/components/IconEdit.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconEye.vue b/frontend/components/IconEye.vue new file mode 100644 index 0000000..f3db6d2 --- /dev/null +++ b/frontend/components/IconEye.vue @@ -0,0 +1,21 @@ + diff --git a/frontend/components/IconEyeOff.vue b/frontend/components/IconEyeOff.vue new file mode 100644 index 0000000..e2588fe --- /dev/null +++ b/frontend/components/IconEyeOff.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconLogout.vue b/frontend/components/IconLogout.vue new file mode 100644 index 0000000..efbfd69 --- /dev/null +++ b/frontend/components/IconLogout.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconPrint.vue b/frontend/components/IconPrint.vue new file mode 100644 index 0000000..2d2d335 --- /dev/null +++ b/frontend/components/IconPrint.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/IconTrash.vue b/frontend/components/IconTrash.vue new file mode 100644 index 0000000..3ff9209 --- /dev/null +++ b/frontend/components/IconTrash.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/components/LogoutButton.vue b/frontend/components/LogoutButton.vue index 47b73c4..13046ff 100644 --- a/frontend/components/LogoutButton.vue +++ b/frontend/components/LogoutButton.vue @@ -3,5 +3,13 @@ const { logout } = useAuth() diff --git a/frontend/components/client/ClientCard.vue b/frontend/components/client/ClientCard.vue index 6487382..4e758a6 100644 --- a/frontend/components/client/ClientCard.vue +++ b/frontend/components/client/ClientCard.vue @@ -2,6 +2,25 @@ import type { Client } from '~/types' const props = defineProps<{ client: Client }>() + +const daysAgo = (iso: string): number => { + const diffMs = Date.now() - new Date(iso).getTime() + return Math.max(0, Math.floor(diffMs / 86_400_000)) +} + +const info = computed(() => { + const count = props.client.history_count + if (count == null || count === 0) return null + + const updates = `${count} Verlauf-Update${count > 1 ? 's' : ''}` + const last = props.client.last_history_at + if (!last) return updates + + const d = daysAgo(last) + const when = + d === 0 ? 'heute' : `vor ${d} ${d === 1 ? 'Tag' : 'Tagen'}` + return `${updates} · zuletzt ${when}` +}) diff --git a/frontend/components/client/ClientCustomFieldCard.vue b/frontend/components/client/ClientCustomFieldCard.vue new file mode 100644 index 0000000..5fbd41b --- /dev/null +++ b/frontend/components/client/ClientCustomFieldCard.vue @@ -0,0 +1,113 @@ + + +