Release 2.4.0 (#4427)
* button to duplicate old timesheets, even those from lockdown period * bump composer packages * fixes tooltip remains in view #4426 * fix js error if all widgets were removed * allow to open timesheet edit dialog from export listing * css classes for timesheet context menu, so they can be hidden * added flag to force a user to set password upon login * enable lazy-ghost-objects to fix deprecation * change user, username, internal_rate export column labels * helper method to find user by displayname * log improvements and format changes * deactivate broken schema validation
This commit is contained in:
@@ -13,25 +13,20 @@ use Doctrine\Common\Collections\Collection;
|
||||
|
||||
interface ExportableItem
|
||||
{
|
||||
public function getId(): ?int;
|
||||
|
||||
/**
|
||||
* Whether this item was already exported.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isExported(): bool;
|
||||
|
||||
/**
|
||||
* Whether this item should be included in invoices.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isBillable(): bool;
|
||||
|
||||
/**
|
||||
* Returns the named meta field or null.
|
||||
*
|
||||
* @param string $name
|
||||
* @return MetaTableTypeInterface|null
|
||||
*/
|
||||
public function getMetaField(string $name): ?MetaTableTypeInterface;
|
||||
|
||||
@@ -44,8 +39,6 @@ interface ExportableItem
|
||||
|
||||
/**
|
||||
* Returns the amount for this item.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getAmount(): float;
|
||||
|
||||
@@ -83,15 +76,13 @@ interface ExportableItem
|
||||
|
||||
/**
|
||||
* A name representation for this type of item.
|
||||
*
|
||||
* @return string
|
||||
* Example: "timesheet"
|
||||
*/
|
||||
public function getType(): string;
|
||||
|
||||
/**
|
||||
* A name representation for the category of this item.
|
||||
*
|
||||
* @return string
|
||||
* Example: "work"
|
||||
*/
|
||||
public function getCategory(): string;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,8 @@ class Tag
|
||||
use ColorTrait;
|
||||
|
||||
/**
|
||||
* This is ONLY here, so we can count the amount of timesheets.
|
||||
*
|
||||
* @var Collection<Timesheet>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: Timesheet::class, mappedBy: 'tags', fetch: 'EXTRA_LAZY')]
|
||||
@@ -89,26 +91,6 @@ class Tag
|
||||
$this->visible = $visible;
|
||||
}
|
||||
|
||||
public function addTimesheet(Timesheet $timesheet): void
|
||||
{
|
||||
if ($this->timesheets->contains($timesheet)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->timesheets->add($timesheet);
|
||||
$timesheet->addTag($this);
|
||||
}
|
||||
|
||||
public function removeTimesheet(Timesheet $timesheet): void
|
||||
{
|
||||
if (!$this->timesheets->contains($timesheet)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->timesheets->removeElement($timesheet);
|
||||
$timesheet->removeTag($this);
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return $this->getName();
|
||||
|
||||
@@ -411,10 +411,6 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
|
||||
return $this->internalRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
* @return Timesheet
|
||||
*/
|
||||
public function addTag(Tag $tag): Timesheet
|
||||
{
|
||||
if ($this->tags->contains($tag)) {
|
||||
@@ -425,9 +421,6 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*/
|
||||
public function removeTag(Tag $tag): void
|
||||
{
|
||||
if (!$this->tags->contains($tag)) {
|
||||
|
||||
Reference in New Issue
Block a user