Fix member links

This commit is contained in:
philipp lang 2024-08-28 22:28:12 +02:00
parent 2023011b75
commit 4b73c79139
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ class MemberResource extends JsonResource
'invoiceposition_index' => route('member.invoice-position.index', ['member' => $this->getModel()]),
'course_index' => route('member.course.index', ['member' => $this->getModel()]),
'show' => route('member.show', ['member' => $this->getModel()]),
'edit' => route('member.edit', ['member' => $this->getModel()]),
'update' => route('member.update', ['member' => $this->getModel()]),
],
];
}
@ -155,7 +155,6 @@ class MemberResource extends JsonResource
'members' => Member::ordered()->get()->map(fn ($member) => ['id' => $member->id, 'name' => $member->fullname]),
'links' => [
'index' => route('member.index'),
'create' => route('member.create'),
],
'default_membership_filter' => [
'group_ids' => [],

View File

@ -128,7 +128,8 @@ class ShowTest extends TestCase
->assertJsonPath('data.courses.0.course.short_name', '2e')
->assertJsonPath('data.invoicePositions.0.description', 'uu')
->assertJsonPath('data.invoicePositions.0.price_human', '10,50 €')
->assertJsonPath('data.invoicePositions.0.invoice.status', 'Neu');
->assertJsonPath('data.invoicePositions.0.invoice.status', 'Neu')
->assertJsonPath('data.links.update', route('member.update', ['member' => $member]));
}
public function testItShowsMinimalSingleMember(): void