feat(router-phase25): Mount /holidays + /role-permissions Routes [tsc:fail]
This commit is contained in:
parent
dc41a7463c
commit
923700986f
@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "api-client-phase25",
|
"current_feature": "router-phase25",
|
||||||
"started_at": "2026-05-23T08:41:41.344530",
|
"started_at": "2026-05-23T08:41:41.344530",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"working-hours-config",
|
"working-hours-config",
|
||||||
"default-project-per-customer",
|
"default-project-per-customer",
|
||||||
"holiday-calendar",
|
"holiday-calendar",
|
||||||
"role-permissions-page"
|
"role-permissions-page",
|
||||||
|
"api-client-phase25"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -2974,3 +2974,23 @@ 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.
|
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>'.
|
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>,
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
- `08:47:18` **INFO** Committed feature api-client-phase25
|
||||||
|
- `08:47:18` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: router-phase25 (2026-05-23 08:47:18)
|
||||||
|
|
||||||
|
- `08:47:18` **INFO** Description: Mount /holidays + /role-permissions Routes
|
||||||
|
- `08:47:18` **INFO** Generating apps/api/src/routes/index.ts (ERWEITERT — füge holidayRoutes ('/api/holidays'). Behalte alles.…)
|
||||||
|
- `08:47:36` **INFO** wrote 2277 chars in 18.0s (attempt 1)
|
||||||
|
- `08:47:36` **INFO** Generating apps/web/src/App.tsx (ERWEITERT — füge /holidays (admin) + /role-permissions (admin) Routes.…)
|
||||||
|
- `08:48:38` **INFO** wrote 7638 chars in 62.0s (attempt 1)
|
||||||
|
- `08:48:38` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `08:48:40` **WARN** tsc errors:
|
||||||
|
src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(43,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
src/db/schema.ts(47,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(51,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
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>,
|
||||||
|
|||||||
@ -105,3 +105,10 @@ export const holidays = pgTable("holidays", {
|
|||||||
name: text("name").notNull(),
|
name: text("name").notNull(),
|
||||||
createdAt: timestamp("created_at").notNull().defaultNow()
|
createdAt: timestamp("created_at").notNull().defaultNow()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const apiKeys = pgTable("api_keys", {id:uuid("id").primaryKey().defaultRandom(),userId:uuid("user_id").notNull().references(()=>users.id,{onDelete:"cascade"}),name:text("name").notNull(),keyHash:text("key_hash").notNull(),createdAt:timestamp("created_at").notNull().defaultNow(),lastUsedAt:timestamp("last_used_at"),revokedAt:timestamp("revoked_at"),})
|
||||||
|
export const savedViews = pgTable("saved_views", {id:uuid("id").primaryKey().defaultRandom(),userId:uuid("user_id").notNull().references(()=>users.id,{onDelete:"cascade"}),name:text("name").notNull(),entityType:text("entity_type").notNull(),filters:text("filters").notNull(),createdAt:timestamp("created_at").notNull().defaultNow(),})
|
||||||
|
export const webhooks = pgTable("webhooks", {id:uuid("id").primaryKey().defaultRandom(),url:text("url").notNull(),event:text("event").notNull(),active:boolean("active").notNull().default(true),createdAt:timestamp("created_at").notNull().defaultNow(),createdBy:uuid("created_by").references(()=>users.id,{onDelete:"set null"}),})
|
||||||
|
export const auditLog = pgTable("audit_log", {id:uuid("id").primaryKey().defaultRandom(),userId:uuid("user_id").references(()=>users.id,{onDelete:"set null"}),action:text("action").notNull(),resourceType:text("resource_type"),resourceId:text("resource_id"),metadata:text("metadata"),createdAt:timestamp("created_at").notNull().defaultNow(),})
|
||||||
|
export const appSettings = pgTable("app_settings", {id:uuid("id").primaryKey().defaultRandom(),workspaceName:text("workspace_name").notNull().default("EmberClone"),defaultBillable:boolean("default_billable").notNull().default(true),weekStart:integer("week_start").notNull().default(1),roundingMinutes:integer("rounding_minutes").notNull().default(0),workingHoursPerDay:integer("working_hours_per_day").notNull().default(8),logoUrl:text("logo_url"),updatedAt:timestamp("updated_at").notNull().defaultNow(),})
|
||||||
|
export const documents = pgTable("documents", {id:uuid("id").primaryKey().defaultRandom(),userId:uuid("user_id").notNull().references(()=>users.id,{onDelete:"cascade"}),filename:text("filename").notNull(),contentType:text("content_type").notNull(),sizeBytes:integer("size_bytes").notNull(),content:text("content").notNull(),createdAt:timestamp("created_at").notNull().defaultNow(),})
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import savedViewRoutes from "./saved-views"
|
|||||||
import notificationRoutes from "./notifications"
|
import notificationRoutes from "./notifications"
|
||||||
import apiKeyRoutes from "./api-keys"
|
import apiKeyRoutes from "./api-keys"
|
||||||
import invitationRoutes from "./invitations"
|
import invitationRoutes from "./invitations"
|
||||||
|
import holidayRoutes from "./holidays"
|
||||||
|
|
||||||
export async function setupRoutes(server: FastifyInstance) {
|
export async function setupRoutes(server: FastifyInstance) {
|
||||||
server.register(authRoutes, { prefix: "/api/auth" })
|
server.register(authRoutes, { prefix: "/api/auth" })
|
||||||
@ -39,4 +40,5 @@ export async function setupRoutes(server: FastifyInstance) {
|
|||||||
server.register(notificationRoutes, { prefix: "/api/notifications" })
|
server.register(notificationRoutes, { prefix: "/api/notifications" })
|
||||||
server.register(apiKeyRoutes, { prefix: "/api/api-keys" })
|
server.register(apiKeyRoutes, { prefix: "/api/api-keys" })
|
||||||
server.register(invitationRoutes, { prefix: "/api/invitations" })
|
server.register(invitationRoutes, { prefix: "/api/invitations" })
|
||||||
|
server.register(holidayRoutes, { prefix: "/api/holidays" })
|
||||||
}
|
}
|
||||||
@ -23,6 +23,8 @@ import TimeEntryTemplates from "./pages/TimeEntryTemplates"
|
|||||||
import Invoices from "./pages/Invoices"
|
import Invoices from "./pages/Invoices"
|
||||||
import ApiKeys from "./pages/ApiKeys"
|
import ApiKeys from "./pages/ApiKeys"
|
||||||
import AcceptInvite from "./pages/AcceptInvite"
|
import AcceptInvite from "./pages/AcceptInvite"
|
||||||
|
import Holidays from "./pages/Holidays"
|
||||||
|
import RolePermissions from "./pages/RolePermissions"
|
||||||
import Nav from "./components/Nav"
|
import Nav from "./components/Nav"
|
||||||
import CommandPalette from "./components/CommandPalette"
|
import CommandPalette from "./components/CommandPalette"
|
||||||
import KeyboardHelp from "./components/KeyboardHelp"
|
import KeyboardHelp from "./components/KeyboardHelp"
|
||||||
@ -182,6 +184,27 @@ const profileRoute = createRoute({
|
|||||||
component: Profile
|
component: Profile
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const adminUsersRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/admin/users",
|
||||||
|
beforeLoad: adminCheck,
|
||||||
|
component: AdminUsers
|
||||||
|
})
|
||||||
|
|
||||||
|
const holidaysRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/admin/holidays",
|
||||||
|
beforeLoad: adminCheck,
|
||||||
|
component: Holidays
|
||||||
|
})
|
||||||
|
|
||||||
|
const rolePermissionsRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/admin/role-permissions",
|
||||||
|
beforeLoad: adminCheck,
|
||||||
|
component: RolePermissions
|
||||||
|
})
|
||||||
|
|
||||||
const settingsRoute = createRoute({
|
const settingsRoute = createRoute({
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRoute,
|
||||||
path: "/settings",
|
path: "/settings",
|
||||||
@ -189,7 +212,28 @@ const settingsRoute = createRoute({
|
|||||||
component: Settings
|
component: Settings
|
||||||
})
|
})
|
||||||
|
|
||||||
const twoFactorRoute = createRoute({
|
const auditLogRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/admin/audit-log",
|
||||||
|
beforeLoad: adminCheck,
|
||||||
|
component: AuditLog
|
||||||
|
})
|
||||||
|
|
||||||
|
const documentsRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/documents",
|
||||||
|
beforeLoad: authCheck,
|
||||||
|
component: Documents
|
||||||
|
})
|
||||||
|
|
||||||
|
const webhooksRoute = createRoute({
|
||||||
|
getParentRoute: () => rootRoute,
|
||||||
|
path: "/admin/webhooks",
|
||||||
|
beforeLoad: adminCheck,
|
||||||
|
component: Webhooks
|
||||||
|
})
|
||||||
|
|
||||||
|
const twoFactorAuthRoute = createRoute({
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRoute,
|
||||||
path: "/settings/2fa",
|
path: "/settings/2fa",
|
||||||
beforeLoad: authCheck,
|
beforeLoad: authCheck,
|
||||||
@ -217,37 +261,9 @@ const invoicesRoute = createRoute({
|
|||||||
component: Invoices
|
component: Invoices
|
||||||
})
|
})
|
||||||
|
|
||||||
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 documentsRoute = createRoute({
|
|
||||||
getParentRoute: () => rootRoute,
|
|
||||||
path: "/documents",
|
|
||||||
beforeLoad: authCheck,
|
|
||||||
component: Documents
|
|
||||||
})
|
|
||||||
|
|
||||||
const webhooksRoute = createRoute({
|
|
||||||
getParentRoute: () => rootRoute,
|
|
||||||
path: "/webhooks",
|
|
||||||
beforeLoad: authCheck,
|
|
||||||
component: Webhooks
|
|
||||||
})
|
|
||||||
|
|
||||||
const apiKeysRoute = createRoute({
|
const apiKeysRoute = createRoute({
|
||||||
getParentRoute: () => rootRoute,
|
getParentRoute: () => rootRoute,
|
||||||
path: "/api-keys",
|
path: "/settings/api-keys",
|
||||||
beforeLoad: authCheck,
|
beforeLoad: authCheck,
|
||||||
component: ApiKeys
|
component: ApiKeys
|
||||||
})
|
})
|
||||||
@ -267,28 +283,21 @@ const routeTree = [
|
|||||||
projectDetailRoute,
|
projectDetailRoute,
|
||||||
projectTemplatesRoute,
|
projectTemplatesRoute,
|
||||||
profileRoute,
|
profileRoute,
|
||||||
settingsRoute,
|
|
||||||
twoFactorRoute,
|
|
||||||
billingRoute,
|
|
||||||
integrationsRoute,
|
|
||||||
invoicesRoute,
|
|
||||||
adminUsersRoute,
|
adminUsersRoute,
|
||||||
|
holidaysRoute,
|
||||||
|
rolePermissionsRoute,
|
||||||
|
settingsRoute,
|
||||||
auditLogRoute,
|
auditLogRoute,
|
||||||
documentsRoute,
|
documentsRoute,
|
||||||
webhooksRoute,
|
webhooksRoute,
|
||||||
|
twoFactorAuthRoute,
|
||||||
|
billingRoute,
|
||||||
|
integrationsRoute,
|
||||||
|
invoicesRoute,
|
||||||
apiKeysRoute
|
apiKeysRoute
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({ routeTree })
|
||||||
routeTree,
|
|
||||||
defaultPreload: 'intent'
|
|
||||||
})
|
|
||||||
|
|
||||||
declare module "@tanstack/react-router" {
|
|
||||||
interface Register {
|
|
||||||
router: typeof router
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user