Add member create link

This commit is contained in:
philipp lang 2021-06-22 00:14:34 +02:00
parent 1b2f68d0b2
commit 0f27e5d879
2 changed files with 10 additions and 2 deletions

View File

@ -20,7 +20,8 @@ class MemberController extends Controller
session()->put('title', 'Mitglieder'); session()->put('title', 'Mitglieder');
return \Inertia::render('member/Index', [ return \Inertia::render('member/Index', [
'data' => MemberResource::collection(Member::search($request->query('search', null))->with('billKind')->paginate(15)) 'data' => MemberResource::collection(Member::search($request->query('search', null))->with('billKind')->paginate(15)),
'toolbar' => [ ['href' => route('member.create'), 'label' => 'Mitglied anlegen', 'color' => 'primary', 'icon' => 'plus'] ],
]); ]);
} }

View File

@ -11,7 +11,14 @@
<div class="flex-grow ml-56 bg-gray-900 flex flex-col"> <div class="flex-grow ml-56 bg-gray-900 flex flex-col">
<div class="h-16 p-6 flex justify-between items-center border-b border-gray-600"> <div class="h-16 p-6 flex justify-between items-center border-b border-gray-600">
<span class="text-xl font-semibold text-white" v-html="$page.props.title"></span> <div class="flex">
<span class="text-xl font-semibold text-white" v-html="$page.props.title"></span>
<div class="flex ml-4">
<inertia-link v-for="link, index in $page.props.toolbar" :key="index" :href="link.href" v-text="link.label" class="rounded-full leading-none px-3 py-2 text-sm" :class="`bg-${link.color}-800 text-${link.color}-500 hover:text-${link.color}-400 hover:bg-${link.color}-700 transition-all transition-300`">
<sprite :src="link.icon"></sprite>
</inertia-link>
</div>
</div>
<label for="search"> <label for="search">
<input class="shadow-lg bg-gray-800 rounded-lg py-2 px-3 text-gray-300 hover:bg-gray-700 focus:bg-gray-700 placeholder-gray-400" placeholder="Suchen…" name="search" v-model="isearch"></input> <input class="shadow-lg bg-gray-800 rounded-lg py-2 px-3 text-gray-300 hover:bg-gray-700 focus:bg-gray-700 placeholder-gray-400" placeholder="Suchen…" name="search" v-model="isearch"></input>
</label> </label>