enhanced plugin support (#634)

- refactored admin controller and templates
- plugin support for entity actions
- changed column mail to email in customer table
- refactored theme events
This commit is contained in:
Kevin Papst
2019-03-11 14:46:30 +01:00
committed by GitHub
parent 519be2d5a2
commit 3ac72a5c89
104 changed files with 1878 additions and 976 deletions

View File

@@ -13,8 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Activity
*
* @ORM\Table(name="activities")
* @ORM\Entity(repositoryClass="App\Repository\ActivityRepository")
*/
@@ -71,7 +69,7 @@ class Activity
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="fixed_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
@@ -79,7 +77,7 @@ class Activity
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="hourly_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;

View File

@@ -13,8 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Customer
*
* @ORM\Table(name="customers")
* @ORM\Entity(repositoryClass="App\Repository\CustomerRepository")
*/
@@ -130,9 +128,9 @@ class Customer
/**
* @var string
*
* @ORM\Column(name="mail", type="string", length=255, nullable=true)
* @ORM\Column(name="email", type="string", length=255, nullable=true)
*/
private $mail;
private $email;
/**
* @var string
@@ -152,7 +150,7 @@ class Customer
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="fixed_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
@@ -160,7 +158,7 @@ class Customer
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="hourly_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;
@@ -443,9 +441,9 @@ class Customer
* @param string $mail
* @return Customer
*/
public function setMail($mail)
public function setEmail($mail)
{
$this->mail = $mail;
$this->email = $mail;
return $this;
}
@@ -455,9 +453,9 @@ class Customer
*
* @return string
*/
public function getMail()
public function getEmail()
{
return $this->mail;
return $this->email;
}
/**

View File

@@ -13,8 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Project
*
* @ORM\Table(name="projects")
* @ORM\Entity(repositoryClass="App\Repository\ProjectRepository")
*/
@@ -73,7 +71,7 @@ class Project
/**
* @var float
*
* @ORM\Column(name="budget", type="decimal", precision=10, scale=2, nullable=false)
* @ORM\Column(name="budget", type="float", precision=10, scale=2, nullable=false)
* @Assert\NotNull()
*/
private $budget = 0.00;
@@ -88,7 +86,7 @@ class Project
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="fixed_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
@@ -96,7 +94,7 @@ class Project
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="hourly_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;

View File

@@ -13,8 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Timesheet entity.
*
* @ORM\Table(
* name="timesheet",
* indexes={
@@ -109,7 +107,7 @@ class Timesheet
/**
* @var float
*
* @ORM\Column(name="rate", type="decimal", precision=10, scale=2, nullable=false)
* @ORM\Column(name="rate", type="float", precision=10, scale=2, nullable=false)
* @Assert\GreaterThanOrEqual(0)
*/
private $rate = 0.00;
@@ -117,7 +115,7 @@ class Timesheet
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="fixed_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
@@ -125,7 +123,7 @@ class Timesheet
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="decimal", precision=10, scale=2, nullable=true)
* @ORM\Column(name="hourly_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;
@@ -211,7 +209,7 @@ class Timesheet
if (null === $end) {
$this->duration = 0;
$this->rate = 0;
$this->rate = 0.00;
} else {
$this->timezone = $end->getTimezone()->getName();
}
@@ -298,8 +296,6 @@ class Timesheet
}
/**
* Set description
*
* @param string $description
* @return Timesheet
*/
@@ -311,8 +307,6 @@ class Timesheet
}
/**
* Get description
*
* @return string
*/
public function getDescription()
@@ -321,8 +315,6 @@ class Timesheet
}
/**
* Set rate
*
* @param float $rate
* @return Timesheet
*/
@@ -334,8 +326,6 @@ class Timesheet
}
/**
* Get rate
*
* @return float
*/
public function getRate()