Release 2.32 (#5411)
* bump packages * dynamic invoice options * make sure that invoice previews can be detected * support for mpdf associated files * do not include any future times in work contract calculation * re-add username column in Excel spreadsheet * deactivate internal rate editing * show if plugin update exists * shorten name to Kimai only, without Time-Tracking * remove check for existing id in work contract * fix metafield already defined in search * helper methods to unlock months * new translation * send event on unlock month
This commit is contained in:
@@ -15,7 +15,7 @@ use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
final class InvoiceCreatedEvent extends Event
|
||||
{
|
||||
public function __construct(private Invoice $invoice, private InvoiceModel $model)
|
||||
public function __construct(private readonly Invoice $invoice, private readonly InvoiceModel $model)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ final class InvoiceDocumentsEvent extends Event
|
||||
$this->documents = $documents;
|
||||
}
|
||||
|
||||
/**
|
||||
* @CloudRequired
|
||||
*/
|
||||
public function setMaximumAllowedDocuments(int $max): void
|
||||
{
|
||||
$this->maximum = $max;
|
||||
|
||||
@@ -16,7 +16,11 @@ use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
final class InvoicePreRenderEvent extends Event
|
||||
{
|
||||
public function __construct(private InvoiceModel $model, private InvoiceDocument $document, private RendererInterface $renderer)
|
||||
public function __construct(
|
||||
private readonly InvoiceModel $model,
|
||||
private readonly InvoiceDocument $document,
|
||||
private readonly RendererInterface $renderer
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace App\Event;
|
||||
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* @deprecated since 2.32 - use TranslatorInterface directly
|
||||
*/
|
||||
final class ThemeJavascriptTranslationsEvent extends Event
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -15,13 +15,19 @@ use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
final class WorkingTimeApproveMonthEvent extends Event
|
||||
{
|
||||
public function __construct(private User $user, private Month $month, private \DateTimeInterface $approvalDate, private User $approver)
|
||||
public function __construct(
|
||||
private readonly Month $month,
|
||||
private readonly User $approvedBy
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getMonth()->getUser() instead)
|
||||
*/
|
||||
public function getUser(): User
|
||||
{
|
||||
return $this->user;
|
||||
return $this->getMonth()->getUser();
|
||||
}
|
||||
|
||||
public function getMonth(): Month
|
||||
@@ -29,13 +35,8 @@ final class WorkingTimeApproveMonthEvent extends Event
|
||||
return $this->month;
|
||||
}
|
||||
|
||||
public function getApprovalDate(): \DateTimeInterface
|
||||
public function getApprovedBy(): User
|
||||
{
|
||||
return $this->approvalDate;
|
||||
}
|
||||
|
||||
public function getApprover(): User
|
||||
{
|
||||
return $this->approver;
|
||||
return $this->approvedBy;
|
||||
}
|
||||
}
|
||||
|
||||
34
src/Event/WorkingTimeUnlockMonthEvent.php
Normal file
34
src/Event/WorkingTimeUnlockMonthEvent.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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\Event;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\WorkingTime\Model\Month;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
final class WorkingTimeUnlockMonthEvent extends Event
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Month $month,
|
||||
private readonly User $unlockedBy
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
public function getMonth(): Month
|
||||
{
|
||||
return $this->month;
|
||||
}
|
||||
|
||||
public function getUnlockedBy(): User
|
||||
{
|
||||
return $this->unlockedBy;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user