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 (../ -> ./)
This commit is contained in:
Claw AI
2026-03-28 14:53:45 +00:00
parent 6394f1d71a
commit c2235cf575
8 changed files with 75 additions and 77 deletions

View File

@ -86,16 +86,23 @@ const AuthService = Object.freeze({
* @returns {boolean}
*/
isOwner() {
const roles = this.getRoles();
return roles.includes('Owner');
return this.getRoles().includes('Owner');
},
/**
* Authenticated user without Owner role (i.e. customer)
* User has Admin role
* @returns {boolean}
*/
isAdmin() {
return this.getRoles().includes('Admin');
},
/**
* Authenticated user without Owner or Admin role (i.e. customer)
* @returns {boolean}
*/
isCustomer() {
return this.isAuthenticated() && !this.isOwner();
return this.isAuthenticated() && !this.isOwner() && !this.isAdmin();
},
/**