diff --git a/src/components/engagement_edit_modals/engagement_summary_edit_modal.tsx b/src/components/engagement_edit_modals/engagement_summary_edit_modal.tsx index 58d47eca5..6554c1e32 100644 --- a/src/components/engagement_edit_modals/engagement_summary_edit_modal.tsx +++ b/src/components/engagement_edit_modals/engagement_summary_edit_modal.tsx @@ -7,10 +7,11 @@ import { useEngagements } from '../../context/engagement_context/engagement_hook import { DescriptionFormField } from '../engagement_form_fields/description'; import { LocationFormField } from '../engagement_form_fields/location'; import { EngagementStartEndDateFormField } from '../engagement_form_fields/engagement_start_end_date'; +import { EngagementFormConfig } from '../../schemas/engagement_config'; export interface EngagementSummaryEditModalProps { onChange: (fieldName: string, value: any) => void; - formOptions: object; + formOptions: EngagementFormConfig; engagement: Engagement; isOpen: boolean; onSave: (engagement: Engagement) => void; @@ -50,6 +51,7 @@ export function EngagementSummaryEditModal( /> diff --git a/src/serializers/engagement/engagement_json_serializer.ts b/src/serializers/engagement/engagement_json_serializer.ts index e0bd635a4..4f48dfe75 100644 --- a/src/serializers/engagement/engagement_json_serializer.ts +++ b/src/serializers/engagement/engagement_json_serializer.ts @@ -47,7 +47,9 @@ export class EngagementJsonSerializer } deserialize(data: object): Engagement { return { - archive_date: data['archive_date'], + archive_date: data['archive_date'] + ? EngagementJsonSerializer.parseDate(data['archive_date']) + : undefined, commits: (data['commits'] as any[]) ?.filter(d => !(d['author_email'] === 'bot@bot.com')) ?.map(d => EngagementJsonSerializer.gitCommitSerializer.deserialize(d)),