diff --git a/app/Course/Controllers/CourseController.php b/app/Course/Controllers/CourseController.php
index c6a510df..547dc9fb 100644
--- a/app/Course/Controllers/CourseController.php
+++ b/app/Course/Controllers/CourseController.php
@@ -17,20 +17,20 @@ class CourseController extends Controller
{
$request->persist($member);
- return redirect()->route('member.index');
+ return redirect()->back();
}
public function update(Member $member, CourseMember $course, UpdateRequest $request): RedirectResponse
{
$request->persist($member, $course);
- return redirect()->route('member.index');
+ return redirect()->back();
}
public function destroy(Member $member, CourseMember $course, DestroyRequest $request): RedirectResponse
{
$request->persist($member, $course);
- return redirect()->route('member.index');
+ return redirect()->back();
}
}
diff --git a/app/Course/Resources/CourseResource.php b/app/Course/Resources/CourseResource.php
index 8cf309fa..24c571d8 100644
--- a/app/Course/Resources/CourseResource.php
+++ b/app/Course/Resources/CourseResource.php
@@ -17,11 +17,12 @@ class CourseResource extends JsonResource
{
return [
'id' => $this->id,
- 'organizer' => $this->pivot->organizer,
- 'event_name' => $this->pivot->event_name,
- 'completed_at_human' => Carbon::parse($this->pivot->completed_at)->format('d.m.Y'),
- 'completed_at' => $this->pivot->completed_at,
- 'course_name' => $this->name,
+ 'organizer' => $this->organizer,
+ 'event_name' => $this->event_name,
+ 'completed_at_human' => Carbon::parse($this->completed_at)->format('d.m.Y'),
+ 'completed_at' => $this->completed_at,
+ 'course_name' => $this->course->name,
+ 'course_id' => $this->course->id,
];
}
}
diff --git a/app/Initialize/InitializeController.php b/app/Initialize/InitializeController.php
index a57cfd25..ad5a46a1 100644
--- a/app/Initialize/InitializeController.php
+++ b/app/Initialize/InitializeController.php
@@ -2,8 +2,8 @@
namespace App\Initialize;
-use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
+use Illuminate\Http\Request;
class InitializeController extends Controller
{
@@ -14,6 +14,6 @@ class InitializeController extends Controller
public function store() {
InitializeJob::dispatch(auth()->user());
- return \Inertia::render('Initialize/Index');
+ return redirect()->route('home');
}
}
diff --git a/packages/laravel-nami b/packages/laravel-nami
index d348aea5..d96457dd 160000
--- a/packages/laravel-nami
+++ b/packages/laravel-nami
@@ -1 +1 @@
-Subproject commit d348aea5f6bba6cf3eb8e2050a738817f281b4c3
+Subproject commit d96457dd338857306b6ffb14da5444b8cf08417a
diff --git a/resources/js/views/member/Courses.vue b/resources/js/views/member/Courses.vue
index 69a66c31..28a59020 100644
--- a/resources/js/views/member/Courses.vue
+++ b/resources/js/views/member/Courses.vue
@@ -3,9 +3,10 @@