1+ <div >
2+ <x-slot name =" header" >
3+ <h2 class =" font-semibold text-xl text-gray-800 leading-tight" >
4+ @if (! $menu -> id ) {{ __ (' New' ) } } @endif
5+ {{ __ (' Menu' ) } }
6+ @if ($menu -> id ): {{ $menu -> name } } @endif
7+
8+ </h2 >
9+ </x-slot >
10+ <div class =" max-w-7xl mx-auto py-10 sm:px-6 lg:px-8" >
11+ <x-jet-form-section submit =" updatePermission" >
12+ <x-slot name =" title" >
13+ {{ __ (' Menu' ) } }
14+ </x-slot >
15+
16+ <x-slot name =" description" >
17+ {{ __ (' You can group menus by dottet notation' ) } }
18+
19+ </x-slot >
20+
21+ <x-slot name =" form" >
22+ <div class =" col-span-6 sm:col-span-4" >
23+ <x-jet-label for =" name" value =" {{ __ (' Menu name' ) } }" />
24+ <x-jet-input id =" name" type =" text" class =" mt-1 block w-full" wire:model.debounce.250ms =" menu.name" autocomplete =" name" />
25+ <x-jet-input-error for =" permission.name" class =" mt-2" />
26+ </div >
27+ <div class =" col-span-6 sm:col-span-4" >
28+ <x-jet-label for =" name" value =" {{ __ (' Menu parent' ) } }" />
29+ <select wire:model.defer =" menu.parent_id" id =" parent_id" name =" parent_id" autocomplete =" activity_id" class =" mt-1 block w-full border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm" >
30+ <option value =" 0" >{{ __ (' Choose' ) } } </option >
31+ @foreach ($parents as $id => $name )
32+ <option value =" {{ $id } }" >{{ $name } } </option >
33+ @endforeach
34+ </select >
35+ <x-jet-input-error for =" permission.parent" class =" mt-2" />
36+ </div >
37+ <div class =" col-span-6 sm:col-span-4" >
38+ <x-jet-label for =" route" value =" {{ __ (' Menu links to route ( empty for no link )' ) } }" />
39+ <x-jet-input id =" route" type =" text" class =" mt-1 block w-full" wire:model.defer =" menu.route" autocomplete =" route" />
40+ <x-jet-input-error for =" menu.route" class =" mt-2" />
41+ </div >
42+ </x-slot >
43+ </x-jet-form-section >
44+ <x-jet-section-border />
45+
46+ <x-jet-form-section submit =" updatePermission" >
47+
48+ <x-slot name =" title" >
49+ {{ __ (' Perks' ) } }
50+ </x-slot >
51+
52+ <x-slot name =" description" >
53+ {{ __ (' Perks are additional features ' ) } }
54+ </x-slot >
55+ <x-slot name =" form" >
56+ <div class =" col-span-6 sm:col-span-4" >
57+ <x-jet-label for =" permission" value =" {{ __ (' Permission' ) } }" />
58+ <x-jet-input id =" permission" type =" text" class =" mt-1 block w-full" wire:model.debounce.250ms =" menu.permission" autocomplete =" route" />
59+ </div >
60+ <div class =" col-span-6 sm:col-span-4" >
61+ <x-jet-label for =" icon" value =" {{ __ (' Menu icon' ) } }" />
62+ <x-jet-input id =" icon" type =" text" class =" mt-1 block w-full" wire:model.defer =" menu.icon" autocomplete =" icon" />
63+ <x-jet-input-error for =" menu.icon" class =" mt-2" />
64+ </div >
65+ </x-slot >
66+ <x-slot name =" actions" >
67+ <x-jet-action-message class =" mr-3" on =" saved" >
68+ {{ __ (' Saved.' ) } }
69+ </x-jet-action-message >
70+
71+ <x-jet-button wire:loading.attr =" disabled" >
72+ {{ __ (' Save' ) } }
73+ </x-jet-button >
74+ </x-slot >
75+ </x-jet-form-section >
76+ </div >
77+
78+ </div >
0 commit comments