|
|
|
@ -13,6 +13,7 @@ import info.bukova.isspst.data.TripRequirement;
|
|
|
|
|
import info.bukova.isspst.data.User;
|
|
|
|
|
import info.bukova.isspst.data.Workgroup;
|
|
|
|
|
import info.bukova.isspst.services.requirement.RequirementTypeService;
|
|
|
|
|
import info.bukova.isspst.services.requirement.TripRequirementService;
|
|
|
|
|
import info.bukova.isspst.services.settings.GlobalSettingsService;
|
|
|
|
|
import info.bukova.isspst.services.users.UserService;
|
|
|
|
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
|
|
|
@ -29,6 +30,8 @@ public class TripRequirementForm extends FormViewModel<TripRequirement> {
|
|
|
|
|
private GlobalSettingsService settingsService;
|
|
|
|
|
@WireVariable
|
|
|
|
|
private RequirementTypeService reqTypeService;
|
|
|
|
|
@WireVariable
|
|
|
|
|
private TripRequirementService tripRequirementService;
|
|
|
|
|
private List<Workgroup> centres;
|
|
|
|
|
private List<User> users;
|
|
|
|
|
private List<User> passengers;
|
|
|
|
@ -37,6 +40,7 @@ public class TripRequirementForm extends FormViewModel<TripRequirement> {
|
|
|
|
|
|
|
|
|
|
@Init(superclass = true)
|
|
|
|
|
public void init() {
|
|
|
|
|
tripRequirementService.loadType(getDataBean());
|
|
|
|
|
centres = reqTypeService.filterCentres(getDataBean().getType(), workgroupService.getUserCentres(userService.getCurrent()));
|
|
|
|
|
users = userService.getAll();
|
|
|
|
|
passengers = getDataBean().getPassengers();
|
|
|
|
|