Removed access to ResourcesLoad and AdvancedAllocation from company view context menu
This patch should be reverted if the Save and Cancel commands are properly refactored and can be called from a single point to add the buttons on those perspectives, if the user has not passed throug order gantt and the state is explicitly set. FEA: ItEr75S04BugFixing
This commit is contained in:
parent
71bcda9af8
commit
5751692b9c
1 changed files with 3 additions and 66 deletions
|
|
@ -113,10 +113,9 @@ public class PlanningTabCreator {
|
|||
commands.add(scheduleCommand);
|
||||
ICommandOnTask<TaskElement> orderDetailsCommand = buildOrderDetailsCommand();
|
||||
commands.add(orderDetailsCommand);
|
||||
ICommandOnTask<TaskElement> resourcesLoadCommand = buildResourcesLoadCommand();
|
||||
commands.add(resourcesLoadCommand);
|
||||
ICommandOnTask<TaskElement> advancedAllocationCommand = buildAdvancedAllocationCommand();
|
||||
commands.add(advancedAllocationCommand);
|
||||
|
||||
// TODO: Revert removal of ResourcesLoad and AdvancedAllocation
|
||||
// context entries when save and cancel commands are refactored
|
||||
|
||||
companyPlanningController.setAdditional(commands);
|
||||
companyPlanningController.setTabsController(tabsController);
|
||||
|
|
@ -193,68 +192,6 @@ public class PlanningTabCreator {
|
|||
};
|
||||
}
|
||||
|
||||
private ICommandOnTask<TaskElement> buildResourcesLoadCommand() {
|
||||
return new ICommandOnTask<TaskElement>() {
|
||||
|
||||
@Override
|
||||
public void doAction(
|
||||
IContextWithPlannerTask<TaskElement> context,
|
||||
TaskElement task) {
|
||||
OrderElement orderElement = task.getOrderElement();
|
||||
if (orderElement instanceof Order) {
|
||||
Order order = (Order) orderElement;
|
||||
tabsController.goToResourcesLoad(order);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return _("Resources Load");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIcon() {
|
||||
return "/common/img/ico_menu_order-load.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicableTo(TaskElement task) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private ICommandOnTask<TaskElement> buildAdvancedAllocationCommand() {
|
||||
return new ICommandOnTask<TaskElement>() {
|
||||
|
||||
@Override
|
||||
public void doAction(
|
||||
IContextWithPlannerTask<TaskElement> context,
|
||||
TaskElement task) {
|
||||
OrderElement orderElement = task.getOrderElement();
|
||||
if (orderElement instanceof Order) {
|
||||
Order order = (Order) orderElement;
|
||||
tabsController.goToAdvancedAllocation(order);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return _("Advanced Allocation");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIcon() {
|
||||
return "/common/img/ico_menu_advanced-assignment.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicableTo(TaskElement task) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
};
|
||||
return new CreatedOnDemandTab(_("Projects Planning"),
|
||||
"company-scheduling",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue