colors for visual grouping of customer, projects and activities (#751)
This commit is contained in:
@@ -67,11 +67,18 @@ class TimesheetEntity
|
||||
$this->project = $entry->getProject()->getName();
|
||||
$this->activity = $entry->getActivity()->getName();
|
||||
|
||||
if (null === $entry->getEnd()) {
|
||||
// TODO move these colors to the controller
|
||||
$this->borderColor = '367fa9'; //'#f39c12';
|
||||
$this->backgroundColor = '#3c8dbc'; //'#f39c12';
|
||||
} else {
|
||||
$color = $entry->getActivity()->getColor();
|
||||
if (empty($color)) {
|
||||
$color = $entry->getProject()->getColor();
|
||||
if (empty($color)) {
|
||||
$color = $entry->getProject()->getCustomer()->getColor();
|
||||
}
|
||||
}
|
||||
|
||||
$this->borderColor = $color;
|
||||
$this->backgroundColor = $color;
|
||||
|
||||
if (null !== $entry->getEnd()) {
|
||||
$this->end = $entry->getEnd();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user