Fix build: syntax errors, duplicate useEffects, import paths
All checks were successful
Build frontend / build (push) Successful in 1m26s
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:
@ -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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user