csf
This commit is contained in:
parent
04d036a1ef
commit
17f5823e98
@ -183,8 +183,8 @@ class VacationRequestController extends Controller
|
|||||||
"createOnBehalfOfEmployee" => $request->user()->can("createOnBehalfOfEmployee", VacationRequest::class),
|
"createOnBehalfOfEmployee" => $request->user()->can("createOnBehalfOfEmployee", VacationRequest::class),
|
||||||
"skipFlow" => $request->user()->can("skipFlow", VacationRequest::class),
|
"skipFlow" => $request->user()->can("skipFlow", VacationRequest::class),
|
||||||
],
|
],
|
||||||
"vacationUserId" => $requestData['user'],
|
"vacationUserId" => $requestData["user"],
|
||||||
"vacationFromDate" => $requestData['from_date'],
|
"vacationFromDate" => $requestData["from_date"],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class CreateVacationRequestRequest extends FormRequest
|
|||||||
|
|
||||||
public function authorize(): bool
|
public function authorize(): bool
|
||||||
{
|
{
|
||||||
return is_null($this->get("user")) ||
|
return null === $this->get("user") ||
|
||||||
(int)$this->get("user") === $this->user()->id ||
|
(int)$this->get("user") === $this->user()->id ||
|
||||||
$this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
|
$this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
|
||||||
}
|
}
|
||||||
@ -29,8 +29,8 @@ class CreateVacationRequestRequest extends FormRequest
|
|||||||
public function data(): array
|
public function data(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
"user" => (int)$this->get('user'),
|
"user" => (int)$this->get("user"),
|
||||||
"from_date" => $this->get('from_date'),
|
"from_date" => $this->get("from_date"),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user