Skip to content

Commit

Permalink
#444 - fix: fixed button and route for generating overtime reports
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Jul 4, 2024
1 parent def12b8 commit df301a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/js/Pages/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,22 @@ function linkVacationRequest(user){
</div>
</div>
<div
v-if="auth.can.manageRequestsAsAdministrativeApprover"
class="flex"
>
<a
v-if="auth.can.manageRequestsAsAdministrativeApprover"
:href="`/vacation/timesheet/${selectedMonth.value}`"
class="block py-3 px-4 ml-3 text-sm font-medium leading-4 text-center text-white bg-blumilk-600 hover:bg-blumilk-700 rounded-md border border-transparent focus:outline-none focus:ring-2 focus:ring-blumilk-500 focus:ring-offset-2 shadow-sm"
>
Pobierz plik Excel
</a>
<a
v-if="auth.can.manageOvertimeAsAdministrativeApprover"
:href="`/overtime/timesheet/${selectedMonth.value}`"
class="block py-3 px-4 ml-3 text-sm font-medium leading-4 text-center text-white bg-blumilk-600 hover:bg-blumilk-700 rounded-md border border-transparent focus:outline-none focus:ring-2 focus:ring-blumilk-500 focus:ring-offset-2 shadow-sm"
>
Pobierz nadgodziny
</a>
</div>
</div>
<div class="overflow-x-auto">
Expand Down
3 changes: 3 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Toby\Http\Controllers\LogoutController;
use Toby\Http\Controllers\MonthlyUsageController;
use Toby\Http\Controllers\OvertimeRequestController;
use Toby\Http\Controllers\OvertimeTimesheetController;
use Toby\Http\Controllers\PermissionController;
use Toby\Http\Controllers\ResumeController;
use Toby\Http\Controllers\SelectYearPeriodController;
Expand Down Expand Up @@ -198,6 +199,8 @@
Route::post("/requests/{overtimeRequest}/accept-as-technical", [OvertimeRequestController::class, "acceptAsTechnical"])
->whereNumber("overtimeRequest")
->name("requests.accept-as-technical");
Route::get("/timesheet/{month}", OvertimeTimesheetController::class)
->name("overtime-timesheet");
});
});

Expand Down

0 comments on commit df301a8

Please sign in to comment.