recent changes

This commit is contained in:
Marcelo
2026-04-29 05:05:00 +00:00
parent 7e0fe5c2e1
commit 62169b163c
25 changed files with 6698 additions and 1013 deletions

View File

@@ -468,7 +468,7 @@ async function resolveCurrentShiftRange(params: { orgId: string; now: Date }) {
}
async function resolveDetailRange(params: { orgId: string; input: DetailRangeInput }) {
const now = new Date();
const now = new Date(Math.floor(Date.now() / 60000) * 60000);
const requestedMode = normalizedRangeMode(params.input.mode);
const shiftEnabledCount = await prisma.orgShift.count({
where: {

View File

@@ -55,7 +55,8 @@ function parseMaxSegments(searchParams: URLSearchParams) {
}
export function parseRecapTimelineRange(searchParams: URLSearchParams) {
const end = parseDateInput(searchParams.get("end")) ?? new Date();
const defaultEnd = new Date(Math.floor(Date.now() / 60000) * 60000);
const end = parseDateInput(searchParams.get("end")) ?? defaultEnd;
const startParam = parseDateInput(searchParams.get("start"));
if (startParam && startParam < end) {
return {