Files
Nexus/packages/api/src/router/timeline-project-read.ts
T
Hartmut b41c1d2501
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)
rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)

Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
2026-05-21 16:28:40 +02:00

40 lines
1.4 KiB
TypeScript

import { ShiftProjectSchema } from "@nexus/shared";
import { controllerProcedure } from "../trpc.js";
import {
TimelineProjectContextDetailSchema,
TimelineProjectIdSchema,
} from "./timeline-read-schema-support.js";
import {
readTimelineProjectContextDetailResponse,
readTimelineProjectContextResponse,
} from "./timeline-project-context-procedure-support.js";
import {
readTimelineProjectBudgetStatusResponse,
readTimelineProjectShiftPreview,
readTimelineProjectShiftPreviewDetail,
} from "./timeline-project-procedure-support.js";
export const timelineProjectReadProcedures = {
getProjectContext: controllerProcedure
.input(TimelineProjectIdSchema)
.query(async ({ ctx, input }) => readTimelineProjectContextResponse(ctx.db, input.projectId)),
getProjectContextDetail: controllerProcedure
.input(TimelineProjectContextDetailSchema)
.query(async ({ ctx, input }) => readTimelineProjectContextDetailResponse(ctx.db, input)),
previewShift: controllerProcedure
.input(ShiftProjectSchema)
.query(async ({ ctx, input }) => readTimelineProjectShiftPreview(ctx.db, input)),
getShiftPreviewDetail: controllerProcedure
.input(ShiftProjectSchema)
.query(async ({ ctx, input }) => readTimelineProjectShiftPreviewDetail(ctx.db, input)),
getBudgetStatus: controllerProcedure
.input(TimelineProjectIdSchema)
.query(async ({ ctx, input }) =>
readTimelineProjectBudgetStatusResponse(ctx.db, input.projectId),
),
};