feat: Mietvertrag-Mock für 50 % der Objekte (URL + Bezeichnung)

Jedes zweite Objekt bekommt per Post-Processing-Loop eine
leaseContractUrl (docs.wincasa.ch/…) + leaseContractName
(„Mietvertrag YYYY–YYYY") — ohne echten Inhalt, nur für die UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-24 22:19:37 +02:00
parent f2edc3b2ef
commit 61a26d00a7
+9
View File
@@ -4489,6 +4489,15 @@ export const mockProperties: Property[] = [
]
// Assign lease contract URLs to ~50 % of properties (every other one)
mockProperties.forEach((p, i) => {
if (i % 2 !== 0) return
const startYear = p.leaseStartDate ? new Date(p.leaseStartDate).getFullYear() : 2020 + (i % 5)
const endYear = p.leaseEndDate ? new Date(p.leaseEndDate).getFullYear() : startYear + 5
p.leaseContractUrl = `https://docs.wincasa.ch/mietvertraege/${p.id}.pdf`
p.leaseContractName = `Mietvertrag ${startYear}${endYear}`
})
// Assign images sequentially per pool so no two properties ever share the same image
// (until pool wraps, which happens after ~12 properties per pool type)
const _poolCounters: Record<string, number> = {}