2026-06-10 19:50:49 +03:00
|
|
|
|
Add enums, AuthService, and integrate backend registration endpoints
- 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:01:42 +00:00
|
|
|
const BookingStatus = Object.freeze({
|
|
|
|
|
PENDING: 'pending',
|
2026-06-10 19:50:49 +03:00
|
|
|
ownerConfirmed: 'ownerConfirmed',
|
|
|
|
|
depositPaid: 'depositPaid',
|
|
|
|
|
depositConfirmed: 'depositConfirmed',
|
|
|
|
|
completed: 'completed',
|
|
|
|
|
cancelled: 'cancelled',
|
Add enums, AuthService, and integrate backend registration endpoints
- 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:01:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const BookingStatusLabels = Object.freeze({
|
2026-06-10 19:50:49 +03:00
|
|
|
[BookingStatus.PENDING]: 'قيد الانتظار',
|
|
|
|
|
[BookingStatus.ownerConfirmed]: 'مؤكد من المالك',
|
|
|
|
|
[BookingStatus.depositPaid]: 'تم دفع السلفة',
|
|
|
|
|
[BookingStatus.depositConfirmed]: 'تم تأكيد الدفع',
|
|
|
|
|
[BookingStatus.completed]: 'منتهي',
|
|
|
|
|
[BookingStatus.cancelled]: 'ملغي',
|
Add enums, AuthService, and integrate backend registration endpoints
- 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:01:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const BookingStatusColors = Object.freeze({
|
|
|
|
|
[BookingStatus.PENDING]: 'yellow',
|
2026-06-10 19:50:49 +03:00
|
|
|
[BookingStatus.ownerConfirmed]: 'blue',
|
|
|
|
|
[BookingStatus.depositPaid]: 'orange',
|
|
|
|
|
[BookingStatus.depositConfirmed]: 'green',
|
|
|
|
|
[BookingStatus.completed]: 'teal',
|
|
|
|
|
[BookingStatus.cancelled]: 'red',
|
Add enums, AuthService, and integrate backend registration endpoints
- 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:01:42 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export { BookingStatus, BookingStatusLabels, BookingStatusColors };
|