feat(router-phase12): App + routes/index für /invoices [tsc:fail]
This commit is contained in:
parent
b829f10a41
commit
d03cb2491b
@ -1,11 +1,12 @@
|
||||
{
|
||||
"completed_features": [],
|
||||
"current_feature": "api-client-phase12",
|
||||
"current_feature": "router-phase12",
|
||||
"started_at": "2026-05-23T06:33:48.406343",
|
||||
"attempted_features": [
|
||||
"invoicing-stub",
|
||||
"time-rounding-rules",
|
||||
"user-avatars",
|
||||
"app-version-display"
|
||||
"app-version-display",
|
||||
"api-client-phase12"
|
||||
]
|
||||
}
|
||||
@ -1533,3 +1533,24 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||
- `06:39:11` **INFO** Committed feature api-client-phase12
|
||||
- `06:39:12` **INFO** Pushed: rc=0
|
||||
|
||||
## Phase-3 Feature: router-phase12 (2026-05-23 06:39:12)
|
||||
|
||||
- `06:39:12` **INFO** Description: App + routes/index für /invoices
|
||||
- `06:39:12` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — füge invoiceRoutes ('/api/invoices').…)
|
||||
- `06:39:23` **INFO** wrote 1446 chars in 11.4s (attempt 1)
|
||||
- `06:39:23` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /invoices Route. Behalte alles.…)
|
||||
- `06:40:11` **INFO** wrote 5744 chars in 47.7s (attempt 1)
|
||||
- `06:40:11` **INFO** Generating apps/web/src/components/Nav.tsx (ERWEITERT — füge Invoices-Link in Nav (alle User). Behalte alles.…)
|
||||
- `06:41:09` **INFO** wrote 6049 chars in 58.4s (attempt 1)
|
||||
- `06:41:09` **INFO** Running tsc --noEmit on api…
|
||||
- `06:41:11` **WARN** tsc errors:
|
||||
src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'.
|
||||
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||
|
||||
@ -11,6 +11,7 @@ import documentsRoutes from "./documents"
|
||||
import searchRoutes from "./search"
|
||||
import webhookRoutes from "./webhooks"
|
||||
import reportsRoutes from "./reports"
|
||||
import invoiceRoutes from "./invoices"
|
||||
|
||||
export async function setupRoutes(server: FastifyInstance) {
|
||||
server.register(authRoutes, { prefix: "/api/auth" })
|
||||
@ -25,4 +26,5 @@ export async function setupRoutes(server: FastifyInstance) {
|
||||
server.register(searchRoutes, { prefix: "/api/search" })
|
||||
server.register(webhookRoutes, { prefix: "/api/webhooks" })
|
||||
server.register(reportsRoutes, { prefix: "/api/reports" })
|
||||
server.register(invoiceRoutes, { prefix: "/api/invoices" })
|
||||
}
|
||||
@ -17,6 +17,7 @@ import TwoFactorAuth from "./pages/TwoFactorAuth"
|
||||
import Billing from "./pages/Billing"
|
||||
import Integrations from "./pages/Integrations"
|
||||
import ProjectTemplates from "./pages/ProjectTemplates"
|
||||
import Invoices from "./pages/Invoices"
|
||||
import Nav from "./components/Nav"
|
||||
import CommandPalette from "./components/CommandPalette"
|
||||
import KeyboardHelp from "./components/KeyboardHelp"
|
||||
@ -133,6 +134,13 @@ const documentsRoute = createRoute({
|
||||
component: Documents
|
||||
})
|
||||
|
||||
const invoicesRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/invoices",
|
||||
beforeLoad: authCheck,
|
||||
component: Invoices
|
||||
})
|
||||
|
||||
const profileRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/profile",
|
||||
@ -161,46 +169,44 @@ const integrationsRoute = createRoute({
|
||||
component: Integrations
|
||||
})
|
||||
|
||||
const adminRoute = createRoute({
|
||||
const settingsRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/admin",
|
||||
beforeLoad: adminCheck,
|
||||
component: () => <Outlet />
|
||||
})
|
||||
|
||||
const adminUsersRoute = createRoute({
|
||||
getParentRoute: () => adminRoute,
|
||||
path: "/users",
|
||||
component: AdminUsers
|
||||
})
|
||||
|
||||
const adminSettingsRoute = createRoute({
|
||||
getParentRoute: () => adminRoute,
|
||||
path: "/settings",
|
||||
beforeLoad: authCheck,
|
||||
component: Settings
|
||||
})
|
||||
|
||||
const adminAuditLogRoute = createRoute({
|
||||
getParentRoute: () => adminRoute,
|
||||
path: "/audit-log",
|
||||
const adminUsersRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/admin/users",
|
||||
beforeLoad: adminCheck,
|
||||
component: AdminUsers
|
||||
})
|
||||
|
||||
const auditLogRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/admin/audit-log",
|
||||
beforeLoad: adminCheck,
|
||||
component: AuditLog
|
||||
})
|
||||
|
||||
const adminWebhooksRoute = createRoute({
|
||||
getParentRoute: () => adminRoute,
|
||||
path: "/webhooks",
|
||||
const webhooksRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/admin/webhooks",
|
||||
beforeLoad: adminCheck,
|
||||
component: Webhooks
|
||||
})
|
||||
|
||||
const adminTemplatesRoute = createRoute({
|
||||
getParentRoute: () => adminRoute,
|
||||
path: "/templates",
|
||||
const projectTemplatesRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/admin/templates",
|
||||
beforeLoad: adminCheck,
|
||||
component: ProjectTemplates
|
||||
})
|
||||
|
||||
const routeTree = rootRoute.addChildren([
|
||||
loginRoute,
|
||||
const routeTree = [
|
||||
indexRoute,
|
||||
loginRoute,
|
||||
timeEntriesRoute,
|
||||
calendarRoute,
|
||||
customersRoute,
|
||||
@ -208,14 +214,22 @@ const routeTree = rootRoute.addChildren([
|
||||
projectsRoute,
|
||||
projectDetailRoute,
|
||||
documentsRoute,
|
||||
invoicesRoute,
|
||||
profileRoute,
|
||||
twoFactorRoute,
|
||||
billingRoute,
|
||||
integrationsRoute,
|
||||
adminRoute
|
||||
])
|
||||
settingsRoute,
|
||||
adminUsersRoute,
|
||||
auditLogRoute,
|
||||
webhooksRoute,
|
||||
projectTemplatesRoute
|
||||
]
|
||||
|
||||
const router = createRouter({ routeTree })
|
||||
const router = createRouter({
|
||||
routeTree,
|
||||
defaultPreload: 'intent'
|
||||
})
|
||||
|
||||
declare module "@tanstack/react-router" {
|
||||
interface Register {
|
||||
|
||||
@ -16,7 +16,8 @@ import {
|
||||
Zap,
|
||||
CreditCard,
|
||||
Languages,
|
||||
LogOut
|
||||
LogOut,
|
||||
FileText
|
||||
} from "lucide-react"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { api } from "../lib/api"
|
||||
@ -40,6 +41,7 @@ export default function Nav() {
|
||||
{ label: "Calendar", to: "/calendar", icon: Calendar },
|
||||
{ label: "Customers", to: "/customers", icon: Users },
|
||||
{ label: "Projects", to: "/projects", icon: FolderKanban },
|
||||
{ label: "Invoices", to: "/invoices", icon: FileText },
|
||||
{ label: "Integrations", to: "/integrations", icon: Zap },
|
||||
{ label: "Billing", to: "/billing", icon: CreditCard },
|
||||
]
|
||||
@ -110,34 +112,25 @@ export default function Nav() {
|
||||
<div className="flex items-center gap-1 p-1 rounded-full bg-gray-100 dark:bg-slate-800 border border-gray-200 dark:border-slate-700">
|
||||
<button
|
||||
onClick={() => setLang('en')}
|
||||
className={`px-2 py-1 text-[10px] font-bold rounded-full transition-colors ${lang === 'en' ? 'bg-white dark:bg-slate-700 text-indigo-600 dark:text-indigo-400 shadow-sm' : 'text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-300'}`}
|
||||
className={`px-2 py-1 rounded-full text-[10px] font-bold transition-colors ${lang === 'en' ? 'bg-white dark:bg-slate-700 text-indigo-600 dark:text-indigo-400 shadow-sm' : 'text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-300'}`}
|
||||
>
|
||||
EN
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setLang('de')}
|
||||
className={`px-2 py-1 text-[10px] font-bold rounded-full transition-colors ${lang === 'de' ? 'bg-white dark:bg-slate-700 text-indigo-600 dark:text-indigo-400 shadow-sm' : 'text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-300'}`}
|
||||
className={`px-2 py-1 rounded-full text-[10px] font-bold transition-colors ${lang === 'de' ? 'bg-white dark:bg-slate-700 text-indigo-600 dark:text-indigo-400 shadow-sm' : 'text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-300'}`}
|
||||
>
|
||||
DE
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3 pl-3 border-l border-gray-200 dark:border-slate-800">
|
||||
{user && (
|
||||
<Avatar name={user.name} size="sm" />
|
||||
)}
|
||||
<button
|
||||
onClick={() => api.logout()}
|
||||
className="p-2 text-gray-500 hover:text-red-600 dark:text-slate-400 dark:hover:text-red-400 transition-colors"
|
||||
title="Logout"
|
||||
>
|
||||
<LogOut className="w-5 h-5" />
|
||||
</button>
|
||||
</div>
|
||||
<div className="h-6 w-px bg-gray-200 dark:bg-slate-700 mx-1" />
|
||||
|
||||
<Avatar user={user} />
|
||||
|
||||
<button
|
||||
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
|
||||
className="md:hidden p-2 rounded-md text-gray-500 hover:bg-gray-100 dark:text-slate-400 dark:hover:bg-slate-800"
|
||||
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
|
||||
>
|
||||
{isMobileMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
|
||||
</button>
|
||||
@ -147,10 +140,16 @@ export default function Nav() {
|
||||
|
||||
{/* Mobile Menu */}
|
||||
{isMobileMenuOpen && (
|
||||
<div className="md:hidden bg-white dark:bg-slate-900 border-b border-gray-200 dark:border-slate-800 px-4 py-4 space-y-1">
|
||||
<div className="md:hidden border-t border-gray-200 dark:border-slate-800 bg-white dark:bg-slate-900 px-4 py-4 space-y-1">
|
||||
{allItems.map((item) => (
|
||||
<NavLink key={item.to} item={item} />
|
||||
))}
|
||||
<div className="pt-4 mt-4 border-t border-gray-200 dark:border-slate-800">
|
||||
<button className="flex items-center gap-2 w-full px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20 rounded-md transition-colors">
|
||||
<LogOut className="w-4 h-4" />
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</nav>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user