Add singles from admin

This commit is contained in:
lucast committed 2026-09-26 00:04:55 +02:00
1 parent 3255a97339
commit 3402178932
2 files changed
+72 -1

No files matched your search

+7 -1
View File
@@ -4,6 +4,7 @@ import { type Option } from "~/ui/SearchSelect.vue"
interface BaseField<T> {
key: keyof T
label?: string
visibleWhen?: (value: any) => boolean
}
interface TextField<T> extends BaseField<T> {
@@ -114,7 +115,12 @@ watch(
<p v-if="props.title" class="title">{{ props.title }}</p>
<form class="form" @submit.prevent="save">
<template v-for="field in props.fields">
<template
v-for="field in props.fields.filter(
(field) =>
!field.visibleWhen || field.visibleWhen(localItem),
)"
>
<SearchSelect
v-if="
field.type == 'search-select' ||