diff --git a/app/Member/Actions/SearchAction.php b/app/Member/Actions/SearchAction.php index 2a2677a0..9bfd9870 100644 --- a/app/Member/Actions/SearchAction.php +++ b/app/Member/Actions/SearchAction.php @@ -5,8 +5,8 @@ namespace App\Member\Actions; use App\Member\FilterScope; use App\Member\Member; use App\Member\MemberResource; -use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\Resources\Json\AnonymousResourceCollection; +use Illuminate\Pagination\LengthAwarePaginator; use Lorisleiva\Actions\ActionRequest; use Lorisleiva\Actions\Concerns\AsAction; @@ -15,14 +15,14 @@ class SearchAction use AsAction; /** - * @return Collection + * @return LengthAwarePaginator */ - public function handle(FilterScope $filter): Collection + public function handle(FilterScope $filter): LengthAwarePaginator { return Member::search($filter->search)->query(fn ($q) => $q->select('*') ->withFilter($filter) ->ordered() - )->get(); + )->paginate(15); } public function asController(ActionRequest $request): AnonymousResourceCollection diff --git a/resources/js/views/member/AgeGroups.vue b/resources/js/components/ui/AgeGroups.vue similarity index 61% rename from resources/js/views/member/AgeGroups.vue rename to resources/js/components/ui/AgeGroups.vue index 438a13d3..6d38af07 100644 --- a/resources/js/views/member/AgeGroups.vue +++ b/resources/js/components/ui/AgeGroups.vue @@ -1,17 +1,7 @@ diff --git a/resources/js/mixins/indexHelpers.js b/resources/js/mixins/indexHelpers.js index d29e800c..3148d654 100644 --- a/resources/js/mixins/indexHelpers.js +++ b/resources/js/mixins/indexHelpers.js @@ -9,10 +9,13 @@ export default { }, computed: { filterString() { - return btoa(encodeURIComponent(JSON.stringify(this.inner.meta.filter))); + return this.toFilterString(this.inner.meta.filter); }, }, methods: { + toFilterString(data) { + return btoa(encodeURIComponent(JSON.stringify(data))); + }, reload(resetPage = true) { var _self = this; var data = { diff --git a/resources/js/views/maildispatcher/MaildispatcherForm.vue b/resources/js/views/maildispatcher/MaildispatcherForm.vue index 0624f898..15a899d0 100644 --- a/resources/js/views/maildispatcher/MaildispatcherForm.vue +++ b/resources/js/views/maildispatcher/MaildispatcherForm.vue @@ -7,31 +7,62 @@
- - + +
- -
-
- - - - - -
-
+ + + + + + + + + + + + + + + + + + + diff --git a/resources/js/views/member/VIndex.vue b/resources/js/views/member/VIndex.vue index fc1ba875..30c5b1b2 100644 --- a/resources/js/views/member/VIndex.vue +++ b/resources/js/views/member/VIndex.vue @@ -71,7 +71,7 @@ - + @@ -92,7 +92,7 @@
- +
@@ -153,9 +153,8 @@ export default { MemberMemberships, MemberPayments, MemberCourses, - 'age-groups': () => import('./AgeGroups.vue'), - 'tags': () => import('./Tags.vue'), - 'actions': () => import('./index/Actions.vue'), + tags: () => import('./Tags.vue'), + actions: () => import('./index/Actions.vue'), }, methods: {