colors for visual grouping of customer, projects and activities (#751)

This commit is contained in:
Kevin Papst
2019-05-04 01:45:52 +02:00
committed by GitHub
parent e92c2d168e
commit 65df1ff909
40 changed files with 523 additions and 124 deletions

View File

@@ -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();
}
}