Bug #1343: Mark closed projects with a special class in the gantt.
This is a step previous to show these kind of tasks in a different way. FEA: ItEr76S04BugFixing
This commit is contained in:
parent
b98926549a
commit
39f1f63935
6 changed files with 33 additions and 0 deletions
|
|
@ -222,6 +222,9 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
cssClass += task.isLimitingAndHasDayAssignments() ? " limiting-assigned "
|
||||
: " limiting-unassigned ";
|
||||
}
|
||||
if (task.belongsClosedProject()) {
|
||||
cssClass += " project-closed ";
|
||||
}
|
||||
return cssClass;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -279,4 +279,9 @@ public class DefaultFundamentalProperties implements ITaskFundamentalProperties
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean belongsClosedProject() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,4 +116,6 @@ public interface ITaskFundamentalProperties {
|
|||
|
||||
boolean isManualAnyAllocation();
|
||||
|
||||
public boolean belongsClosedProject();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -488,4 +488,8 @@ public abstract class Task implements ITaskFundamentalProperties {
|
|||
return fundamentalProperties.isManualAnyAllocation();
|
||||
}
|
||||
|
||||
public boolean belongsClosedProject() {
|
||||
return fundamentalProperties.belongsClosedProject();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -46,6 +47,7 @@ import org.libreplan.business.common.BaseEntity;
|
|||
import org.libreplan.business.common.entities.ProgressType;
|
||||
import org.libreplan.business.orders.entities.Order;
|
||||
import org.libreplan.business.orders.entities.OrderElement;
|
||||
import org.libreplan.business.orders.entities.OrderStatusEnum;
|
||||
import org.libreplan.business.orders.entities.TaskSource;
|
||||
import org.libreplan.business.planner.entities.Dependency.Type;
|
||||
import org.libreplan.business.resources.daos.IResourcesSearcher;
|
||||
|
|
@ -626,6 +628,18 @@ public abstract class TaskElement extends BaseEntity {
|
|||
return "assigned";
|
||||
}
|
||||
|
||||
public Boolean belongsClosedProject() {
|
||||
EnumSet<OrderStatusEnum> CLOSED = EnumSet.of(OrderStatusEnum.CANCELLED,
|
||||
OrderStatusEnum.FINISHED, OrderStatusEnum.STORED);
|
||||
|
||||
Order order = getOrderElement().getOrder();
|
||||
if(CLOSED.contains(order.getState())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract boolean hasLimitedResourceAllocation();
|
||||
|
||||
public void removePredecessorsDayAssignmentsFor(Scenario scenario) {
|
||||
|
|
|
|||
|
|
@ -1130,6 +1130,11 @@ public class TaskElementAdapter {
|
|||
&& ((Task) taskElement).isManualAnyAllocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean belongsClosedProject() {
|
||||
return taskElement.belongsClosedProject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue