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:
@@ -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
|
// 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)
|
// (until pool wraps, which happens after ~12 properties per pool type)
|
||||||
const _poolCounters: Record<string, number> = {}
|
const _poolCounters: Record<string, number> = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user