refactor: move default categories and root folder to a separate module for better organization and reuse
This commit is contained in:
69
lib/defaults.ts
Normal file
69
lib/defaults.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import type { Category, Folder } from "./types"
|
||||
|
||||
export const defaultCategories: Omit<Category, "id">[] = [
|
||||
{
|
||||
name: "Alimentation",
|
||||
color: "#22c55e",
|
||||
icon: "shopping-cart",
|
||||
keywords: ["carrefour", "leclerc", "auchan", "lidl", "supermarche", "boulangerie", "restaurant"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Transport",
|
||||
color: "#3b82f6",
|
||||
icon: "car",
|
||||
keywords: ["sncf", "ratp", "uber", "essence", "total", "parking", "peage"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Logement",
|
||||
color: "#f59e0b",
|
||||
icon: "home",
|
||||
keywords: ["loyer", "edf", "engie", "eau", "assurance habitation"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Loisirs",
|
||||
color: "#ec4899",
|
||||
icon: "gamepad",
|
||||
keywords: ["cinema", "netflix", "spotify", "fnac", "amazon"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Santé",
|
||||
color: "#ef4444",
|
||||
icon: "heart",
|
||||
keywords: ["pharmacie", "medecin", "docteur", "hopital", "mutuelle"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Revenus",
|
||||
color: "#10b981",
|
||||
icon: "wallet",
|
||||
keywords: ["salaire", "virement recu", "remboursement"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Abonnements",
|
||||
color: "#8b5cf6",
|
||||
icon: "repeat",
|
||||
keywords: ["free", "orange", "sfr", "bouygues", "internet", "telephone"],
|
||||
parentId: null,
|
||||
},
|
||||
{
|
||||
name: "Shopping",
|
||||
color: "#06b6d4",
|
||||
icon: "bag",
|
||||
keywords: ["zara", "h&m", "decathlon", "ikea"],
|
||||
parentId: null,
|
||||
},
|
||||
]
|
||||
|
||||
export const defaultRootFolder: Folder = {
|
||||
id: "folder-root",
|
||||
name: "Mes Comptes",
|
||||
parentId: null,
|
||||
color: "#6366f1",
|
||||
icon: "folder",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user