Commit Graph

9 Commits

Author SHA1 Message Date
059c7194d8 Show login/register dialog instead of 401 for unauthenticated users
All checks were successful
Build frontend / build (push) Successful in 41s
- Auth check on calendar click and booking attempt
- Modal dialog with create account + login buttons
- Click backdrop or cancel to dismiss
2026-03-29 21:34:25 +00:00
f22bc45a4f Fix booking: use correct BookReservation endpoint + price from selected dates
All checks were successful
Build frontend / build (push) Successful in 38s
- Fixed endpoint: /Reservations/BookReservation/book (was /Reservations/Book)
- bookReservation now takes (propertyId, startDate, endDate) params
- Pricing updates dynamically based on selected date range
- Deposit read from API response instead of hardcoded
- Removed demo fallback that always showed success
2026-03-29 21:23:51 +00:00
86b8fc591b Add availability calendar to property detail page
All checks were successful
Build frontend / build (push) Successful in 42s
- Fetches available date ranges from /Reservations/GetAvailableDates/available/{id}
- Custom month calendar with green (available), amber (selected), gray (unavailable)
- Click start date then end date to select a range
- Validates entire range is available before confirming
- Shows selected dates and day count
- Month navigation with prev/next arrows
2026-03-29 21:16:00 +00:00
da0c36727f Remove all fallback dummy data - API-only
All checks were successful
Build frontend / build (push) Successful in 38s
- 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
2026-03-28 17:48:00 +00:00
eff0b41b78 Add enums, AuthService, and integrate backend registration endpoints
All checks were successful
Build frontend / build (push) Successful in 57s
- Add separate enum files: BuildingType, PropertyStatus, BookingStatus, CommissionType, IdentityType, UserRole, City, LoginMethod, OwnerType, CustomerType
- Add AuthService (addToken/getToken/deleteToken)
- Update api.js: use AuthService, add Owner/Add and Customer/Add endpoints
- Update login page to use AuthService for token storage
- Rewrite owner register: 3-step flow with OwnerType dropdown, backend integration, OTP verification
- Rewrite tenant register: 2-step flow with CustomerType dropdown, backend integration, OTP verification
- Update homepage and property detail to use enums instead of hardcoded maps
- Update AddPropertyForm to import from enums directly
- Add console logs and status toasts linked to API response messages
2026-03-27 18:03:12 +00:00
211ac42ad9 Clean up API client - use nested propertyInformation directly
All checks were successful
Build frontend / build (push) Successful in 42s
- Removed manual enrichment calls (Properties/Get fallback no longer needed)
- Removed unused hasNestedInfo variables
- API now returns propertyInformation nested in RentProperties/SaleProperties
2026-03-26 23:27:28 +00:00
fd3dcf4cc3 Update mappers for flat API response + enrich with property info
All checks were successful
Build frontend / build (push) Successful in 38s
- 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
2026-03-26 22:59:08 +00:00
cfb9c0058b Add API client and wire up live data fetching
All checks were successful
Build frontend / build (push) Successful in 43s
- 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
2026-03-26 22:20:33 +00:00
6d81ff56a8 Edit admin page
Edit home image
Added properties page
2026-02-15 01:53:37 +03:00