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) Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com> Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
40 lines
1.4 KiB
TypeScript
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),
|
|
),
|
|
};
|