mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: isRequired for fields now respected
This commit is contained in:
@@ -240,6 +240,7 @@ export async function addFieldAction(userId: string, data: Prisma.FieldCreateInp
|
|||||||
llm_prompt: validatedForm.data.llm_prompt,
|
llm_prompt: validatedForm.data.llm_prompt,
|
||||||
isVisibleInList: validatedForm.data.isVisibleInList,
|
isVisibleInList: validatedForm.data.isVisibleInList,
|
||||||
isVisibleInAnalysis: validatedForm.data.isVisibleInAnalysis,
|
isVisibleInAnalysis: validatedForm.data.isVisibleInAnalysis,
|
||||||
|
isRequired: validatedForm.data.isRequired,
|
||||||
isExtra: true,
|
isExtra: true,
|
||||||
})
|
})
|
||||||
revalidatePath("/settings/fields")
|
revalidatePath("/settings/fields")
|
||||||
@@ -260,6 +261,7 @@ export async function editFieldAction(userId: string, code: string, data: Prisma
|
|||||||
llm_prompt: validatedForm.data.llm_prompt,
|
llm_prompt: validatedForm.data.llm_prompt,
|
||||||
isVisibleInList: validatedForm.data.isVisibleInList,
|
isVisibleInList: validatedForm.data.isVisibleInList,
|
||||||
isVisibleInAnalysis: validatedForm.data.isVisibleInAnalysis,
|
isVisibleInAnalysis: validatedForm.data.isVisibleInAnalysis,
|
||||||
|
isRequired: validatedForm.data.isRequired,
|
||||||
})
|
})
|
||||||
revalidatePath("/settings/fields")
|
revalidatePath("/settings/fields")
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,13 @@ export default async function FieldsSettingsPage() {
|
|||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
editable: true,
|
editable: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "isRequired",
|
||||||
|
label: "Is required",
|
||||||
|
type: "checkbox",
|
||||||
|
defaultValue: false,
|
||||||
|
editable: true,
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
onDelete={async (code) => {
|
onDelete={async (code) => {
|
||||||
"use server"
|
"use server"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ export const FormSelectCategory = ({
|
|||||||
emptyValue,
|
emptyValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
hideIfEmpty = false,
|
hideIfEmpty = false,
|
||||||
|
isRequired = false,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
title: string
|
title: string
|
||||||
@@ -18,6 +19,7 @@ export const FormSelectCategory = ({
|
|||||||
emptyValue?: string
|
emptyValue?: string
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
} & SelectProps) => {
|
} & SelectProps) => {
|
||||||
const items = useMemo(
|
const items = useMemo(
|
||||||
() => categories.map((category) => ({ code: category.code, name: category.name, color: category.color })),
|
() => categories.map((category) => ({ code: category.code, name: category.name, color: category.color })),
|
||||||
@@ -30,6 +32,7 @@ export const FormSelectCategory = ({
|
|||||||
emptyValue={emptyValue}
|
emptyValue={emptyValue}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
hideIfEmpty={hideIfEmpty}
|
hideIfEmpty={hideIfEmpty}
|
||||||
|
isRequired={isRequired}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const FormSelectCurrency = ({
|
|||||||
emptyValue,
|
emptyValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
hideIfEmpty = false,
|
hideIfEmpty = false,
|
||||||
|
isRequired = false,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
currencies: { code: string; name: string }[]
|
currencies: { code: string; name: string }[]
|
||||||
@@ -15,6 +16,7 @@ export const FormSelectCurrency = ({
|
|||||||
emptyValue?: string
|
emptyValue?: string
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
} & SelectProps) => {
|
} & SelectProps) => {
|
||||||
const items = useMemo(
|
const items = useMemo(
|
||||||
() =>
|
() =>
|
||||||
@@ -32,6 +34,7 @@ export const FormSelectCurrency = ({
|
|||||||
emptyValue={emptyValue}
|
emptyValue={emptyValue}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
hideIfEmpty={hideIfEmpty}
|
hideIfEmpty={hideIfEmpty}
|
||||||
|
isRequired={isRequired}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const FormSelectProject = ({
|
|||||||
emptyValue,
|
emptyValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
hideIfEmpty = false,
|
hideIfEmpty = false,
|
||||||
|
isRequired = false,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
title: string
|
title: string
|
||||||
@@ -15,6 +16,7 @@ export const FormSelectProject = ({
|
|||||||
emptyValue?: string
|
emptyValue?: string
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
} & SelectProps) => {
|
} & SelectProps) => {
|
||||||
return (
|
return (
|
||||||
<FormSelect
|
<FormSelect
|
||||||
@@ -23,6 +25,7 @@ export const FormSelectProject = ({
|
|||||||
emptyValue={emptyValue}
|
emptyValue={emptyValue}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
hideIfEmpty={hideIfEmpty}
|
hideIfEmpty={hideIfEmpty}
|
||||||
|
isRequired={isRequired}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,15 @@ export const FormSelectType = ({
|
|||||||
emptyValue,
|
emptyValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
hideIfEmpty = false,
|
hideIfEmpty = false,
|
||||||
|
isRequired = false,
|
||||||
...props
|
...props
|
||||||
}: { title: string; emptyValue?: string; placeholder?: string; hideIfEmpty?: boolean } & SelectProps) => {
|
}: {
|
||||||
|
title: string
|
||||||
|
emptyValue?: string
|
||||||
|
placeholder?: string
|
||||||
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
|
} & SelectProps) => {
|
||||||
const items = [
|
const items = [
|
||||||
{ code: "expense", name: "Expense", badge: "↓" },
|
{ code: "expense", name: "Expense", badge: "↓" },
|
||||||
{ code: "income", name: "Income", badge: "↑" },
|
{ code: "income", name: "Income", badge: "↑" },
|
||||||
@@ -22,6 +29,7 @@ export const FormSelectType = ({
|
|||||||
emptyValue={emptyValue}
|
emptyValue={emptyValue}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
hideIfEmpty={hideIfEmpty}
|
hideIfEmpty={hideIfEmpty}
|
||||||
|
isRequired={isRequired}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,17 +16,20 @@ import { InputHTMLAttributes, TextareaHTMLAttributes, useEffect, useRef, useStat
|
|||||||
type FormInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
type FormInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
||||||
title?: string
|
title?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FormInput({ title, hideIfEmpty = false, ...props }: FormInputProps) {
|
export function FormInput({ title, hideIfEmpty = false, isRequired = false, ...props }: FormInputProps) {
|
||||||
if (hideIfEmpty && (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value) {
|
const isEmpty = (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value
|
||||||
|
|
||||||
|
if (hideIfEmpty && isEmpty) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<label className="flex flex-col gap-1">
|
<label className="flex flex-col gap-1">
|
||||||
{title && <span className="text-sm font-medium">{title}</span>}
|
{title && <span className="text-sm font-medium">{title}</span>}
|
||||||
<Input {...props} className={cn("bg-background", props.className)} />
|
<Input {...props} className={cn("bg-background", isRequired && isEmpty && "bg-yellow-50", props.className)} />
|
||||||
</label>
|
</label>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -34,10 +37,12 @@ export function FormInput({ title, hideIfEmpty = false, ...props }: FormInputPro
|
|||||||
type FormTextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
type FormTextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
||||||
title?: string
|
title?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FormTextarea({ title, hideIfEmpty = false, ...props }: FormTextareaProps) {
|
export function FormTextarea({ title, hideIfEmpty = false, isRequired = false, ...props }: FormTextareaProps) {
|
||||||
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
||||||
|
const isEmpty = (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const textarea = textareaRef.current
|
const textarea = textareaRef.current
|
||||||
@@ -54,14 +59,18 @@ export function FormTextarea({ title, hideIfEmpty = false, ...props }: FormTexta
|
|||||||
return () => textarea.removeEventListener("input", resize)
|
return () => textarea.removeEventListener("input", resize)
|
||||||
}, [props.value, props.defaultValue])
|
}, [props.value, props.defaultValue])
|
||||||
|
|
||||||
if (hideIfEmpty && (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value) {
|
if (hideIfEmpty && isEmpty) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<label className="flex flex-col gap-1">
|
<label className="flex flex-col gap-1">
|
||||||
{title && <span className="text-sm font-medium">{title}</span>}
|
{title && <span className="text-sm font-medium">{title}</span>}
|
||||||
<Textarea ref={textareaRef} {...props} className={cn("bg-background", props.className)} />
|
<Textarea
|
||||||
|
ref={textareaRef}
|
||||||
|
{...props}
|
||||||
|
className={cn("bg-background", isRequired && isEmpty && "bg-yellow-50", props.className)}
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -72,6 +81,7 @@ export const FormSelect = ({
|
|||||||
emptyValue,
|
emptyValue,
|
||||||
placeholder,
|
placeholder,
|
||||||
hideIfEmpty = false,
|
hideIfEmpty = false,
|
||||||
|
isRequired = false,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
items: Array<{ code: string; name: string; color?: string; badge?: string }>
|
items: Array<{ code: string; name: string; color?: string; badge?: string }>
|
||||||
@@ -79,8 +89,11 @@ export const FormSelect = ({
|
|||||||
emptyValue?: string
|
emptyValue?: string
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
hideIfEmpty?: boolean
|
hideIfEmpty?: boolean
|
||||||
|
isRequired?: boolean
|
||||||
} & SelectProps) => {
|
} & SelectProps) => {
|
||||||
if (hideIfEmpty && (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value) {
|
const isEmpty = (!props.defaultValue || props.defaultValue.toString().trim() === "") && !props.value
|
||||||
|
|
||||||
|
if (hideIfEmpty && isEmpty) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,7 +101,7 @@ export const FormSelect = ({
|
|||||||
<span className="flex flex-col gap-1">
|
<span className="flex flex-col gap-1">
|
||||||
{title && <span className="text-sm font-medium">{title}</span>}
|
{title && <span className="text-sm font-medium">{title}</span>}
|
||||||
<Select {...props}>
|
<Select {...props}>
|
||||||
<SelectTrigger className="w-full min-w-[150px] bg-background">
|
<SelectTrigger className={cn("w-full min-w-[150px] bg-background", isRequired && isEmpty && "bg-yellow-50")}>
|
||||||
<SelectValue placeholder={placeholder} />
|
<SelectValue placeholder={placeholder} />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
|
|||||||
@@ -85,11 +85,26 @@ export default function TransactionEditForm({
|
|||||||
<form action={saveAction} className="space-y-4">
|
<form action={saveAction} className="space-y-4">
|
||||||
<input type="hidden" name="transactionId" value={transaction.id} />
|
<input type="hidden" name="transactionId" value={transaction.id} />
|
||||||
|
|
||||||
<FormInput title={fieldMap.name.name} name="name" defaultValue={formData.name} />
|
<FormInput
|
||||||
|
title={fieldMap.name.name}
|
||||||
|
name="name"
|
||||||
|
defaultValue={formData.name}
|
||||||
|
isRequired={fieldMap.name.isRequired}
|
||||||
|
/>
|
||||||
|
|
||||||
<FormInput title={fieldMap.merchant.name} name="merchant" defaultValue={formData.merchant} />
|
<FormInput
|
||||||
|
title={fieldMap.merchant.name}
|
||||||
|
name="merchant"
|
||||||
|
defaultValue={formData.merchant}
|
||||||
|
isRequired={fieldMap.merchant.isRequired}
|
||||||
|
/>
|
||||||
|
|
||||||
<FormInput title={fieldMap.description.name} name="description" defaultValue={formData.description} />
|
<FormInput
|
||||||
|
title={fieldMap.description.name}
|
||||||
|
name="description"
|
||||||
|
defaultValue={formData.description}
|
||||||
|
isRequired={fieldMap.description.isRequired}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="flex flex-row gap-4">
|
<div className="flex flex-row gap-4">
|
||||||
<FormInput
|
<FormInput
|
||||||
@@ -99,6 +114,7 @@ export default function TransactionEditForm({
|
|||||||
name="total"
|
name="total"
|
||||||
defaultValue={formData.total.toFixed(2)}
|
defaultValue={formData.total.toFixed(2)}
|
||||||
className="w-32"
|
className="w-32"
|
||||||
|
isRequired={fieldMap.total.isRequired}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormSelectCurrency
|
<FormSelectCurrency
|
||||||
@@ -109,9 +125,15 @@ export default function TransactionEditForm({
|
|||||||
setFormData({ ...formData, currencyCode: value })
|
setFormData({ ...formData, currencyCode: value })
|
||||||
}}
|
}}
|
||||||
currencies={currencies}
|
currencies={currencies}
|
||||||
|
isRequired={fieldMap.currencyCode.isRequired}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormSelectType title={fieldMap.type.name} name="type" defaultValue={formData.type} />
|
<FormSelectType
|
||||||
|
title={fieldMap.type.name}
|
||||||
|
name="type"
|
||||||
|
defaultValue={formData.type}
|
||||||
|
isRequired={fieldMap.type.isRequired}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{formData.currencyCode !== settings.default_currency || formData.convertedTotal !== 0 ? (
|
{formData.currencyCode !== settings.default_currency || formData.convertedTotal !== 0 ? (
|
||||||
@@ -122,6 +144,7 @@ export default function TransactionEditForm({
|
|||||||
step="0.01"
|
step="0.01"
|
||||||
name="convertedTotal"
|
name="convertedTotal"
|
||||||
defaultValue={formData.convertedTotal.toFixed(2)}
|
defaultValue={formData.convertedTotal.toFixed(2)}
|
||||||
|
isRequired={fieldMap.convertedTotal.isRequired}
|
||||||
/>
|
/>
|
||||||
{(!formData.convertedCurrencyCode || formData.convertedCurrencyCode !== settings.default_currency) && (
|
{(!formData.convertedCurrencyCode || formData.convertedCurrencyCode !== settings.default_currency) && (
|
||||||
<FormSelectCurrency
|
<FormSelectCurrency
|
||||||
@@ -129,6 +152,7 @@ export default function TransactionEditForm({
|
|||||||
name="convertedCurrencyCode"
|
name="convertedCurrencyCode"
|
||||||
defaultValue={formData.convertedCurrencyCode || settings.default_currency}
|
defaultValue={formData.convertedCurrencyCode || settings.default_currency}
|
||||||
currencies={currencies}
|
currencies={currencies}
|
||||||
|
isRequired={fieldMap.convertedCurrencyCode.isRequired}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -137,7 +161,13 @@ export default function TransactionEditForm({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex flex-row flex-grow gap-4">
|
<div className="flex flex-row flex-grow gap-4">
|
||||||
<FormInput title={fieldMap.issuedAt.name} type="date" name="issuedAt" defaultValue={formData.issuedAt} />
|
<FormInput
|
||||||
|
title={fieldMap.issuedAt.name}
|
||||||
|
type="date"
|
||||||
|
name="issuedAt"
|
||||||
|
defaultValue={formData.issuedAt}
|
||||||
|
isRequired={fieldMap.issuedAt.isRequired}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-row gap-4">
|
<div className="flex flex-row gap-4">
|
||||||
@@ -146,6 +176,7 @@ export default function TransactionEditForm({
|
|||||||
categories={categories}
|
categories={categories}
|
||||||
name="categoryCode"
|
name="categoryCode"
|
||||||
defaultValue={formData.categoryCode}
|
defaultValue={formData.categoryCode}
|
||||||
|
isRequired={fieldMap.categoryCode.isRequired}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormSelectProject
|
<FormSelectProject
|
||||||
@@ -153,10 +184,17 @@ export default function TransactionEditForm({
|
|||||||
projects={projects}
|
projects={projects}
|
||||||
name="projectCode"
|
name="projectCode"
|
||||||
defaultValue={formData.projectCode}
|
defaultValue={formData.projectCode}
|
||||||
|
isRequired={fieldMap.projectCode.isRequired}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormTextarea title={fieldMap.note.name} name="note" defaultValue={formData.note} className="h-24" />
|
<FormTextarea
|
||||||
|
title={fieldMap.note.name}
|
||||||
|
name="note"
|
||||||
|
defaultValue={formData.note}
|
||||||
|
className="h-24"
|
||||||
|
isRequired={fieldMap.note.isRequired}
|
||||||
|
/>
|
||||||
{extraFields.map((field) => (
|
{extraFields.map((field) => (
|
||||||
<FormInput
|
<FormInput
|
||||||
key={field.code}
|
key={field.code}
|
||||||
@@ -164,6 +202,7 @@ export default function TransactionEditForm({
|
|||||||
title={field.name}
|
title={field.name}
|
||||||
name={field.code}
|
name={field.code}
|
||||||
defaultValue={formData[field.code as keyof typeof formData] || ""}
|
defaultValue={formData[field.code as keyof typeof formData] || ""}
|
||||||
|
isRequired={field.isRequired}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
|||||||
@@ -230,6 +230,19 @@ export function TransactionList({ transactions, fields = [] }: { transactions: T
|
|||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function to check if a transaction is incomplete
|
||||||
|
const isTransactionIncomplete = (transaction: Transaction): boolean => {
|
||||||
|
const requiredFields = fields.filter((field) => field.isRequired)
|
||||||
|
|
||||||
|
return requiredFields.some((field) => {
|
||||||
|
const value = field.isExtra
|
||||||
|
? (transaction.extra as Record<string, any>)?.[field.code]
|
||||||
|
: transaction[field.code as keyof Transaction]
|
||||||
|
|
||||||
|
return value === undefined || value === null || value === "" || value === 0
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="rounded-md border">
|
<div className="rounded-md border">
|
||||||
<Table>
|
<Table>
|
||||||
@@ -257,7 +270,11 @@ export function TransactionList({ transactions, fields = [] }: { transactions: T
|
|||||||
{transactions.map((transaction) => (
|
{transactions.map((transaction) => (
|
||||||
<TableRow
|
<TableRow
|
||||||
key={transaction.id}
|
key={transaction.id}
|
||||||
className={cn(selectedIds.includes(transaction.id) && "bg-muted", "cursor-pointer hover:bg-muted/50")}
|
className={cn(
|
||||||
|
isTransactionIncomplete(transaction) && "bg-yellow-50",
|
||||||
|
selectedIds.includes(transaction.id) && "bg-muted",
|
||||||
|
"cursor-pointer hover:bg-muted/50"
|
||||||
|
)}
|
||||||
onClick={() => handleRowClick(transaction.id)}
|
onClick={() => handleRowClick(transaction.id)}
|
||||||
>
|
>
|
||||||
<TableCell onClick={(e) => e.stopPropagation()}>
|
<TableCell onClick={(e) => e.stopPropagation()}>
|
||||||
|
|||||||
@@ -34,4 +34,5 @@ export const fieldFormSchema = z.object({
|
|||||||
llm_prompt: z.string().max(512).nullable().optional(),
|
llm_prompt: z.string().max(512).nullable().optional(),
|
||||||
isVisibleInList: z.boolean().optional(),
|
isVisibleInList: z.boolean().optional(),
|
||||||
isVisibleInAnalysis: z.boolean().optional(),
|
isVisibleInAnalysis: z.boolean().optional(),
|
||||||
|
isRequired: z.boolean().optional(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ export const DEFAULT_FIELDS = [
|
|||||||
llm_prompt: "issued at date (YYYY-MM-DD format)",
|
llm_prompt: "issued at date (YYYY-MM-DD format)",
|
||||||
isVisibleInList: true,
|
isVisibleInList: true,
|
||||||
isVisibleInAnalysis: true,
|
isVisibleInAnalysis: true,
|
||||||
isRequired: false,
|
isRequired: true,
|
||||||
isExtra: false,
|
isExtra: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -357,7 +357,7 @@ export const DEFAULT_FIELDS = [
|
|||||||
llm_prompt: "total total of the transaction",
|
llm_prompt: "total total of the transaction",
|
||||||
isVisibleInList: true,
|
isVisibleInList: true,
|
||||||
isVisibleInAnalysis: true,
|
isVisibleInAnalysis: true,
|
||||||
isRequired: false,
|
isRequired: true,
|
||||||
isExtra: false,
|
isExtra: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user