Implement Scene 7 evidence goal flow
This commit is contained in:
+3
-1
@@ -205,6 +205,7 @@ type LegacyCaseState = {
|
||||
subtitle: string
|
||||
viewport: Viewport
|
||||
brief?: CaseState['brief']
|
||||
goals?: CaseState['goals']
|
||||
updatedAt?: string
|
||||
levelStatus?: string
|
||||
sourceTemplateVersionId?: string
|
||||
@@ -238,6 +239,7 @@ export function normalizeCase(input: CaseState | LegacyCaseState): CaseState {
|
||||
return { id: state.id, title: state.title, subtitle: state.subtitle, viewport: state.viewport,
|
||||
relations: (state.relations || []) as unknown as ExhibitRelation[], connections: (state.connections || []) as unknown as Connection[],
|
||||
revision: Number(state.revision || 0), brief: state.brief || { body: '', concepts: [] },
|
||||
goals: state.goals || [],
|
||||
views: Array.isArray(state.views) && state.views.length ? state.views : [defaultTimelineView(state.timelineRange)],
|
||||
exhibits: state.exhibits.map((exhibit, index) => ({ ...exhibit, ...placement(exhibit as unknown as Record<string, unknown>, { width: exhibit.type === 'document' ? 174 : 240, height: exhibit.type === 'document' ? 145 : 160 }, index) })),
|
||||
updatedAt: state.updatedAt, levelStatus: state.levelStatus, sourceTemplateVersionId: state.sourceTemplateVersionId, editingAllowed: state.editingAllowed,
|
||||
@@ -278,7 +280,7 @@ export function normalizeCase(input: CaseState | LegacyCaseState): CaseState {
|
||||
const connections: Connection[] = (state.connections || []).map(connection => ({ ...connection, id: String(connection.id),
|
||||
fromExhibitId: String(connection.fromExhibitId || connection.fromEvidenceId), toExhibitId: String(connection.toExhibitId || connection.toEvidenceId) } as Connection))
|
||||
return { id: state.id, title: state.title, subtitle: state.subtitle, exhibits: [...documents, ...evidence], relations: derivedRelations, connections,
|
||||
views: [defaultTimelineView(state.timelineRange)], viewport: state.viewport, brief: state.brief || { body: '', concepts: [] }, revision: Number(state.revision || 0),
|
||||
views: [defaultTimelineView(state.timelineRange)], viewport: state.viewport, brief: state.brief || { body: '', concepts: [] }, goals: state.goals || [], revision: Number(state.revision || 0),
|
||||
updatedAt: state.updatedAt, levelStatus: state.levelStatus, sourceTemplateVersionId: state.sourceTemplateVersionId, editingAllowed: state.editingAllowed,
|
||||
newlyVisibleDocumentIds: state.newlyVisibleDocumentIds || [] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user