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 } }] : []),