ItEr47S04ValidacionEProbasFuncionaisItEr46S04: Fixed bug related with weekend days not shown on orders without deadlines
This commit is contained in:
parent
2f5c8577ba
commit
ae5dab9070
2 changed files with 16 additions and 8 deletions
|
|
@ -273,7 +273,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
|
|||
appendTabs(chartComponent);
|
||||
|
||||
configuration.setChartComponent(chartComponent);
|
||||
showDeadlineIfExists(orderReloaded, configuration);
|
||||
configureModificators(orderReloaded, configuration);
|
||||
planner.setConfiguration(configuration);
|
||||
|
||||
Timeplot chartLoadTimeplot = new Timeplot();
|
||||
|
|
@ -329,12 +329,14 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
|
|||
return result;
|
||||
}
|
||||
|
||||
private void showDeadlineIfExists(Order orderReloaded,
|
||||
private void configureModificators(Order orderReloaded,
|
||||
PlannerConfiguration<TaskElement> configuration) {
|
||||
if (orderReloaded.getDeadline() != null) {
|
||||
configuration
|
||||
.setSecondLevelModificators(createDeadlineShower(orderReloaded
|
||||
.getDeadline()));
|
||||
configuration.setSecondLevelModificators(SeveralModificators
|
||||
.create(new BankHolidaysMarker(),
|
||||
createDeadlineShower(orderReloaded.getDeadline())));
|
||||
} else {
|
||||
configuration.setSecondLevelModificators(new BankHolidaysMarker());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -349,10 +351,12 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
|
|||
return item;
|
||||
}
|
||||
};
|
||||
return SeveralModificators.create(deadlineMarker,
|
||||
createBankHolidayMarker());
|
||||
return deadlineMarker;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static IDetailItemModificator createBankHolidayMarker() {
|
||||
return new BankHolidaysMarker();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import java.util.List;
|
|||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.navalplanner.business.orders.entities.Order;
|
||||
import org.navalplanner.web.planner.order.BankHolidaysMarker;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
|
@ -33,6 +34,7 @@ import org.springframework.stereotype.Component;
|
|||
import org.zkoss.ganttz.resourceload.ResourcesLoadPanel;
|
||||
import org.zkoss.ganttz.resourceload.ResourcesLoadPanel.IToolbarCommand;
|
||||
import org.zkoss.ganttz.timetracker.TimeTracker;
|
||||
import org.zkoss.ganttz.timetracker.zoom.SeveralModificators;
|
||||
import org.zkoss.zk.ui.util.Composer;
|
||||
|
||||
/**
|
||||
|
|
@ -86,7 +88,9 @@ public class ResourceLoadController implements Composer {
|
|||
private ResourcesLoadPanel buildResourcesLoadPanel() {
|
||||
return new ResourcesLoadPanel(resourceLoadModel.getLoadTimeLines(),
|
||||
new TimeTracker(resourceLoadModel.getViewInterval(),
|
||||
resourceLoadModel.calculateInitialZoomLevel(), parent));
|
||||
resourceLoadModel.calculateInitialZoomLevel(),
|
||||
SeveralModificators.create(), SeveralModificators
|
||||
.create(new BankHolidaysMarker()), parent));
|
||||
}
|
||||
|
||||
public void filterBy(Order order) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue