From d8aaea33e6236a6e45e4df4a80e5d1482ad9ee1a Mon Sep 17 00:00:00 2001 From: lorentz Date: Sat, 18 Jul 2026 10:10:10 +0000 Subject: [PATCH] refactor(sync): export designation-matching helpers for reuse --- ondeck/src/lib/sync/auto-generate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ondeck/src/lib/sync/auto-generate.ts b/ondeck/src/lib/sync/auto-generate.ts index c6f5bc8..1c07a8a 100644 --- a/ondeck/src/lib/sync/auto-generate.ts +++ b/ondeck/src/lib/sync/auto-generate.ts @@ -5,7 +5,7 @@ import { isRelevantDueDate } from './task-due-date' const DAY_MS = 24 * 60 * 60 * 1000 /** Designation IDs (primary + secondary) of a client, with nulls dropped. */ -function designationIdsOf(entity: { +export function designationIdsOf(entity: { designationId: string | null designation2Id: string | null }): string[] { @@ -16,7 +16,7 @@ function designationIdsOf(entity: { * Prisma `OR` clause matching templates that apply to a client: templates with * no designation, plus templates scoped to one of the client's designations. */ -function designationFilter(ids: string[]) { +export function designationFilter(ids: string[]) { return [ { designationId: null }, ...(ids.length > 0 ? [{ designationId: { in: ids } }] : []),