#37 - cancel vacation request (#53)

* #37 - cancel vacation request

* #37 - fix

* #37 - fix
This commit is contained in:
Adrian Hopek
2022-02-17 13:31:33 +01:00
committed by GitHub
parent 026dd87a44
commit fae50cb21c
11 changed files with 104 additions and 23 deletions

View File

@@ -5,16 +5,10 @@ declare(strict_types=1);
namespace Toby\Domain\Listeners;
use Toby\Domain\Events\VacationRequestApproved;
use Toby\Domain\VacationTypeConfigRetriever;
use Toby\Infrastructure\Jobs\SendVacationRequestDaysToGoogleCalendar;
class HandleApprovedVacationRequest
{
public function __construct(
protected VacationTypeConfigRetriever $configRetriever,
) {
}
public function handle(VacationRequestApproved $event): void
{
SendVacationRequestDaysToGoogleCalendar::dispatch($event->vacationRequest);

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace Toby\Domain\Listeners;
use Toby\Domain\Events\VacationRequestCancelled;
use Toby\Infrastructure\Jobs\ClearVacationRequestDaysInGoogleCalendar;
class HandleCancelledVacationRequest
{
public function handle(VacationRequestCancelled $event): void
{
ClearVacationRequestDaysInGoogleCalendar::dispatch($event->vacationRequest);
}
}