ItEr60S04ValidacionEProbasFuncionaisItEr59S04: [Bug #593] Adding option to go to resources load of an order from company view.
This commit is contained in:
parent
c77122a692
commit
3991e79c09
3 changed files with 42 additions and 0 deletions
|
|
@ -53,4 +53,6 @@ public interface IGlobalViewEntryPoints {
|
|||
|
||||
void goToOrderDetails(Order order);
|
||||
|
||||
void goToResourcesLoad(Order order);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -408,4 +408,10 @@ public class MultipleTabsPlannerController implements Composer,
|
|||
getTabsRegistry().show(ordersTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goToResourcesLoad(Order order) {
|
||||
mode.goToOrderMode(order);
|
||||
getTabsRegistry().show(resourceLoadTab);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@ public class PlanningTabCreator {
|
|||
commands.add(scheduleCommand);
|
||||
ICommandOnTask<TaskElement> orderDetailsCommand = buildOrderDetailsCommand();
|
||||
commands.add(orderDetailsCommand);
|
||||
ICommandOnTask<TaskElement> resourcesLoadCommand = buildResourcesLoadCommand();
|
||||
commands.add(resourcesLoadCommand);
|
||||
|
||||
companyPlanningController.setAdditional(commands);
|
||||
companyPlanningController.setTabsController(tabsController);
|
||||
|
|
@ -189,6 +191,38 @@ 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;
|
||||
mode.goToOrderMode(order);
|
||||
tabsController.goToResourcesLoad(order);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return _("Resources Load");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicableTo(TaskElement task) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
};
|
||||
return new CreatedOnDemandTab(_("Projects Planning"),
|
||||
"company-scheduling",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue