fix: syntax error in tenant assignment and enabled strict detail levels

This commit is contained in:
Satyam
2026-02-01 19:35:05 +05:30
parent 5526f4e195
commit 2e64c3778d
2 changed files with 172 additions and 22 deletions
+39 -10
View File
@@ -405,11 +405,29 @@ const Drawer = ({ isOpen, onClose, data, newLocation, onUpdateStatus, onSave, lo
{formData.isRented === 'Yes' ? (
<div className="p-4 bg-purple-50 dark:bg-purple-900/10 rounded-xl space-y-4 border border-purple-100 dark:border-purple-500/20">
<RenderInput label="Tenant Name" field="tenantName" />
<h4 className="text-[10px] uppercase font-bold text-purple-600 dark:text-purple-400 border-b border-purple-200 dark:border-purple-500/20 pb-1 mb-2">Tenant Profile</h4>
<RenderInput label="Full Name *" field="tenantName" placeholder="Required" />
<div className="grid grid-cols-2 gap-4">
<RenderInput label="Current Rent" field="currentRent" type="number" />
<RenderInput label="Lease End" field="leaseEnd" type="date" />
<RenderInput label="Phone *" field="tenantPhone" placeholder="Required" />
<RenderInput label="Email" field="tenantEmail" />
</div>
<div className="grid grid-cols-2 gap-4">
<RenderInput label="Occupation" field="tenantOccupation" />
<RenderInput label="Employer" field="tenantEmployer" />
</div>
<div className="grid grid-cols-2 gap-4">
<RenderInput label="Annual Income" field="tenantIncome" />
<RenderInput label="Family Status" field="livingStatus" options={["Single", "Family", "Couple", "Roommates"]} />
</div>
<h4 className="text-[10px] uppercase font-bold text-purple-600 dark:text-purple-400 border-b border-purple-200 dark:border-purple-500/20 pb-1 mb-2 mt-4">Lease Details</h4>
<RenderInput label="Lease Type" field="leaseType" options={["Residential Standard", "Commercial NNN", "Short Term", "Month-to-Month"]} />
<div className="grid grid-cols-3 gap-2">
<RenderInput label="Signed" field="leaseSigned" type="date" />
<RenderInput label="Start" field="leaseStart" type="date" />
<RenderInput label="End" field="leaseEnd" type="date" />
</div>
<RenderInput label="Monthly Rent ($)" field="currentRent" type="number" />
</div>
) : (
<div className="p-4 bg-zinc-50 dark:bg-white/5 rounded-xl space-y-4">
@@ -603,13 +621,24 @@ function Maps() {
roofCondition: formData.roofCondition,
lastRenovationDate: formData.lastRenovationDate,
// Rental Status
isRented: formData.isRented,
tenantName: formData.tenantName,
currentRent: formData.currentRent,
leaseEnd: formData.leaseEnd,
ownerWillingToRent: formData.ownerWillingToRent,
expectedRent: formData.expectedRent,
// Rental Status (Enhanced)
isRented: formData.isRented === 'Yes',
currentlyRented: formData.isRented === 'Yes', // Sync both just in case
currentTenantName: formData.tenantName,
tenantPhone: formData.tenantPhone,
tenantEmail: formData.tenantEmail,
tenantOccupation: formData.tenantOccupation,
tenantEmployer: formData.tenantEmployer,
tenantAnnualIncome: formData.tenantIncome,
livingStatus: formData.livingStatus,
leaseType: formData.leaseType,
leaseSignedDate: formData.leaseSigned,
leaseStartDate: formData.leaseStart,
leaseEndDate: formData.leaseEnd,
currentMonthlyRentAmount: formData.currentRent,
ownerWillingToRent: formData.ownerWillingToRent === 'Yes',
expectedMonthlyRentAmount: formData.expectedRent,
// Location (can be expanded)
schoolDistrict: formData.schoolDistrict,