diff --git a/backend/app/Http/Controllers/Api/MeetingApprovalsController.php b/backend/app/Http/Controllers/Api/MeetingApprovalsController.php index 3db44210..e9b2b5ca 100644 --- a/backend/app/Http/Controllers/Api/MeetingApprovalsController.php +++ b/backend/app/Http/Controllers/Api/MeetingApprovalsController.php @@ -33,11 +33,11 @@ class MeetingApprovalsController extends Controller { $cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count(); $apr = count($apr); - + if ($apr != 0 && $apr == $cnt) { continue; } - + $count++; } } @@ -96,19 +96,19 @@ class MeetingApprovalsController extends Controller { public function registerApproval (Request $r) { if (!isset($r->meeting_id) || !isset(session()->get('children')['id'])) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } if (null === (MeetingApprovals::where('meeting_id', (int)$r->meeting_id)->where('child_id', (int)session()->get('children')['id'])->first())) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } if (null === ($meet = Meeting::where('id', (int)$r->meeting_id)->first())) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } if (null === ($father = Father::where('id', (int)$meet->father_id)->first())) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } // $update = ['approval_at' => null]; @@ -120,22 +120,22 @@ class MeetingApprovalsController extends Controller { } catch (\Throwable $e) { // 失敗 Log::critical($e->getMessage()); - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } - return ['status_code' => 200, 'success_messages' => ['承認しました。']]; + return ['status_code' => 200, 'success_messages' => ['承知しました。']]; } public function listChildrenOfMeeting (Request $r) { if (!isset($r->meeting_id) || !isset($r->child_id)) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } $meeting_approvals_select = ['id', 'child_id', 'approval_at']; $update = ['hire_at' => date('Y-m-d H:i:s', strtotime($r->hire_at))]; if (null === ($params = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$r->meeting_id)->where('child_id', (int)$r->child_id)->get())) { - return ['status_code' => 400, 'error_messages' => ['承認に失敗しました。']]; + return ['status_code' => 400, 'error_messages' => ['承知に失敗しました。']]; } try { @@ -146,7 +146,7 @@ class MeetingApprovalsController extends Controller { return ['status_code' => 400, 'error_messages' => ['登録に失敗しました。']]; } - return ['status_code' => 200, 'success_messages' => ['承認しました。']]; + return ['status_code' => 200, 'success_messages' => ['承知しました。']]; } public function listChildrenOfApprovel (Request $r) { diff --git a/backend/resources/js/child/meeting/detail.jsx b/backend/resources/js/child/meeting/detail.jsx index ad8f8c9d..4fb18cb4 100644 --- a/backend/resources/js/child/meeting/detail.jsx +++ b/backend/resources/js/child/meeting/detail.jsx @@ -122,7 +122,7 @@ const ChildMeetingDetail = () => {