Type the public document patient validator for production builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alexey Novikov
2026-09-16 13:41:26 +03:00
co-authored by Cursor
parent f94d08a101
commit 940003956e
+1 -1
View File
@@ -41,7 +41,7 @@ export const Documents: CollectionConfig = {
admin: {
condition: (data) => !data?.isPublic,
},
validate: (value, { data }) => {
validate: (value: unknown, { data }: { data?: { isPublic?: boolean | null } }) => {
if (data?.isPublic) return true
if (!value) return 'Укажите пациента или отметьте документ как публичный'
return true