Skip to content

Commit

Permalink
#178 - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EwelinaSkrzypacz committed Oct 11, 2023
1 parent bf4bd9c commit 5718b5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/Infrastructure/Http/Controllers/EquipmentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class EquipmentController extends Controller
*/
public function index(Request $request): RedirectResponse|Response
{
$this->authorize("manageEquipment");
if ($request->user()->cannot("manageEquipment")) {
return redirect()->route("equipment-items.indexForEmployee");
}

$searchQuery = $request->query("search");

Expand Down
3 changes: 2 additions & 1 deletion resources/js/Pages/Equipment/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
CheckIcon,
XMarkIcon,
ChevronUpDownIcon,
ComputerDesktopIcon,
} from '@heroicons/vue/24/solid'
const props = defineProps({
Expand Down Expand Up @@ -362,7 +363,7 @@ watch(form, debounce(() => {
>
<EmptyState class="text-gray-700">
<template #head>
<KeyIcon class="mx-auto w-12 h-12" />
<ComputerDesktopIcon class="mx-auto w-12 h-12" />
</template>
<template #title>
Brak wpisów
Expand Down

0 comments on commit 5718b5b

Please sign in to comment.