From 591c78cb41cc0e45847335a1944fa26cb378822e Mon Sep 17 00:00:00 2001 From: Satyam <95536056+Satyam-Rastogi@users.noreply.github.com> Date: Sun, 1 Feb 2026 19:36:30 +0530 Subject: [PATCH] feat: updated renovation dates to be within last 6 months --- src/data/mockStore.jsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/data/mockStore.jsx b/src/data/mockStore.jsx index 75f21c9..4f6caeb 100644 --- a/src/data/mockStore.jsx +++ b/src/data/mockStore.jsx @@ -453,6 +453,28 @@ function generateProperties() { } }); + // 4. Refine Renovation Dates (Recent for 'Renovated' status) + // User Request: Not older than 6 months from Feb 2026 (Aug 2025 - Feb 2026) + allProperties.forEach(prop => { + if (prop.canvassingStatus === "Renovated") { + const monthsBack = Math.floor(Math.random() * 6); // 0 to 5 months ago + // Base date: Feb 2026. + // 0 months ago = Feb 2026. 1 = Jan 2026... 5 = Sep 2025. + // Let's pick a random day. + const year = monthsBack <= 1 ? 2026 : 2025; + let month = 2 - monthsBack; // Feb(2) - 0 = 2. Feb(2) - 5 = -3. + if (month <= 0) month += 12; // Wrap around to previous year + + const day = Math.floor(Math.random() * 28) + 1; + const monthStr = month.toString().padStart(2, '0'); + const dayStr = day.toString().padStart(2, '0'); + + prop.propertyData.lastMajorRenovationDate = `${year}-${monthStr}-${dayStr}`; + prop.propertyData.recentMajorRepairs = "Full Interior & Exterior Renovation"; + prop.propertyData.renovationDescription = "Modernized kitchen, new flooring, fresh paint, roof inspection"; + } + }); + return allProperties; }