diff --git a/app/Helpers/Rules/UsedVacationDaysInSameRange.php b/app/Helpers/Rules/UsedVacationDaysInSameRange.php new file mode 100644 index 0000000..548279f --- /dev/null +++ b/app/Helpers/Rules/UsedVacationDaysInSameRange.php @@ -0,0 +1,16 @@ + [CreateVacationRequestActivity::class], VacationRequestCreated::class => [HandleCreatedVacationRequest::class], diff --git a/composer.lock b/composer.lock index 066cfc9..6871850 100644 --- a/composer.lock +++ b/composer.lock @@ -1422,6 +1422,70 @@ }, "time": "2022-01-12T15:07:43+00:00" }, + { + "name": "laravel/sanctum", + "version": "v2.14.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/sanctum.git", + "reference": "0647a87140c7522e75826cffcadb3ad6e01f71e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/0647a87140c7522e75826cffcadb3ad6e01f71e9", + "reference": "0647a87140c7522e75826cffcadb3ad6e01f71e9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/contracts": "^6.9|^7.0|^8.0|^9.0", + "illuminate/database": "^6.9|^7.0|^8.0|^9.0", + "illuminate/support": "^6.9|^7.0|^8.0|^9.0", + "php": "^7.2|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", + "phpunit/phpunit": "^8.0|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sanctum\\SanctumServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sanctum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.", + "keywords": [ + "auth", + "laravel", + "sanctum" + ], + "support": { + "issues": "https://github.com/laravel/sanctum/issues", + "source": "https://github.com/laravel/sanctum" + }, + "time": "2022-01-12T15:07:43+00:00" + }, { "name": "laravel/serializable-closure", "version": "v1.0.5", diff --git a/tests/Feature/UserTest.php b/tests/Feature/UserTest.php index 081e6fe..df2bffb 100644 --- a/tests/Feature/UserTest.php +++ b/tests/Feature/UserTest.php @@ -9,6 +9,7 @@ use Illuminate\Support\Carbon; use Inertia\Testing\AssertableInertia as Assert; use Tests\FeatureTestCase; use Toby\Enums\EmploymentForm; +use Toby\Enums\Role; use Toby\Models\User; class UserTest extends FeatureTestCase @@ -87,6 +88,7 @@ class UserTest extends FeatureTestCase ->post("/users", [ "firstName" => "John", "lastName" => "Doe", + "role" => Role::EMPLOYEE->value, "email" => "john.doe@example.com", "employmentForm" => EmploymentForm::B2B_CONTRACT->value, "employmentDate" => Carbon::now()->toDateString(), @@ -122,6 +124,7 @@ class UserTest extends FeatureTestCase "firstName" => "John", "lastName" => "Doe", "email" => "john.doe@example.com", + "role" => Role::EMPLOYEE->value, "employmentForm" => EmploymentForm::B2B_CONTRACT->value, "employmentDate" => Carbon::now()->toDateString(), ])