Commit Graph

108 Commits

Author SHA1 Message Date
d3242a4147 Share button opens Facebook post composer
All checks were successful
Build frontend / build (push) Successful in 57s
2026-03-30 00:22:28 +00:00
ff589e4b0a Implement share button with Web Share API + clipboard fallback
All checks were successful
Build frontend / build (push) Successful in 41s
- Uses navigator.share() on mobile (native share sheet)
- Falls back to clipboard copy on desktop with toast confirmation
2026-03-30 00:17:39 +00:00
0c3b454015 Owner properties page fetches from API via GetMyRentListings
All checks were successful
Build frontend / build (push) Successful in 41s
- Calls /RentProperties/GetMyRentListings/{userId} with user ID from JWT
- Maps API response (nested propertyInformation + detailsJSON) to UI format
- Removed mock data and localStorage fallback
2026-03-29 22:17:49 +00:00
6245965c1c Allow unauthenticated users to view and select dates, login only on book
All checks were successful
Build frontend / build (push) Successful in 43s
2026-03-29 21:40:32 +00:00
829491cc30 Calendar fully blocked for unauthenticated users
All checks were successful
Build frontend / build (push) Successful in 46s
- Overlay blocks entire calendar with 'login to view dates' message
- Date cells disabled when not authenticated
- Clicking overlay or any disabled date shows login/register dialog
2026-03-29 21:38:02 +00:00
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
ca1d83967e Fix duplicate addRentProperty definition in api.js
All checks were successful
Build frontend / build (push) Successful in 39s
2026-03-29 15:58:54 +00:00
00dab824c3 Fix add property page to match Flutter request body structure
Some checks failed
Build frontend / build (push) Failing after 39s
- Remove 'For sale' offer type (rent only)
- Remove salePrice field and UI
- Fix rentTypeMap: 0=Monthly, 1=Daily (was wrong)
- Fix propertyType: uses RentPropertyCondition (furnished/unfurnished)
- Fix type field: uses RentPropertyType (furnished/unfurnished)
- Fix services: use enum API names in detailsJSON (Electricity, Internet...)
- Fix terms: use enum API names in detailsJSON (NoSmoking, NoAnimals...)
- Fix detailsJSON structure to match Flutter (services array, terms array, room object)
- Replace getCurrencies with static Currency enum dropdown
- Remove duplicate MapClickHandler
- Use all new enums from enums/index.js
2026-03-29 15:48:48 +00:00
5d7b3e3b0f Add new enums to match Flutter project structure
All checks were successful
Build frontend / build (push) Successful in 39s
- Add RentPropertyCondition (WithFurniture/WithoutFurniture)
- Add RentPropertyType (Furnished/Unfurnished/SemiFurnished)
- Add RentType (Monthly/Daily)
- Add PropertyService (13 services for detailsJSON)
- Add PropertyTerm (NoSmoking/NoAnimals/NoParties)
- Add Currency (SYP/USD)
- Update enums barrel file
2026-03-29 15:27:48 +00:00
412ccbf8b8 Show user full name in navbar and homepage after login
All checks were successful
Build frontend / build (push) Successful in 53s
- AuthService: added cacheUser/getCachedUser methods
- AuthService.getUser() prefers cached name over JWT claims
- Login page: fetches full profile from API after login and caches it
- Fixes navbar dropdown and homepage showing email instead of name
2026-03-29 12:42:57 +00:00
253bb875ab Fix post-login: re-read user role on every route change
All checks were successful
Build frontend / build (push) Successful in 55s
- ClientLayout: separated user loading into useEffect with pathname dependency
- Homepage: same fix - re-read user from JWT on route change
- Fixes issue where navbar/dashboard links didn't appear until page reload
2026-03-29 12:22:16 +00:00
16038a80dd Add currency dropdown and deposit field to add property form
All checks were successful
Build frontend / build (push) Successful in 53s
- 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
2026-03-28 19:40:03 +00:00
6df7548611 Fix missing mapZoom state variable in add property page
All checks were successful
Build frontend / build (push) Successful in 37s
2026-03-28 18:12:41 +00:00
d94b32a670 Add property form submits to API as RentPropertyDto
All checks were successful
Build frontend / build (push) Successful in 43s
- 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
2026-03-28 18:00:44 +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
b6e9f01938 Profile page fetches full data from API via GetByUserId
All checks were successful
Build frontend / build (push) Successful in 39s
- 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
2026-03-28 17:03:40 +00:00
48523067fc Use local Madani Arabic font files instead of CDN
All checks were successful
Build frontend / build (push) Successful in 1m2s
- Added @font-face for all 9 weights (Thin to Black)
- Removed CDN links from layout.js
- Font loads locally from public/fonts/
2026-03-28 16:52:31 +00:00
e0f80f3dee Clean up debug logging in login flow
All checks were successful
Build frontend / build (push) Successful in 57s
2026-03-28 16:44:37 +00:00
b8117093af Add debug logging to login flow to trace token storage
All checks were successful
Build frontend / build (push) Successful in 41s
2026-03-28 16:38:04 +00:00
de7636f852 Fix token key mismatch in verify functions
All checks were successful
Build frontend / build (push) Successful in 40s
AuthService stores token as 'auth_token', but verifyEmail/verifyPhone
were reading 'token'. Now uses AuthService.getToken() consistently.
2026-03-28 16:31:27 +00:00
5a4b018c07 Send JWT token with verify email/phone endpoints
All checks were successful
Build frontend / build (push) Successful in 39s
- authFetch now accepts optional token parameter
- verifyEmail/verifyPhone read token from localStorage and send as Bearer header
2026-03-28 16:17:14 +00:00
c14c28141f Add loading.js and error.js for all routes, secure admin page with 404
All checks were successful
Build frontend / build (push) Successful in 40s
- 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
2026-03-28 16:12:21 +00:00
c99689a995 Add Phone field to FormData in addCustomer and addOwner
All checks were successful
Build frontend / build (push) Successful in 38s
2026-03-28 15:51:25 +00:00
f7fa3c723d Add Phone field (7 digits) to both registration forms
All checks were successful
Build frontend / build (push) Successful in 36s
Maps to API 'Phone' field, validated to exactly 7 digits
2026-03-28 15:41:18 +00:00
0621f51676 Add WhatsApp and National Number fields to registration forms
All checks were successful
Build frontend / build (push) Successful in 38s
- 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
2026-03-28 15:38:40 +00:00
d698305d79 Update registration to match new API schema
All checks were successful
Build frontend / build (push) Successful in 37s
- 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}
2026-03-28 15:29:06 +00:00
bb15a7934e Redesign app download section: dropdown for Android + iOS coming soon
All checks were successful
Build frontend / build (push) Successful in 46s
- Desktop: hover dropdown with Android APK download + iOS coming soon
- Mobile: download links in hamburger menu
2026-03-28 15:18:19 +00:00
2424da2d45 Fix registration 415: send multipart form data with ID images
All checks were successful
Build frontend / build (push) Successful in 1m10s
- 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.)
2026-03-28 15:15:09 +00:00
c2235cf575 Fix build: syntax errors, duplicate useEffects, import paths
All checks were successful
Build frontend / build (push) Successful in 1m26s
- Fixed broken useEffect syntax in 4 owner pages (bookings, calendar, profits, properties)
- Removed duplicate useEffect blocks
- Fixed ClientLayout import path for AuthService (../ -> ./)
2026-03-28 14:53:45 +00:00
6394f1d71a Fix CustomerType and OwnerType enums: send int instead of string
Some checks failed
Build frontend / build (push) Failing after 45s
- CustomerType: PERSONAL=0, FAMILY=1 (was 'Personal', 'Family')
- OwnerType: PERSON=0, REAL_ESTATE_AGENCY=1 (was 'peerson', 'RealEstateAgency')
- Backend Type column is int(11), sending strings caused 415 errors
2026-03-28 14:15:40 +00:00
9cddee841b Add FullName field to owner and customer signup request payloads
All checks were successful
Build frontend / build (push) Successful in 38s
2026-03-27 22:01:00 +00:00
3c21c1873e Fix register pages: both have 2 steps with ID upload, OTP as modal overlay
All checks were successful
Build frontend / build (push) Successful in 40s
2026-03-27 18:19:32 +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
2fb55db360 changed the appVersion
All checks were successful
Build frontend / build (push) Successful in 1m6s
2026-03-27 00:06:13 +00:00
b613bde682 Implement login with email/phone + OTP verification flow
All checks were successful
Build frontend / build (push) Successful in 40s
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
2026-03-26 23:56:18 +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
bdcb98a047 Fix API endpoint paths to match controller routing
All checks were successful
Build frontend / build (push) Successful in 43s
- Endpoints now use /Controller/Action format (e.g. /RentProperties/GetRentProperties)
- Unwrap API response envelope ({ data, isSuccess, ... } -> data)
- Use query params for single-property fetch (?id=N)
- Marked locations endpoint as unconfirmed (not yet deployed)
2026-03-26 22:46:57 +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
082f20da40 Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
All checks were successful
Build frontend / build (push) Successful in 55s
2026-03-27 00:35:03 +03:00
157188d2e6 Edit Admin 2026-03-27 00:34:59 +03:00
ac1241583b added a files folder and changed the href
All checks were successful
Build frontend / build (push) Successful in 43s
2026-03-22 15:31:54 +03:00
552bbdd269 fixing the meta data layout
All checks were successful
Build frontend / build (push) Successful in 39s
2026-03-21 17:45:13 +03:00
485e4c2630 added the android icon in a link with svg and style
All checks were successful
Build frontend / build (push) Successful in 42s
2026-03-21 17:24:50 +03:00
e961288b04 added the nav link on the client laylout for the apk app
All checks were successful
Build frontend / build (push) Successful in 37s
2026-03-21 15:36:44 +03:00
f6c6119c18 Edit rtl
All checks were successful
Build frontend / build (push) Successful in 32s
2026-03-20 14:17:59 +03:00
d86cb9e9a1 Delete translation
All checks were successful
Build frontend / build (push) Successful in 30s
2026-03-20 13:33:15 +03:00
6aab85e99f Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
All checks were successful
Build frontend / build (push) Successful in 1m13s
2026-03-20 13:20:36 +03:00