/** Design: cell shows Service & Notes layout when note, extras, or Aveta exist. */ export function hasServiceNotesDetails( serviceNotes?: string | null, extraServices?: string[] | null, avetaRequired?: boolean | null, ): boolean { return ( Boolean(serviceNotes?.trim()) || (extraServices?.length ?? 0) > 0 || Boolean(avetaRequired) ); } /** Truncate note for the board cell subtitle (~30 chars, design). */ export function truncateServiceNotesPreview(note: string, max = 30): string { const trimmed = note.trim(); if (trimmed.length <= max) { return trimmed; } return `${trimmed.slice(0, max)}…`; }