Hi there,
I have two “almost” related questions:
I have an task entity
that has an assignedTo
field. I would like to filter the browser table to only show the tasks that have been assigned to the logged on user.
e.g. On the image below, if Collins O is logged in, he’ll only see the tasks that are assigned to him. The curve ball though is that there’s an admin who’s supposed to see all of them. The task entity
is a composition of a projects entity
which has an projectsManager
field. If the project manager is the one logged in, then he should see all the tasks. In which case, in my example, the project manager could have a task assigned to them as well.
The second question is almost similar to that. Once I open the tasks editor, there are two checkboxes which should only be editable to the assignedTo user.
Tried this but it didn’t work:
if (getItem().getAssignedTo().getId() == AppBeans.get(UserSessionSource.class).getUserSession().getUser().getId()) {
completedCheckBox.setEnabled(true);
cancelledCheckBox.setEnabled(true);
}
Thanks in advance.