Rename Subscription components

This commit is contained in:
philipp lang 2022-02-12 14:28:03 +01:00
parent f88dadc417
commit bf3406b9e0
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ class SubscriptionController extends Controller
session()->put('menu', 'subscription');
session()->put('title', 'Beiträge');
return \Inertia::render('subscription/Index', [
return \Inertia::render('subscription/SubscriptionIndex', [
'data' => SubscriptionResource::collection(Subscription::get()),
'toolbar' => [ ['href' => route('subscription.create'), 'label' => 'Beitrag anlegen', 'color' => 'primary', 'icon' => 'plus'] ],
]);
@ -26,7 +26,7 @@ class SubscriptionController extends Controller
session()->put('menu', 'subscription');
session()->put('title', 'Beitrag erstellen');
return \Inertia::render('subscription/Form', [
return \Inertia::render('subscription/SubscriptionForm', [
'fees' => Fee::pluck('name', 'id'),
'mode' => 'create',
'data' => (object) []
@ -49,7 +49,7 @@ class SubscriptionController extends Controller
session()->put('menu', 'subscription');
session()->put('title', "Beitrag {$subscription->name} bearbeiten");
return \Inertia::render('subscription/Form', [
return \Inertia::render('subscription/SubscriptionForm', [
'fees' => Fee::pluck('name', 'id'),
'mode' => 'edit',
'data' => new SubscriptionResource($subscription),

View File

@ -8,7 +8,7 @@
<div class="px-6 py-3 border-gray-600 border-b"></div>
</header>
<div v-for="sub, index in data" class="text-gray-200 transition-all duration-300 rounded flex items-center hover:bg-gray-800">
<div v-for="sub, index in data" class="text-gray-200 transition-all duration-300 rounded flex items-center hover:bg-gray-800" :key="index">
<div class="py-1 px-6" v-text="sub.name"></div>
<div class="py-1 px-6" v-text="sub.amount_human"></div>
<div class="py-1 px-6" v-text="sub.fee_name"></div>