From 6e1f3f3a0a4787f8de8f110ff4d3018480ae4e8e Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Fri, 24 Nov 2023 13:43:52 +0100 Subject: [PATCH] Add Stammgruppierung to member view --- app/Member/MemberResource.php | 1 + resources/js/views/member/boxes/Stamm.vue | 1 + tests/Feature/Member/ShowTest.php | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/Member/MemberResource.php b/app/Member/MemberResource.php index 57cee234..3f837313 100644 --- a/app/Member/MemberResource.php +++ b/app/Member/MemberResource.php @@ -106,6 +106,7 @@ class MemberResource extends JsonResource 'comment' => $this->comment, 'lat' => $this->lat, 'lon' => $this->lon, + 'group_name' => $this->group->name, 'links' => [ 'membership_index' => route('member.membership.index', ['member' => $this->getModel()]), 'payment_index' => route('member.payment.index', ['member' => $this->getModel()]), diff --git a/resources/js/views/member/boxes/Stamm.vue b/resources/js/views/member/boxes/Stamm.vue index e35c2d7c..ae3e3168 100644 --- a/resources/js/views/member/boxes/Stamm.vue +++ b/resources/js/views/member/boxes/Stamm.vue @@ -7,6 +7,7 @@ + diff --git a/tests/Feature/Member/ShowTest.php b/tests/Feature/Member/ShowTest.php index eff67cce..72f09672 100644 --- a/tests/Feature/Member/ShowTest.php +++ b/tests/Feature/Member/ShowTest.php @@ -30,6 +30,7 @@ class ShowTest extends TestCase $this->withoutExceptionHandling()->login()->loginNami(); $member = Member::factory() ->defaults() + ->for(Group::factory()->name('Stamm Beispiel')) ->has(Membership::factory()->promise(now())->in('€ LeiterIn', 5, 'Jungpfadfinder', 88)->from('2022-11-19')) ->has(Payment::factory()->notPaid()->nr('2019')->subscription('Free', [ new Child('uu', 1000), @@ -78,6 +79,7 @@ class ShowTest extends TestCase $this->assertInertiaHas([ 'birthday_human' => '20.04.1991', 'age' => 14, + 'group_name' => 'Stamm Beispiel', 'full_address' => 'Itterstr 3, 42719 Solingen', 'region' => ['name' => 'NRW'], 'other_country' => 'other',