Remove toolbars
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b48a10250c
commit
55ef4efe50
|
@ -13,6 +13,9 @@ class CreateAction
|
|||
|
||||
public function handle(): Response
|
||||
{
|
||||
session()->put('menu', 'activity');
|
||||
session()->put('title', 'Tätigkeit erstellen');
|
||||
|
||||
return Inertia::render('activity/VForm', [
|
||||
'meta' => ActivityResource::meta(),
|
||||
'data' => [
|
||||
|
|
|
@ -28,9 +28,6 @@ class IndexAction
|
|||
|
||||
return Inertia::render('activity/VIndex', [
|
||||
'data' => $this->handle($filter),
|
||||
'toolbar' => [
|
||||
['href' => route('activity.create'), 'label' => 'Tätigkeit erstellen', 'color' => 'primary', 'icon' => 'plus'],
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,10 @@ class ActivityResource extends JsonResource
|
|||
return [
|
||||
'subactivities' => SubactivityResource::collectionWithoutMeta(Subactivity::get()),
|
||||
'filter' => ActivityFilterScope::fromRequest(request()->input('filter')),
|
||||
'links' => [
|
||||
'index' => route('activity.index'),
|
||||
'create' => route('activity.create'),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ class MemberView
|
|||
)->paginate(15)),
|
||||
'filterActivities' => Activity::where('is_filterable', true)->pluck('name', 'id'),
|
||||
'filterSubactivities' => Subactivity::where('is_filterable', true)->pluck('name', 'id'),
|
||||
'toolbar' => [['href' => route('member.index'), 'label' => 'Zurück', 'color' => 'primary', 'icon' => 'plus']],
|
||||
'paymentDefaults' => ['nr' => date('Y')],
|
||||
'subscriptions' => Subscription::pluck('name', 'id'),
|
||||
'statuses' => Status::pluck('name', 'id'),
|
||||
|
|
|
@ -26,7 +26,7 @@ class MemberShowAction
|
|||
->load('subscription')
|
||||
->load('courses.course')
|
||||
),
|
||||
'toolbar' => [['href' => route('member.index'), 'label' => 'Zurück', 'color' => 'primary', 'icon' => 'undo']],
|
||||
'meta' => MemberResource::meta(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,6 @@ class MemberController extends Controller
|
|||
session()->put('title', 'Mitglieder');
|
||||
|
||||
$payload = app(MemberView::class)->index($request);
|
||||
$payload['toolbar'] = [
|
||||
['href' => route('member.create'), 'label' => 'Mitglied anlegen', 'color' => 'primary', 'icon' => 'plus'],
|
||||
['href' => route('allpayment.page'), 'label' => 'Rechnungen erstellen', 'color' => 'primary', 'icon' => 'invoice', 'show' => $settings->hasModule('bill')],
|
||||
['href' => route('sendpayment.create'), 'label' => 'Rechnungen versenden', 'color' => 'info', 'icon' => 'envelope', 'show' => $settings->hasModule('bill')],
|
||||
];
|
||||
$payload['billKinds'] = BillKind::forSelect();
|
||||
|
||||
return \Inertia::render('member/VIndex', $payload);
|
||||
|
@ -65,6 +60,7 @@ class MemberController extends Controller
|
|||
'more_ps_at' => null,
|
||||
],
|
||||
'mode' => 'create',
|
||||
'meta' => MemberResource::meta(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -97,6 +93,7 @@ class MemberController extends Controller
|
|||
'data' => new MemberResource($member),
|
||||
'mode' => 'edit',
|
||||
'conflict' => '1' === $request->query('conflict', '0'),
|
||||
'meta' => MemberResource::meta(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,12 @@ class MemberResource extends JsonResource
|
|||
return [
|
||||
'groups' => NestedGroup::cacheForSelect(),
|
||||
'filter' => FilterScope::fromRequest(request()->input('filter', '')),
|
||||
'links' => [
|
||||
'index' => route('member.index'),
|
||||
'create' => route('member.create'),
|
||||
'allpayment' => route('allpayment.page'),
|
||||
'sendpayment' => route('sendpayment.create'),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ class SubscriptionController extends Controller
|
|||
|
||||
return \Inertia::render('subscription/SubscriptionIndex', [
|
||||
'data' => SubscriptionResource::collection(Subscription::get()),
|
||||
'toolbar' => [['href' => route('subscription.create'), 'label' => 'Beitrag anlegen', 'color' => 'primary', 'icon' => 'plus']],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -32,6 +31,7 @@ class SubscriptionController extends Controller
|
|||
'data' => [
|
||||
'children' => [],
|
||||
],
|
||||
'meta' => SubscriptionResource::meta(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,7 @@ class SubscriptionController extends Controller
|
|||
'fees' => Fee::pluck('name', 'id'),
|
||||
'mode' => 'edit',
|
||||
'data' => new SubscriptionResource($subscription),
|
||||
'meta' => SubscriptionResource::meta(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Payment;
|
||||
|
||||
use App\Lib\HasMeta;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
/**
|
||||
|
@ -9,6 +10,8 @@ use Illuminate\Http\Resources\Json\JsonResource;
|
|||
*/
|
||||
class SubscriptionResource extends JsonResource
|
||||
{
|
||||
use HasMeta;
|
||||
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
|
@ -30,4 +33,17 @@ class SubscriptionResource extends JsonResource
|
|||
'for_promise' => $this->for_promise,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function meta(): array
|
||||
{
|
||||
return [
|
||||
'links' => [
|
||||
'index' => route('subscription.index'),
|
||||
'create' => route('subscription.create'),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import VBool from './components/VBool.vue';
|
|||
import Box from './components/Box.vue';
|
||||
import Heading from './components/Heading.vue';
|
||||
import IconButton from './components/Ui/IconButton.vue';
|
||||
import ToolbarButton from './components/Ui/ToolbarButton.vue';
|
||||
import PageLayout from './components/Page/Layout.vue';
|
||||
import AppLayout from './layouts/AppLayout.vue';
|
||||
import VTooltip from 'v-tooltip';
|
||||
|
@ -37,6 +38,7 @@ Vue.component('v-label', VLabel);
|
|||
Vue.component('box', Box);
|
||||
Vue.component('heading', Heading);
|
||||
Vue.component('icon-button', IconButton);
|
||||
Vue.component('toolbar-button', ToolbarButton);
|
||||
Vue.component('page-layout', PageLayout);
|
||||
Vue.component('save-button', () => import(/* webpackChunkName: "form" */ './components/SaveButton'));
|
||||
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
<svg-sprite src="menu" class="text-gray-100 w-5 h-5"></svg-sprite>
|
||||
</a>
|
||||
<span class="text-sm md:text-xl font-semibold text-white leading-none" v-html="$page.props.title"></span>
|
||||
<!--
|
||||
<i-link v-for="(link, index) in filterMenu" :key="index" :href="link.href" class="btn label mr-2" :class="`btn-${link.color}`" v-tooltip="tooltipsVisible ? link.label : ''">
|
||||
<svg-sprite v-show="link.icon" class="w-3 h-3 xl:mr-2" :src="link.icon"></svg-sprite>
|
||||
<span class="hidden xl:inline" v-text="link.label"></span>
|
||||
</i-link>
|
||||
-->
|
||||
<slot name="toolbar"></slot>
|
||||
<div class="flex grow justify-between">
|
||||
<portal-target name="toolbar-left"> </portal-target>
|
||||
<portal-target name="toolbar-right"> </portal-target>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<i-link :href="href" class="btn label mr-2" :class="`btn-${color}`" v-tooltip="menuStore.tooltipsVisible ? $slots.default[0].text : ''">
|
||||
<svg-sprite v-show="icon" class="w-3 h-3 xl:mr-2" :src="icon"></svg-sprite>
|
||||
<span class="hidden xl:inline"><slot></slot></span>
|
||||
</i-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {menuStore} from '../../stores/menuStore.js';
|
||||
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
menuStore: menuStore(),
|
||||
};
|
||||
},
|
||||
props: {
|
||||
href: {},
|
||||
icon: {},
|
||||
color: {},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</toolbar-button>
|
||||
</div>
|
||||
<form id="actionform" class="grow p-3" @submit.prevent="submit">
|
||||
<popup heading="Neue Untertätigkeit" v-if="mode === 'edit' && currentSubactivity !== null" @close="currentSubactivity = null">
|
||||
<subactivity-form class="mt-4" v-if="currentSubactivity" :value="currentSubactivity" @stored="reloadSubactivities" @updated="mergeSubactivity"></subactivity-form>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout page-class="pb-6">
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Tätigkeit erstellen</toolbar-button>
|
||||
</div>
|
||||
<popup heading="Bitte bestätigen" v-if="deleting !== null">
|
||||
<div>
|
||||
<p class="mt-4">Diese Aktivität löschen?</p>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</toolbar-button>
|
||||
</div>
|
||||
<div class="p-3 grid gap-3 this-grid grow">
|
||||
<box heading="Stammdaten" class="area-stamm hidden xl:block">
|
||||
<stamm :inner="inner"></stamm>
|
||||
|
@ -86,6 +89,7 @@ export default {
|
|||
|
||||
props: {
|
||||
data: {},
|
||||
meta: {},
|
||||
},
|
||||
|
||||
components: {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</toolbar-button>
|
||||
</div>
|
||||
<form class="flex grow relative" id="memberedit" @submit.prevent="submit">
|
||||
<save-button form="memberedit"></save-button>
|
||||
<popup heading="Ein Konflikt ist aufgetreten" v-if="conflict === true">
|
||||
|
@ -139,6 +142,7 @@ export default {
|
|||
confessions: {},
|
||||
billKinds: {},
|
||||
conflict: {},
|
||||
meta: {},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<template>
|
||||
<page-layout page-class="pb-6">
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Mitglied anlegen</toolbar-button>
|
||||
<toolbar-button :href="data.meta.links.allpayment" color="primary" icon="invoice" v-if="hasModule('bill')">Rechnungen erstellen</toolbar-button>
|
||||
<toolbar-button :href="data.meta.links.sendpayment" color="info" icon="envelope" v-if="hasModule('bill')">Rechnungen versenden</toolbar-button>
|
||||
</div>
|
||||
<div class="px-6 py-2 flex border-b border-gray-600 items-center space-x-3">
|
||||
<f-text :value="getFilter('search')" @input="setFilter('search', $event)" id="search" name="search" label="Suchen …" size="sm"></f-text>
|
||||
<f-switch v-show="hasModule('bill')" id="ausstand" @input="setFilter('ausstand', $event)" :items="getFilter('ausstand')" label="Nur Ausstände" size="sm"></f-switch>
|
||||
|
@ -117,6 +122,7 @@ import MemberPayments from './MemberPayments.vue';
|
|||
import MemberMemberships from './MemberMemberships.vue';
|
||||
import MemberCourses from './MemberCourses.vue';
|
||||
import indexHelpers from '../../mixins/indexHelpers.js';
|
||||
import hasModule from '../../mixins/hasModule.js';
|
||||
|
||||
export default {
|
||||
data: function () {
|
||||
|
@ -126,7 +132,7 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
mixins: [indexHelpers],
|
||||
mixins: [indexHelpers, hasModule],
|
||||
|
||||
components: {
|
||||
MemberMemberships,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="meta.links.index" color="primary" icon="undo">zurück</toolbar-button>
|
||||
</div>
|
||||
<form id="subedit" class="p-3 grid gap-3" @submit.prevent="submit">
|
||||
<save-button form="subedit"></save-button>
|
||||
<box heading="Beitrag">
|
||||
|
@ -33,7 +36,7 @@
|
|||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
inner: {},
|
||||
inner: {...this.data},
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -41,6 +44,7 @@ export default {
|
|||
data: {},
|
||||
fees: {},
|
||||
mode: {},
|
||||
meta: {},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -48,9 +52,5 @@ export default {
|
|||
this.mode === 'create' ? this.$inertia.post(`/subscription`, this.inner) : this.$inertia.patch(`/subscription/${this.inner.id}`, this.inner);
|
||||
},
|
||||
},
|
||||
|
||||
created() {
|
||||
this.inner = this.data;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<page-layout>
|
||||
<div class="flex" slot="toolbar">
|
||||
<toolbar-button :href="data.meta.links.create" color="primary" icon="plus">Beitrag hinzufügen</toolbar-button>
|
||||
</div>
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
|
@ -8,7 +11,7 @@
|
|||
<th></th>
|
||||
</thead>
|
||||
|
||||
<tr v-for="(subscription, index) in data" :key="index">
|
||||
<tr v-for="(subscription, index) in data.data" :key="index">
|
||||
<td>
|
||||
<div v-text="subscription.name"></div>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue