From 5af2933d2d0bb5c9a35beea72e687a47c9a75786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Mon, 7 Feb 2022 16:30:44 +0900 Subject: [PATCH] =?UTF-8?q?=E6=89=BF=E7=9F=A5=E6=B8=88=E3=81=BF=E3=81=AE?= =?UTF-8?q?=E3=81=BF=E3=81=AB=E9=80=81=E4=BF=A1=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=8A=E3=82=8A?= =?UTF-8?q?=E3=81=BE=E3=81=99=E3=81=A7=E3=81=97=E3=82=87=E3=81=86=E3=81=8B?= =?UTF-8?q?=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/Http/Controllers/Api/MeetingsController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index 1f42d9c3..f117a216 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -815,8 +815,10 @@ class MeetingsController extends Controller { // 子供達を知らせます。 if (null !== ($fr = FatherRelation::where('father_id', (int)session()->get('fathers')['id'])->get())) { foreach ($fr as $f) { - if (null !== ($child = Child::where('id', $f->child_id)->first())) { - Mail::to($child->email)->send(new MeetingEditNotification(session()->get('fathers')['company'], (int)$meeting_id)); + if (null !== ($meeting = MeetingApprovals::where('meeting_id', (int)$meeting_id)->where('child_id', $f->child_id)->whereNotNull('approval_at')->first())) { + if (null !== ($child = Child::where('id', $f->child_id)->first())) { + Mail::to($child->email)->send(new MeetingEditNotification(session()->get('fathers')['company'], (int)$meeting_id)); + } } } }