Untitled
unknown
typescript
a year ago
807 B
7
Indexable
if (roleCheck.isRequester) {
console.log('User is a Requester');
// Add additional code specific to the Requester role here
} else if (roleCheck.isAdmin) {
console.log('User is an Admin');
// Add additional code specific to the Admin role here
} else if (roleCheck.isRadiationSafety) {
console.log('User is in Radiation Safety');
// Add additional code specific to the Radiation Safety role here
} else if (roleCheck.isDispatcher) {
console.log('User is a Dispatcher');
// Add additional code specific to the Dispatcher role here
} else if (roleCheck.isDriver) {
console.log('User is a Driver');
// Add additional code specific to the Driver role here
} else {
console.log('No valid role found.');
// Handle the case where no role is set to true
}Editor is loading...
Leave a Comment