Skip to content

Commit

Permalink
#503 - fix calendar (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baakoma authored Oct 31, 2024
1 parent 9eed64a commit 59984cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/OvertimeTimesheetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __invoke(?string $month = null): BinaryFileResponse
$this->authorize("manageRequestsAsAdministrativeApprover");

$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
? Carbon::createFromFormat("m-Y", $month)
? Carbon::createFromFormat("d-m-Y", "01-$month")
: Carbon::now();

$users = User::query()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/TimesheetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __invoke(VacationTypeConfigRetriever $configRetriever, ?string $
$this->authorize("manageRequestsAsAdministrativeApprover");

$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
? Carbon::createFromFormat("m-Y", $month)
? Carbon::createFromFormat("d-m-Y", "01-$month")
: Carbon::now();

$users = User::query()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/VacationCalendarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function index(
?string $month = null,
): Response|RedirectResponse {
$month = Carbon::canBeCreatedFromFormat($month, "m-Y")
? Carbon::createFromFormat("m-Y", $month)
? Carbon::createFromFormat("d-m-Y", "01-$month")
: Carbon::now();

/** @var User $currentUser */
Expand Down

0 comments on commit 59984cb

Please sign in to comment.