ItEr44S13CUMarcarUnidadeTraballoExportableItEr43S18: Added graphical representation for subcontracted tasks.
This commit is contained in:
parent
889ec67ae8
commit
4d563a093e
6 changed files with 35 additions and 3 deletions
|
|
@ -61,7 +61,6 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
private static final Log LOG = LogFactory.getLog(TaskComponent.class);
|
||||
|
||||
private static final int HEIGHT_PER_TASK = 10;
|
||||
private static final String STANDARD_TASK_COLOR = "#007bbe";
|
||||
|
||||
private static Pattern pixelsSpecificationPattern = Pattern
|
||||
.compile("\\s*(\\d+)px\\s*;?\\s*");
|
||||
|
|
@ -183,7 +182,12 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
setHeight(HEIGHT_PER_TASK + "px");
|
||||
setContext("idContextMenuTaskAssignment");
|
||||
this.task = task;
|
||||
setColor(STANDARD_TASK_COLOR);
|
||||
if (task.isSubcontracted()) {
|
||||
setClass("box subcontracted-task");
|
||||
} else {
|
||||
setClass("box standard-task");
|
||||
}
|
||||
|
||||
setId(UUID.randomUUID().toString());
|
||||
this.disabilityConfiguration = disabilityConfiguration;
|
||||
taskViolationListener = new IConstraintViolationListener<Date>() {
|
||||
|
|
@ -206,7 +210,12 @@ public class TaskComponent extends Div implements AfterCompose {
|
|||
}
|
||||
|
||||
protected String calculateClass() {
|
||||
String classText = "box";
|
||||
String classText;
|
||||
if (getSclass().equals("null")) {
|
||||
classText = "box";
|
||||
} else {
|
||||
classText = getSclass();
|
||||
}
|
||||
if (task.isInCriticalPath()) {
|
||||
classText += " critical";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,4 +163,8 @@ public class DefaultFundamentalProperties implements ITaskFundamentalProperties
|
|||
return null;
|
||||
}
|
||||
|
||||
public boolean isSubcontracted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,4 +76,6 @@ public interface ITaskFundamentalProperties {
|
|||
|
||||
public void moveTo(Date date);
|
||||
|
||||
public boolean isSubcontracted();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,4 +296,8 @@ public abstract class Task implements ITaskFundamentalProperties {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isSubcontracted() {
|
||||
return fundamentalProperties.isSubcontracted();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -526,6 +526,11 @@ public class TaskElementAdapter implements ITaskElementAdapter {
|
|||
return deadline.toDateTimeAtStartOfDay().toDate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSubcontracted() {
|
||||
return taskElement.isSubcontracted();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -138,6 +138,14 @@ min-width:200px;
|
|||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.standard-task {
|
||||
background-color: #007bbe;
|
||||
}
|
||||
|
||||
.subcontracted-task {
|
||||
background-color: #AA80D5;
|
||||
}
|
||||
|
||||
/* -------------- Dependencies -------------- */
|
||||
#listdependencies {
|
||||
position: relative;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue