分母が0の場合、ミーティングは完了済みの状態となります。

このコミットが含まれているのは:
守矢諏訪子 2021-11-29 15:14:10 +09:00
コミット 794c528baa
2個のファイルの変更25行の追加19行の削除

ファイルの表示

@ -326,10 +326,19 @@ class MeetingsController extends Controller {
continue;
}
if (count($l->approvals->toArray()) != MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$l->id)->count()) {
$cnt = MeetingApprovals::select('id')->where('meeting_id', (int)$l->id)->count();
$acnt = count($l->approvals->toArray());
if ($acnt != $cnt) {
continue;
}
if ($acnt == 0 && $cnt == 0) {
if (!in_array($l, $result)) {
$result[] = $l;
}
}
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();
@ -364,19 +373,13 @@ class MeetingsController extends Controller {
continue;
}
$cnt = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
$cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
$acnt = count($l->approvals);
if ($acnt != 0 && $acnt == $cnt) {
continue;
}
if ($acnt == 0 && $cnt == 0) {
if (!in_array($l, $result)) {
$result[] = $l;
}
}
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();
@ -547,10 +550,19 @@ class MeetingsController extends Controller {
continue;
}
if (count($l->approvals->toArray()) != MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$l->id)->count()) {
$cnt = MeetingApprovals::select('id')->where('meeting_id', (int)$l->id)->count();
$acnt = count($l->approvals->toArray());
if ($acnt != $cnt) {
continue;
}
if ($acnt == 0 && $cnt == 0) {
if (!in_array($l, $result)) {
$result[] = $l;
}
}
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();
@ -585,19 +597,13 @@ class MeetingsController extends Controller {
continue;
}
$cnt = MeetingApprovals::select($meeting_approvals_select)->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
$cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
$acnt = count($l->approvals);
if ($acnt != 0 && $acnt == $cnt) {
continue;
}
if ($acnt == 0 && $cnt == 0) {
if (!in_array($l, $result)) {
$result[] = $l;
}
}
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();

ファイルの表示

@ -34,11 +34,11 @@ class NoticeIncomplete
$cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
$apr = count($apr);
if ($apr != 0 && $apr == $cnt) {
if ($apr == $cnt) {
continue;
}
$count++;
}
}