- Added getCurrencies() API function for /Currency/GetAll
- Currency dropdown fetched on mount, populated with available currencies
- Added deposit input field (مبلغ الضمان)
- CurrencyId sent in RentPropertyDto instead of hardcoded 1
- Added addRentProperty() API function for POST /RentProperties/AddRentProperty
- handleSubmit builds correct RentPropertyDto with nested PropertyInformation
- Maps UI fields to API enums (BuildingType, RentType, RentPropertyType, PropertyStatus)
- Services/terms stored in DetailsJSON as JSON string
- Console logs the full payload before sending
- Removed FALLBACK_PROPERTIES from main page, properties listing, and property detail
- Pages now start empty and populate only from API responses
- Show empty state / error on API failure instead of dummy data
- Added getCustomerByUserId and getOwnerByUserId API functions
- Profile page extracts user ID (SID) from JWT, calls appropriate endpoint
- Falls back to JWT/localStorage if API call fails
- Maps API fields (firstName, lastName, whatsAppNumber, phone, etc.) to form
- Added loading.js (dark/light variants) for all 14 routes
- Added error.js (dark/light variants) for all 14 routes
- Added global not-found.js and loading.js at root
- Admin page shows 404 illustration for non-admin users instead of redirecting
- Tenant form: added WhatsApp number + National number inputs
- Owner form: added National number input (already had WhatsApp)
- Both forms send whatsAppNumber and nationalNumber in payload
- Added validation for required fields
- FullName split into FirstName + LastName in both forms and API
- File fields renamed: FrontIdCarImage -> FrontIdCarImagePath, RearIdCarImage -> RearIdCarImagePath
- Added Language field to form data
- getRentProperty now uses /RentProperties/GetRentPropertyById/{id}
- addCustomer/addOwner now use FormData with multipart upload
- Front and back ID images appended as FrontIdCarImage/RearIdCarImage
- Registration pages pass idImages.front and idImages.back to API
- Field names mapped to PascalCase for .NET API (FullName, Email, etc.)
Login page:
- Email/phone tabs with auto-detect from input
- Calls LogInWithEmail or LogInWithPhoneNumber API
- On 206 (Partial Content): shows OTP step, sends OTP, then verifies
- On 200: stores JWT in localStorage, decodes user info
- OTP step with resend button and back navigation
- Console logs throughout all auth flows
API client:
- Added authFetch() for raw status code handling (200/206)
- Added loginWithEmail, loginWithPhone, sendEmailOTP, sendPhoneOTP,
verifyEmail, verifyPhone, isEmail, isPhoneNumber
- apiFetch now accepts 206 as non-error
- api.js: getRentProperties/getSaleProperties now fetch PropertyInformation
for each property's propInfoId (when Properties/Get endpoint is fixed)
- Updated all 3 mapApiProperty functions to handle flat response format
(no nested propertyInformation) - uses defaults for missing fields
- Status/type mapping checks both flat and nested fields
- Created app/utils/api.js with functions for all OpenAPI endpoints
- Updated main page to fetch RentProperties + SaleProperties from API
- Updated properties listing page with API integration
- Updated property detail page to fetch by ID from API
- Added mapApiProperty() adapter to transform API responses to UI format
- All pages gracefully fall back to dummy data if API is unavailable