Merge branch 'backend' of https://github.com/nakazawakan/kikikanri into p_account

このコミットが含まれているのは:
dragon1211 2021-11-16 19:58:37 -08:00
コミット be6e54ec29
3個のファイルの変更24行の追加16行の削除

ファイルの表示

@ -21,7 +21,15 @@ class MeetingApprovalsController extends Controller {
if (null !== ($list = Meeting::select('id')->where('father_id', (int)session()->get('fathers')['id'])->get())) {
foreach ($list as $i => $l) {
$count += MeetingApprovals::where('meeting_id', (int)$l->id)->whereNull('approval_at')->count();
if (null === ($apr = MeetingApprovals::select('id')->where('meeting_id', (int)$l->id)->get())) {
continue;
}
if (count($apr) == MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count()) {
continue;
}
$count++;
}
}

ファイルの表示

@ -317,18 +317,14 @@ class MeetingsController extends Controller {
continue;
}
if (count($l->approvals->toArray()) != MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$l->id)->count()) {
continue;
}
foreach ($l->approvals as $ii => $ll) {
if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) {
$ll->child = new \stdClass();
}
}
if (!in_array($l, $result)) {
$result[] = $l;
}
if (!in_array($l, $result)) {
$result[] = $l;
}
}
@ -355,18 +351,14 @@ class MeetingsController extends Controller {
continue;
}
if (count($l->approvals) == MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count()) {
continue;
}
foreach ($l->approvals as $ii => $ll) {
if (null === ($ll->child = Child::select($child_select)->where('id', (int)$ll->child_id)->first())) {
$ll->child = new \stdClass();
}
}
if (!in_array($l, $result)) {
$result[] = $l;
}
if (!in_array($l, $result)) {
$result[] = $l;
}
}

ファイルの表示

@ -23,7 +23,15 @@ class NoticeIncomplete
if (null !== ($list = Meeting::select('id')->where('father_id', (int)session()->get('fathers')['id'])->get())) {
foreach ($list as $i => $l) {
$count += MeetingApprovals::where('meeting_id', (int)$l->id)->whereNull('approval_at')->count();
if (null === ($apr = MeetingApprovals::select('id')->where('meeting_id', (int)$l->id)->get())) {
continue;
}
if (count($apr) == MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count()) {
continue;
}
$count++;
}
}