feat: pagination + hide fields in settings

This commit is contained in:
Vasily Zubarev
2025-03-27 08:48:47 +01:00
parent a80684c3fb
commit 61da617f68
25 changed files with 813 additions and 220 deletions

View File

@@ -53,13 +53,19 @@ export const FormSelect = ({
items,
emptyValue,
placeholder,
hideIfEmpty = false,
...props
}: {
title: string
items: Array<{ code: string; name: string; color?: string }>
emptyValue?: string
placeholder?: string
hideIfEmpty?: boolean
} & SelectProps) => {
if (hideIfEmpty && (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value) {
return null
}
return (
<span className="flex flex-col gap-1">
<span className="text-sm font-medium">{title}</span>