#157 - more interactive calendar #162

Merged
kamilniemczycki merged 20 commits from #157-expansion-calendar into main 2022-06-08 11:02:38 +02:00
Showing only changes of commit cd537d1889 - Show all commits

View File

@@ -13,8 +13,8 @@ class CreateVacationRequestRequest extends FormRequest
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.
public function authorize(): bool public function authorize(): bool
{ {
return null === $this->get("user") || return ($this->get("user") === null) ||
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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 || ((int)$this->get("user") === $this->user()->id) ||
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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); $this->user()->can("createOnBehalfOfEmployee", VacationRequest::class);
} }
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
krzysztofrewak commented 2022-06-06 12:25:26 +02:00 (Migrated from github.com)
Review
        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); ```
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
Baakoma commented 2022-06-07 08:45:48 +02:00 (Migrated from github.com)
Review

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.
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
kamilniemczycki commented 2022-06-07 10:52:15 +02:00 (Migrated from github.com)
Review
Restore this version? https://github.com/blumilksoftware/toby/commit/5f02e23f511a4381199f6b9d9e38f6cc4da638c1#diff-0a0b7b715da129fe7e856b493c478b10a56016e20690ffdc592c20239b4a8e7d
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.
Baakoma commented 2022-06-07 10:59:20 +02:00 (Migrated from github.com)
Review

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.