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

@@ -68,6 +68,7 @@ class Activity
// keep the trait include exactly here, for placing the column at the correct position
use RatesTrait;
use ColorTrait;
/**
* @return int

41
src/Entity/ColorTrait.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
trait ColorTrait
{
/**
* @var string
*
* @ORM\Column(name="color", type="string", length=7, nullable=true)
*/
private $color = null;
/**
* @return string
*/
public function getColor(): ?string
{
return $this->color;
}
/**
* @param string $color
* @return self
*/
public function setColor(?string $color = null)
{
$this->color = $color;
return $this;
}
}

View File

@@ -149,6 +149,7 @@ class Customer
// keep the trait include exactly here, for placing the column at the correct position
use RatesTrait;
use ColorTrait;
/**
* @return int

View File

@@ -85,6 +85,7 @@ class Project
// keep the trait include exactly here, for placing the column at the correct position
use RatesTrait;
use ColorTrait;
/**
* @var Timesheet[]