.
This commit is contained in:
parent
463bd4c647
commit
982e0cc89c
16 changed files with 466 additions and 51 deletions
|
|
@ -326,7 +326,7 @@ function PropertyCard({ property }: { property: Property }) {
|
|||
}
|
||||
|
||||
type TimelineEvent =
|
||||
| { kind: 'sale'; year: number; month: number; price: number; sortKey: number }
|
||||
| { kind: 'sale'; year: number; month: number; price: number; isNew: boolean; sortKey: number }
|
||||
| { kind: 'reno'; year: number; event: string; sortKey: number }
|
||||
| { kind: 'tenure'; year: number; status: string; sortKey: number }
|
||||
| { kind: 'built'; year: number; approximate: boolean; sortKey: number };
|
||||
|
|
@ -344,6 +344,7 @@ export function buildTimelineEvents(property: Property): TimelineEvent[] {
|
|||
year: sale.year,
|
||||
month: sale.month,
|
||||
price: sale.price,
|
||||
isNew: sale.is_new,
|
||||
sortKey: sale.year + (Math.max(sale.month, 1) - 1) / 12,
|
||||
});
|
||||
}
|
||||
|
|
@ -425,6 +426,11 @@ function PropertyTimeline({ property }: { property: Property }) {
|
|||
<span className="font-semibold text-teal-700 dark:text-teal-400">
|
||||
£{formatNumber(event.price)}
|
||||
</span>
|
||||
{event.isNew && (
|
||||
<span className="ml-1.5 inline-block rounded px-1 py-0.5 text-[10px] font-medium uppercase tracking-wide bg-teal-50 text-teal-700 dark:bg-teal-900/40 dark:text-teal-300">
|
||||
{t('propertyCard.historyNewBuild')}
|
||||
</span>
|
||||
)}
|
||||
<span className="ml-1.5 text-xs text-warm-500 dark:text-warm-400">
|
||||
{formatYearMonth(event.year, event.month)}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue