Skip to content
Snippets Groups Projects
Commit e1546efa authored by uhensler's avatar uhensler
Browse files

OO-4630: Show add/remove user buttons visibility in appointment findings

parent cb397d6c
No related branches found
No related tags found
No related merge requests found
...@@ -138,9 +138,15 @@ public class AppointmentListEditController extends AppointmentListController { ...@@ -138,9 +138,15 @@ public class AppointmentListEditController extends AppointmentListController {
row.setStatusCSS("o_ap_status_" + appointment.getStatus().name()); row.setStatusCSS("o_ap_status_" + appointment.getStatus().name());
} }
boolean removeUser = Type.finding == topic.getType() boolean addUser = freeParticipations == null || freeParticipations.intValue() > 0;
? participations.size() > 0 && Status.confirmed == appointment.getStatus() boolean removeUser = participations.size() > 0;
: participations.size() > 0; if (Type.finding == topic.getType() && !noAppointmentConfirmed && Appointment.Status.confirmed != appointment.getStatus()) {
addUser = false;
removeUser = false;
}
if (addUser) {
forgeAddUserLink(row);
}
if (removeUser) { if (removeUser) {
forgeRemoveUserLink(row); forgeRemoveUserLink(row);
} }
...@@ -160,9 +166,7 @@ public class AppointmentListEditController extends AppointmentListController { ...@@ -160,9 +166,7 @@ public class AppointmentListEditController extends AppointmentListController {
forgeConfirmLink(row, confirmable); forgeConfirmLink(row, confirmable);
} }
} }
if (freeParticipations == null || freeParticipations.intValue() > 0) {
forgeAddUserLink(row);
}
forgeDeleteLink(row); forgeDeleteLink(row);
forgeEditLink(row); forgeEditLink(row);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment