#157 - more interactive calendar #162
| @@ -13,8 +13,8 @@ class CreateVacationRequestRequest extends FormRequest | ||||
|  | ||||
|  | ||||
|     public function authorize(): bool | ||||
|     { | ||||
|         return null === $this->get("user") || | ||||
|   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. | ||||
|             (int)$this->get("user") === $this->user()->id || | ||||
|   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. | ||||
|         return ($this->get("user") === null) || | ||||
|   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. | ||||
|             ((int)$this->get("user") === $this->user()->id) || | ||||
|   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. | ||||
|             $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class); | ||||
|     } | ||||
|  | ||||
|   | ||||
|   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   ```suggestion
        return ($this->get("user") === null) ||
            ((int)$this->get("user") === $this->user()->id) ||
            $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
```   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods. Honestly, I would prefer to not use form request for things like that (optional GET params,  authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Restore this version? 
 Restore this version?
https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date.   Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date. | ||||
Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.
Honestly, I would prefer to not use form request for things like that (optional GET params, authorization, etc), at least not in a project where it is not standard and we did all authorization inside controller methods.
Restore this version?
5f02e23f51 (diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d)Restore this version?
5f02e23f51 (diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d)Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date.
Yeah, but I'm not sure if you need to find user by id in this case. Just pass user Id from request to Inertia as you did with start date.