feat(platform): checkpoint current implementation state

This commit is contained in:
2026-04-01 07:42:03 +02:00
parent 3e53471f05
commit 8c5be51251
125 changed files with 10269 additions and 17808 deletions
@@ -3,14 +3,18 @@ import { PermissionKey } from "@capakraken/shared";
import { managerProcedure, requirePermission } from "../trpc.js";
import {
UpdateAllocationHoursSchema,
timelineCarveAllocationRangeInputSchema,
timelineBatchQuickAssignInputSchema,
timelineBatchShiftAllocationsInputSchema,
timelineExtractAllocationFragmentInputSchema,
timelineQuickAssignInputSchema,
} from "./timeline-allocation-mutation-schema-support.js";
import {
applyTimelineAllocationBatchShiftMutation,
carveTimelineAllocationRangeMutation,
createTimelineBatchQuickAssignMutation,
createTimelineQuickAssignMutation,
extractTimelineAllocationFragmentMutation,
updateTimelineAllocationInlineMutation,
} from "./timeline-allocation-router-support.js";
@@ -50,4 +54,28 @@ export const timelineAllocationMutationProcedures = {
requirePermission(ctx, PermissionKey.MANAGE_ALLOCATIONS);
return applyTimelineAllocationBatchShiftMutation(ctx.db as PrismaClient, input);
}),
carveAllocationRange: managerProcedure
.input(timelineCarveAllocationRangeInputSchema)
.mutation(async ({ ctx, input }) => {
requirePermission(ctx, PermissionKey.MANAGE_ALLOCATIONS);
return carveTimelineAllocationRangeMutation({
db: ctx.db as PrismaClient,
allocationId: input.allocationId,
startDate: input.startDate,
endDate: input.endDate,
});
}),
extractAllocationFragment: managerProcedure
.input(timelineExtractAllocationFragmentInputSchema)
.mutation(async ({ ctx, input }) => {
requirePermission(ctx, PermissionKey.MANAGE_ALLOCATIONS);
return extractTimelineAllocationFragmentMutation({
db: ctx.db as PrismaClient,
allocationId: input.allocationId,
startDate: input.startDate,
endDate: input.endDate,
});
}),
};