csf
This commit is contained in:
		| @@ -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"), | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user