feat: add configurable timeline range

This commit is contained in:
2026-08-14 15:40:54 +02:00
parent b284275e98
commit 45c7c6a292
15 changed files with 121 additions and 14 deletions
+7
View File
@@ -10,6 +10,7 @@ function mapped(ids: IdMap, sourceId: string, label: string) {
}
export async function clearBoard(client: PoolClient, boardId: string) {
await client.query('DELETE FROM osint.board_timeline_settings WHERE board_id=$1', [boardId])
await client.query('DELETE FROM osint.brief_concepts WHERE board_id=$1', [boardId])
await client.query('DELETE FROM osint.level_briefs WHERE board_id=$1', [boardId])
await client.query('DELETE FROM osint.metadata_fields WHERE board_id=$1', [boardId])
@@ -23,6 +24,12 @@ export async function cloneBoard(client: PoolClient, sourceBoardId: string, targ
const regionIds: IdMap = new Map()
const fieldIds: IdMap = new Map()
const timeline = await client.query<{ range_start: string; range_end: string }>(
'SELECT range_start::text,range_end::text FROM osint.board_timeline_settings WHERE board_id=$1', [sourceBoardId])
if (timeline.rows[0]) await client.query(
'INSERT INTO osint.board_timeline_settings (board_id,range_start,range_end) VALUES ($1,$2,$3)',
[targetBoardId, timeline.rows[0].range_start, timeline.rows[0].range_end])
const exhibits = await client.query<{
id: string; exhibit_type_id: string; xpos: number; ypos: number; width: number; height: number
rotation: number; z_index: number; hidden: boolean