diff --git a/resources/js/components/automation-rules/automation-rule-form.tsx b/resources/js/components/automation-rules/automation-rule-form.tsx index 17b71348..37ad3c03 100644 --- a/resources/js/components/automation-rules/automation-rule-form.tsx +++ b/resources/js/components/automation-rules/automation-rule-form.tsx @@ -3,6 +3,7 @@ import { update, } from '@/actions/App/Http/Controllers/Settings/AutomationRuleController'; import { RuleBuilder } from '@/components/automation-rules/rule-builder'; +import InputError from '@/components/input-error'; import { CategoryCombobox } from '@/components/shared/category-combobox'; import { LabelCombobox } from '@/components/shared/label-combobox'; import { Button } from '@/components/ui/button'; @@ -170,9 +171,7 @@ export function AutomationRuleForm({ required /> - {errors.title && ( -

{errors.title}

- )} + - {actionError && ( -

{actionError}

- )} +
diff --git a/resources/js/components/automation-rules/rule-builder.tsx b/resources/js/components/automation-rules/rule-builder.tsx index d630bcef..38cf861d 100644 --- a/resources/js/components/automation-rules/rule-builder.tsx +++ b/resources/js/components/automation-rules/rule-builder.tsx @@ -1,3 +1,4 @@ +import InputError from '@/components/input-error'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Card } from '@/components/ui/card'; @@ -225,7 +226,7 @@ export function RuleBuilder({ value, onChange, error }: RuleBuilderProps) { {__('Add Group')} - {error &&

{error}

} +
); } diff --git a/resources/js/components/categories/create-category-dialog.tsx b/resources/js/components/categories/create-category-dialog.tsx index d052f953..92468d7d 100644 --- a/resources/js/components/categories/create-category-dialog.tsx +++ b/resources/js/components/categories/create-category-dialog.tsx @@ -1,5 +1,6 @@ import { store } from '@/actions/App/Http/Controllers/Settings/CategoryController'; import { CategoryCashflowDirectionFields } from '@/components/categories/category-cashflow-direction-fields'; +import InputError from '@/components/input-error'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { CreateButton } from '@/components/ui/create-button'; @@ -74,11 +75,7 @@ export function CreateCategoryDialog({ required /> - {errors.name && ( -

- {errors.name} -

- )} +
@@ -108,11 +105,7 @@ export function CreateCategoryDialog({ })} - {errors.icon && ( -

- {errors.icon} -

- )} +
@@ -144,11 +137,7 @@ export function CreateCategoryDialog({ })} - {errors.color && ( -

- {errors.color} -

- )} +
@@ -173,11 +162,7 @@ export function CreateCategoryDialog({ ))} - {errors.type && ( -

- {errors.type} -

- )} +
- {errors.name && ( -

- {errors.name} -

- )} +
@@ -116,11 +113,7 @@ export function EditCategoryDialog({ })} - {errors.icon && ( -

- {errors.icon} -

- )} +
@@ -156,11 +149,7 @@ export function EditCategoryDialog({ })} - {errors.color && ( -

- {errors.color} -

- )} +
@@ -186,11 +175,7 @@ export function EditCategoryDialog({ ))} - {errors.type && ( -

- {errors.type} -

- )} +
void }) { required /> - {errors.name && ( -

- {errors.name} -

- )} +
@@ -94,11 +91,7 @@ export function CreateLabelDialog({ onSuccess }: { onSuccess?: () => void }) { })} - {errors.color && ( -

- {errors.color} -

- )} +
diff --git a/resources/js/components/labels/edit-label-dialog.tsx b/resources/js/components/labels/edit-label-dialog.tsx index 5984d633..da18cb43 100644 --- a/resources/js/components/labels/edit-label-dialog.tsx +++ b/resources/js/components/labels/edit-label-dialog.tsx @@ -1,4 +1,5 @@ import { update } from '@/actions/App/Http/Controllers/Settings/LabelController'; +import InputError from '@/components/input-error'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { @@ -67,11 +68,7 @@ export function EditLabelDialog({ required /> - {errors.name && ( -

- {errors.name} -

- )} +
@@ -107,11 +104,7 @@ export function EditLabelDialog({ })} - {errors.color && ( -

- {errors.color} -

- )} +