mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 12:11:13 -05:00
Fix date display and edit form issues
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Building, MapPin, Calendar, Globe, ExternalLink, AlertCircle } from 'lucide-react';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Separator } from '@/components/ui/separator';
|
||||
import { FlexibleDateDisplay } from '@/components/ui/flexible-date-display';
|
||||
import type { DatePrecision } from '@/components/ui/flexible-date-input';
|
||||
import type { CompanySubmissionData } from '@/types/submission-data';
|
||||
|
||||
interface RichCompanyDisplayProps {
|
||||
@@ -63,12 +65,11 @@ export function RichCompanyDisplay({ data, actionType, showAllFields = true }: R
|
||||
</div>
|
||||
<div className="text-sm ml-6">
|
||||
{data.founded_date ? (
|
||||
<>
|
||||
<span className="font-medium">{new Date(data.founded_date).toLocaleDateString()}</span>
|
||||
{data.founded_date_precision && data.founded_date_precision !== 'day' && (
|
||||
<span className="text-xs text-muted-foreground ml-1">({data.founded_date_precision})</span>
|
||||
)}
|
||||
</>
|
||||
<FlexibleDateDisplay
|
||||
date={data.founded_date}
|
||||
precision={(data.founded_date_precision as DatePrecision) || 'day'}
|
||||
className="font-medium"
|
||||
/>
|
||||
) : (
|
||||
<span className="font-medium">{data.founded_year}</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user