feat: add icon support to category creation and editing, enhance transaction rule creation with new dialog and filters

This commit is contained in:
Julien Froidefond
2025-11-29 17:42:11 +01:00
parent 0ce50d1477
commit 0fb3222ba2
8 changed files with 820 additions and 38 deletions

View File

@@ -29,6 +29,7 @@ export default function CategoriesPage() {
const [formData, setFormData] = useState({
name: "",
color: "#22c55e",
icon: "tag",
keywords: [] as string[],
parentId: null as string | null,
});
@@ -132,7 +133,7 @@ export default function CategoriesPage() {
const handleNewCategory = (parentId: string | null = null) => {
setEditingCategory(null);
setFormData({ name: "", color: "#22c55e", keywords: [], parentId });
setFormData({ name: "", color: "#22c55e", icon: "tag", keywords: [], parentId });
setIsDialogOpen(true);
};
@@ -141,6 +142,7 @@ export default function CategoriesPage() {
setFormData({
name: category.name,
color: category.color,
icon: category.icon,
keywords: [...category.keywords],
parentId: category.parentId,
});
@@ -154,6 +156,7 @@ export default function CategoriesPage() {
...editingCategory,
name: formData.name,
color: formData.color,
icon: formData.icon,
keywords: formData.keywords,
parentId: formData.parentId,
});
@@ -161,8 +164,8 @@ export default function CategoriesPage() {
await addCategory({
name: formData.name,
color: formData.color,
icon: formData.icon,
keywords: formData.keywords,
icon: "tag",
parentId: formData.parentId,
});
}