Files
AnnasRechnungsManager/app/routes.ts
T
hwinkel 9e7c85c2b3 feat: add Einnahmen Kategorien management page with CRUD functionality
- Implemented a new route for managing Einnahmen Kategorien.
- Added auto-seeding of default Einnahmen Kategorien if none exist.
- Integrated category usage tracking to prevent deletion of in-use categories.
- Enhanced Einnahmen page to link to the new Kategorien management.
- Updated Prisma schema and seed script to include default categories.
- Added a modal for detailed view of Einnahmen by category and month.
- Refactored existing Einnahmen page to accommodate new category structure.
- Introduced PostCSS configuration for Tailwind CSS support.
- Created a new migration to update existing category labels in the database.
- Added TypeScript configuration for stricter type checking.
- Set up Vite configuration for improved development experience with React Router.
2026-03-24 22:43:09 +01:00

66 lines
3.5 KiB
TypeScript

import { type RouteConfig, index, route, layout } from "@react-router/dev/routes";
export default [
route("login", "routes/login.tsx"),
route("logout", "routes/logout.ts"),
layout("routes/dashboard-layout.tsx", [
index("routes/home.tsx"),
route("companies", "routes/companies.tsx"),
route("companies/new", "routes/companies.new.tsx"),
route("companies/:id", "routes/companies.$id.tsx"),
route("companies/:id/edit", "routes/companies.$id.edit.tsx"),
route("companies/:id/customers", "routes/companies.$id.customers.tsx"),
route("companies/:id/leistungen", "routes/companies.$id.leistungen.tsx"),
route("companies/:id/invoices", "routes/companies.$id.invoices.tsx"),
route("companies/:id/invoices/new", "routes/companies.$id.invoices.new.tsx"),
route("companies/:id/invoices/:invoiceId", "routes/companies.$id.invoices.$invoiceId.tsx"),
route("companies/:id/invoices/:invoiceId/edit", "routes/companies.$id.invoices.$invoiceId.edit.tsx"),
route("companies/:id/reports", "routes/companies.$id.reports.tsx"),
route("companies/:id/bilanzen", "routes/companies.$id.bilanzen.tsx"),
route("companies/:id/ausgaben", "routes/companies.$id.ausgaben.tsx"),
route("companies/:id/ausgaben/kategorien", "routes/companies.$id.ausgaben.kategorien.tsx"),
route("companies/:id/einnahmen", "routes/companies.$id.einnahmen.tsx"),
route("companies/:id/einnahmen/kategorien", "routes/companies.$id.einnahmen.kategorien.tsx"),
route("companies/:id/anlagevermoegen", "routes/companies.$id.anlagevermoegen.tsx"),
route("companies/:id/money", "routes/companies.$id.money.tsx"),
route("archiv", "routes/archiv.tsx"),
route("settings/password", "routes/settings.password.tsx"),
]),
// Admin routes
layout("routes/admin-layout.tsx", [
route("admin/mandanten", "routes/admin.mandanten.tsx"),
route("admin/users", "routes/admin.users.tsx"),
route("admin/users/new", "routes/admin.users.new.tsx"),
route("admin/users/:id", "routes/admin.users.$id.tsx"),
route("admin/logs", "routes/admin.logs.tsx"),
]),
// API resource routes
route("api/companies", "routes/api.companies.ts"),
route("api/companies/:id", "routes/api.companies.$id.ts"),
route("api/companies/:id/customers", "routes/api.companies.$id.customers.ts"),
route("api/companies/:id/invoices", "routes/api.companies.$id.invoices.ts"),
route("api/companies/:id/money", "routes/api.companies.$id.money.ts"),
route("api/customers", "routes/api.customers.ts"),
route("api/customers/:id", "routes/api.customers.$id.ts"),
route("api/services", "routes/api.services.ts"),
route("api/services/:id", "routes/api.services.$id.ts"),
route("api/invoices", "routes/api.invoices.ts"),
route("api/invoices/:id", "routes/api.invoices.$id.ts"),
route("api/invoices/:id/pdf", "routes/api.invoices.$id.pdf.ts"),
route("api/invoices/:id/xml", "routes/api.invoices.$id.xml.ts"),
route("api/reports", "routes/api.reports.ts"),
route("api/bilanzen", "routes/api.bilanzen.ts"),
route("api/ausgaben", "routes/api.ausgaben.ts"),
route("api/ausgaben/:id", "routes/api.ausgaben.$id.ts"),
route("api/einnahmen", "routes/api.einnahmen.ts"),
route("api/einnahmen/:id", "routes/api.einnahmen.$id.ts"),
route("api/companies/:id/buchungkategorien", "routes/api.companies.$id.buchungkategorien.ts"),
route("api/companies/:id/buchungkategorien/:katId", "routes/api.companies.$id.buchungkategorien.$katId.ts"),
route("api/anlagevermoegen", "routes/api.anlagevermoegen.ts"),
route("api/anlagevermoegen/:id", "routes/api.anlagevermoegen.$id.ts"),
] satisfies RouteConfig;