Merge remote-tracking branch 'origin/#20-vacation-requests' into #20-vacation-requests

# Conflicts:
#	app/Enums/VacationType.php
#	app/Helpers/Rules/MinimumOneVacationDayRule.php
#	app/Helpers/Rules/PendingVacationRequestInSameRange.php
#	app/Helpers/VacationRequestValidator.php
#	app/Http/Controllers/VacationRequestController.php
#	app/Http/Resources/VacationRequestResource.php
#	app/Models/VacationRequest.php
#	config/sanctum.php
#	database/factories/VacationRequestFactory.php
#	database/migrations/2022_01_26_100039_create_vacation_requests_table.php
#	package-lock.json
#	resources/js/Pages/VacationRequest/Create.vue
#	resources/js/Pages/VacationRequest/Index.vue
#	resources/js/Shared/MainMenu.vue
#	resources/lang/pl.json
#	routes/web.php
This commit is contained in:
Adrian Hopek
2022-02-01 09:21:28 +01:00
4 changed files with 83 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
namespace Toby\Helpers\Rules;
use Closure;
use Toby\Models\VacationRequest;
class UsedVacationDaysInSameRange
{
public function check(VacationRequest $vacationRequest, Closure $next)
{
return $next($vacationRequest);
}
}

View File

@@ -18,15 +18,6 @@ use Toby\Listeners\HandleCreatedVacationRequest;
class EventServiceProvider extends ServiceProvider
{
/**
* TODO: docelowo może osobne klasy + cast z eloquenta, ale to jak zadziała opcja z enumami
* TODO: dopisać brakujące walidatory
* TODO: przyciski pokolorować
* TODO: warunkowo wyświetlać opcje (policy?)
* TODO: tworzenie wniosku po walidacji
* TODO: obliczanie dni urlopu
*/
protected $listen = [
VacationRequestStateChanged::class => [CreateVacationRequestActivity::class],
VacationRequestCreated::class => [HandleCreatedVacationRequest::class],