final State<Void> typeChanged = typeChangedState();
advancedAllocationTab = doFeedbackOn(AdvancedAllocationTabCreator
.create(mode, transactionService, planningStateCreator,
returnToPlanningTab(), breadcrumbs));
TabsConfiguration tabsConfiguration = TabsConfiguration.create()
.add(tabWithNameReloading(planningTab, typeChanged))
.add(tabWithNameReloading(ordersTab, typeChanged));
if (SecurityUtils.isSuperuserOrUserInRoles(UserRole.ROLE_PLANNING)) {
tabsConfiguration.add(
tabWithNameReloading(resourceLoadTab, typeChanged)).add(
tabWithNameReloading(limitingResourcesTab, typeChanged));
} else {
tabsConfiguration.add(visibleOnlyAtOrderModeWithNameReloading(
resourceLoadTab, typeChanged));
}
tabsConfiguration.add(visibleOnlyAtOrderMode(advancedAllocationTab))
.add(visibleOnlyAtOrderMode(dashboardTab));
if (isMontecarloVisible) {
tabsConfiguration.add(visibleOnlyAtOrderMode(monteCarloTab));
}
return tabsConfiguration;
}