- {/* Left column: Revenue */}
-
-
Revenue
-
updateField("avg_nightly_rate", v)}
- tooltip={TOOLTIPS.avg_nightly_rate}
+ {activeRentalType === "str" ? (
+
- {/* Occupancy: flat or monthly profile */}
-
-
- {
- if (e.target.checked) {
- const defaultProfile: MonthlyProfileEntry[] = Array.from({ length: 12 }, (_, i) => ({
- month: i + 1,
- nightly_rate: form.avg_nightly_rate,
- occupancy_pct: form.occupancy_pct,
- }));
- updateField("monthly_revenue_profile", defaultProfile);
- updateField("profile_template_name", "Custom");
- } else {
- updateField("monthly_revenue_profile", null);
- updateField("profile_template_name", null);
- }
- }}
- className="h-4 w-4 text-indigo-600 rounded border-slate-300 dark:border-slate-600"
- />
-
- Use Monthly Revenue Profile
-
-
-
- {form.monthly_revenue_profile !== null ? (
-
updateField("monthly_revenue_profile", profile)}
- onTemplateChange={(name) => updateField("profile_template_name", name)}
- />
- ) : (
- updateField("occupancy_pct", v)}
- tooltip={TOOLTIPS.occupancy_pct}
- />
- )}
-
- updateField("cleaning_fee_per_stay", v)}
- tooltip={TOOLTIPS.cleaning_fee_per_stay}
+ ) : ltrForm ? (
+
-
-
-
updateField("avg_stay_length_nights", parseFloat(e.target.value) || 0)}
- className="w-full px-3 py-2 border border-slate-200 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-slate-700 dark:text-slate-100"
- />
+ ) : (
+
+ LTR assumptions unavailable. Save STR assumptions first to
+ initialize.
-
-
- updateField("rental_delay_months", parseInt(e.target.value) || 0)}
- className="w-full px-3 py-2 border border-slate-200 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-slate-700 dark:text-slate-100"
- />
-
-
+ )}
- {/* Right column: Expenses */}
-
-
Expenses
+ {/* Save */}
+
+
+ {saved && Saved}
+
+
- {/* Platform & Management */}
-
-
Platform & Management
+ {/* Sticky preview aside */}
+
+
+
+ );
+}
- {/* Turnover Costs */}
-
-
Turnover Costs
- updateField("cleaning_cost_per_turn", v)}
- tooltip={TOOLTIPS.cleaning_cost_per_turn}
- />
-
+function PreviewRow({
+ label,
+ value,
+ emphasis = false,
+ tone,
+}: {
+ label: string;
+ value: number;
+ emphasis?: boolean;
+ tone?: "positive" | "negative";
+}) {
+ const toneClass =
+ tone === "positive"
+ ? "text-accent"
+ : tone === "negative"
+ ? "text-negative"
+ : "text-ink";
+ return (
+
+ {label}
+
+ {formatCurrency(value)}
+
+
+ );
+}
- {/* Monthly Fixed */}
-
-
Monthly Fixed
-
- updateField("utilities_monthly", v)}
- tooltip={TOOLTIPS.utilities_monthly}
- />
- updateField("supplies_monthly", v)}
- tooltip={TOOLTIPS.supplies_monthly}
- />
- updateField("marketing_monthly", v)}
- tooltip={TOOLTIPS.marketing_monthly}
- />
- updateField("software_monthly", v)}
- tooltip={TOOLTIPS.software_monthly}
- />
-
-
+// --- STR sections ---------------------------------------------------------
- {/* Reserves (STR-specific) */}
-
-
Reserves
-
-
updateField("damage_reserve_pct", v)}
- tooltip={TOOLTIPS.damage_reserve_pct}
- />
-
-
-