(Optional) Step 13 Minimum nights stay
Purpose (Product)
UX Flow (What the user sees)
System Flow (How it works)
sequenceDiagram
actor Landlord
participant Frontend as Web App (Next.js)
participant Backend as API (NestJS)
participant DB as Database
%% Load existing value
Frontend->>Frontend: Load property.minimumNights or default to 3
%% User interaction
Landlord->>Frontend: Click +/- buttons
Frontend->>Frontend: Update local state (1-30 range)
Frontend->>Frontend: Trigger form validation
%% Submit minimum nights
Landlord->>Frontend: Click "Next"
Frontend->>Frontend: Validate form (minimumNights: 1-30, optional)
Frontend->>Backend: PATCH /api/properties/{id} { propertyDetails: { minimumNights } }
Backend->>DB: Update properties.propertyDetails.minimumNights
Backend-->>Frontend: 200 OK (updated property)
Frontend->>Frontend: Advance to next stepData Touched
Table
Field
Type
Notes