feat(api,application): add checkConflicts query and soften overbooking block
- New allocation.checkConflicts managerProcedure: returns per-day overbooking breakdown (availableHours, existingHours, requestedHours, overageHours, maxOverbookPercent) plus vacation overlap list for the requested period. Read-only — used by AllocationModal for pre-submission warnings. - createAssignment(): replace the hard >5-day overbooking block with a soft CONFLICT error. When allowOverbooking: true is passed the assignment is created and overbookingAcknowledged is set to true on the record. - allowOverbooking field added to CreateAssignmentBaseSchema (optional) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ export const CreateAssignmentBaseSchema = z.object({
|
||||
status: z.nativeEnum(AllocationStatus).default(AllocationStatus.PROPOSED),
|
||||
metadata: z.record(z.string(), z.unknown()).default({}),
|
||||
/** When true the caller acknowledges the resource will be overbooked. */
|
||||
allowOverbooking: z.boolean().optional().default(false),
|
||||
allowOverbooking: z.boolean().optional(),
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user