fix
This commit is contained in:
parent
140be26159
commit
84fc405314
@ -29,6 +29,7 @@ class ApproveAction
|
||||
protected function notify(VacationRequest $vacationRequest): void
|
||||
{
|
||||
$users = User::query()
|
||||
->where("id", "!=", $vacationRequest->user->id)
|
||||
->whereIn("role", [Role::TechnicalApprover, Role::AdministrativeApprover, Role::Administrator])
|
||||
->get();
|
||||
|
||||
|
@ -29,6 +29,7 @@ class CancelAction
|
||||
protected function notify(VacationRequest $vacationRequest): void
|
||||
{
|
||||
$users = User::query()
|
||||
->where("id", "!=", $vacationRequest->user->id)
|
||||
->whereIn("role", [Role::TechnicalApprover, Role::AdministrativeApprover, Role::Administrator])
|
||||
->get();
|
||||
|
||||
|
@ -26,6 +26,7 @@ class RejectAction
|
||||
protected function notify(VacationRequest $vacationRequest): void
|
||||
{
|
||||
$users = User::query()
|
||||
->where("id", "!=", $vacationRequest->user->id)
|
||||
->whereIn("role", [Role::TechnicalApprover, Role::AdministrativeApprover, Role::Administrator])
|
||||
->get();
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Toby\Eloquent\Scopes;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||
|
||||
class SelectedYearPeriodScope implements Scope
|
||||
{
|
||||
public function __construct(
|
||||
protected YearPeriodRetriever $yearPeriodRetriever,
|
||||
) {}
|
||||
|
||||
public function apply(Builder $builder, Model $model): Builder
|
||||
{
|
||||
return $builder->where("year_period_id", $this->yearPeriodRetriever->selected()->id);
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Toby\Infrastructure\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Toby\Eloquent\Models\User;
|
||||
|
||||
class CreateUserCommand extends Command
|
||||
{
|
||||
protected $signature = "user:create {email : an email for the user}";
|
||||
protected $description = "Creates a user";
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
$email = $this->argument("email");
|
||||
|
||||
User::factory([
|
||||
"email" => $email,
|
||||
])->create();
|
||||
|
||||
$this->info("The user has been created");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user