diff --git a/app/Member/Controllers/MemberResyncController.php b/app/Member/Controllers/MemberResyncController.php new file mode 100644 index 00000000..ef103d5a --- /dev/null +++ b/app/Member/Controllers/MemberResyncController.php @@ -0,0 +1,21 @@ +hasNami) { + app(MemberPullAction::class)->api($settings->login())->member($member->group->nami_id, $member->nami_id)->execute(); + } + + return redirect()->route('member.edit', ['member' => $member])->success('Mitglied aktualisiert'); + } +} diff --git a/resources/js/views/member/VForm.vue b/resources/js/views/member/VForm.vue index 9069eb43..f4f632c3 100644 --- a/resources/js/views/member/VForm.vue +++ b/resources/js/views/member/VForm.vue @@ -267,7 +267,9 @@ export default { ? this.$inertia.post(`/member`, this.inner) : this.$inertia.patch(`/member/${this.inner.id}`, this.inner); }, - resync() {}, + resync() { + this.$inertia.get(`/member/${this.inner.id}/resync`); + }, forceWrite() {}, }, diff --git a/routes/web.php b/routes/web.php index 90964a1f..a79b40f4 100644 --- a/routes/web.php +++ b/routes/web.php @@ -3,6 +3,7 @@ use App\Course\Controllers\CourseController; use App\Http\Controllers\HomeController; use App\Initialize\InitializeController; +use App\Member\Controllers\MemberResyncController; use App\Member\MemberConfirmController; use App\Member\MemberController; use App\Membership\MembershipController; @@ -34,4 +35,5 @@ Route::group(['middleware' => 'auth:web'], function (): void { Route::resource('setting', SettingController::class); Route::resource('member.course', CourseController::class); Route::get('/member/{member}/efz', MemberEfzController::class)->name('efz'); + Route::get('/member/{member}/resync', MemberResyncController::class)->name('member.resync'); });