Commit Graph

102 Commits

Author SHA1 Message Date
a824fb0c7c fix: send FCM token to User/SetFCMToken endpoint
All checks were successful
Build frontend / build (push) Successful in 43s
2026-03-31 21:24:43 +00:00
9e87aa90e8 feat: send FCM token to backend on permission grant
Some checks failed
Build frontend / build (push) Failing after 25s
2026-03-31 20:20:52 +00:00
199e78d6b1 chore: set VAPID key for FCM
All checks were successful
Build frontend / build (push) Successful in 1m11s
2026-03-31 20:09:07 +00:00
df9711f539 fix: only request notification permissions for signed-in users
All checks were successful
Build frontend / build (push) Successful in 39s
2026-03-31 19:52:47 +00:00
2bea2d190c feat: integrate Firebase Cloud Messaging for push notifications
Some checks failed
Build frontend / build (push) Failing after 24s
2026-03-31 19:50:48 +00:00
81674c4aa7 fix: add remote image pattern for next.config.mjs
All checks were successful
Build frontend / build (push) Successful in 55s
2026-03-31 19:45:03 +00:00
cf7f51b514 fix: update GetMyRentListings endpoint (userId removed from URL)
All checks were successful
Build frontend / build (push) Successful in 1m3s
2026-03-31 18:46:12 +00:00
0171c7a2bf fix: prepend /Pictures/ to image paths for nginx static serving
All checks were successful
Build frontend / build (push) Successful in 40s
2026-03-30 18:52:08 +00:00
9f6a730a94 Show login dialog when favoriting without auth
All checks were successful
Build frontend / build (push) Successful in 39s
2026-03-30 18:34:19 +00:00
2c04cd751f Fix favorites: optimistic remove + no loading flash
All checks were successful
Build frontend / build (push) Successful in 54s
2026-03-30 18:18:09 +00:00
db184bbace 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-30 21:02:43 +03:00
230805e02b Edit phone in footer 2026-03-30 21:02:34 +03:00
3b9831a513 Integrate FavoriteProperty API: add/remove/get favorites with real backend
All checks were successful
Build frontend / build (push) Successful in 42s
2026-03-30 17:54:42 +00:00
1f40c6a4fd Edit footer
All checks were successful
Build frontend / build (push) Successful in 42s
2026-03-30 20:36:09 +03:00
4dd60ec14a Fix copy link & Instagram sharing: add clipboard fallback for HTTP
All checks were successful
Build frontend / build (push) Successful in 52s
2026-03-30 16:28:12 +00:00
68cb802d60 Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
All checks were successful
Build frontend / build (push) Successful in 47s
2026-03-30 19:26:08 +03:00
d22248248d Added sidebar 2026-03-30 19:26:03 +03:00
d375ed9d89 Add share dropdown: Facebook, WhatsApp, Telegram, Instagram, Copy Link
All checks were successful
Build frontend / build (push) Successful in 1m9s
- Replaced single Facebook button with dropdown menu
- WhatsApp: shares via wa.me with structured text + link
- Telegram: shares via t.me with text + URL
- Instagram: copies link + opens Instagram
- Copy Link: copies URL with toast notification
- Each share includes: property type, price, rooms, area, link
2026-03-30 16:08:35 +00:00
e6d754d014 perf: convert fonts to WOFF2 (10x smaller), fix preload to match, add html,body CSS font rule
All checks were successful
Build frontend / build (push) Successful in 42s
2026-03-30 15:34:36 +00:00
dee74d335f fix: font-display block → swap to prevent FOIT in header
All checks were successful
Build frontend / build (push) Successful in 1m14s
2026-03-30 15:32:08 +00:00
8f2679253b Fix font loading flash: font-display block + preload
Some checks failed
Build frontend / build (push) Has been cancelled
- Changed @font-face from font-display: swap to block (hides text until font loads)
- Added preload links for 3 most used font weights (Regular, Bold, Medium)
- Eliminates FOUC (Flash of Unstyled Content) where default font shows first
2026-03-30 15:31:35 +00:00
9bf67ffa38 Add SweetHome logo as OG image fallback for Facebook share
All checks were successful
Build frontend / build (push) Successful in 38s
- Always includes logo.png as OG image
- Property images shown first if available, logo as second
- If no property images, shows logo only
2026-03-30 14:07:52 +00:00
d56b4d2a11 Fix Facebook share: server-side OG metadata via generateMetadata
All checks were successful
Build frontend / build (push) Successful in 41s
- Split page.js into server component + PropertyDetail client component
- Server component exports generateMetadata that fetches property data
- OG tags now rendered in initial HTML (visible to Facebook/Twitter crawlers)
- Removes client-side useEffect OG tag injection (crawlers don't execute JS)
2026-03-30 13:44:52 +00:00
4d43cdaba2 Improve Facebook share: structured text + OG meta tags
All checks were successful
Build frontend / build (push) Successful in 1m3s
- Share quote now includes: property type, price, rooms, area, description snippet
- Added Open Graph meta tags (og:title, og:description, og:image, og:url)
- Added Twitter card meta tags
- OG tags set dynamically via useEffect for client-side rendering
2026-03-30 13:36:12 +00:00
891756e092 Edit background in register
All checks were successful
Build frontend / build (push) Successful in 1m39s
2026-03-30 15:28:39 +03:00
722d69cc92 Fix image URLs: handle paths with or without leading slash
All checks were successful
Build frontend / build (push) Successful in 39s
Some API paths have / (e.g. /Pictures/abc.jpg) and some don't (e.g. scaled_photo.jpg).
Now always inserts / between API base and path.
2026-03-30 01:35:20 +00:00
9d671f1985 Fix: add missing imports and currencies fetch in add property form
All checks were successful
Build frontend / build (push) Successful in 41s
- Import getCurrencies and uploadPicture were missing from import statement
- Added currencies state and fetch call in useEffect
- Added debug log in handleImageUpload
2026-03-30 01:25:48 +00:00
505dcd4bb0 Fix image upload field name: 'file' -> 'image'
All checks were successful
Build frontend / build (push) Successful in 40s
Endpoint expects field named 'image', returns path like /Pictures/abc123.jpg
2026-03-30 01:15:57 +00:00
8f700d0957 Fix missing uploadedImagePaths state declaration
All checks were successful
Build frontend / build (push) Successful in 38s
2026-03-30 01:06:23 +00:00
39193337b3 Display property images from API using full URLs
All checks were successful
Build frontend / build (push) Successful in 1m3s
- All mappers extract images from propertyInformation.images
- Paths prefixed with API base URL (http://45.93.137.91/api)
- Falls back to placeholder if no images
- Updated: main page, properties listing, property detail, owner properties
2026-03-30 01:01:42 +00:00
4299968764 Add image upload to property form via FilesController
All checks were successful
Build frontend / build (push) Successful in 52s
- Added uploadPicture() API function for POST /Files/UploadPicture
- Images uploaded immediately on selection, paths stored
- PropertyInformation.images sent with server-side paths
- Remove image also removes from uploaded paths
2026-03-30 00:57:52 +00:00
1a96e457ca Share button now shows Facebook icon with pre-filled post text
All checks were successful
Build frontend / build (push) Successful in 42s
- Facebook SVG icon instead of generic share icon
- Post includes property title + address + link
2026-03-30 00:26:28 +00:00
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