このコミットが含まれているのは:
守矢諏訪子 2022-01-08 16:41:49 +09:00
コミット 4da87320c8
1個のファイルの変更6行の追加6行の削除

ファイルの表示

@ -274,7 +274,7 @@ class ChildrenController extends Controller {
return ['status_code' => 400, 'error_messages' => ['画像の更新に失敗しました。']];
}
if (null === ($result = Child::where('first_name', 'LIKE', '%'.$r->keyword.'%')->orWhere('last_name', 'LIKE', '%'.$r->keyword.'%')->orderBy('created_at', 'desc')->get())) {
if (null === ($result = Child::where('first_name', 'LIKE', '%'.$r->keyword.'%')->orWhere('last_name', 'LIKE', '%'.$r->keyword.'%')->orderBy('updated_at', 'desc')->get())) {
// 親一覧の取得に失敗
return ['status_code' => 400];
}
@ -286,7 +286,7 @@ class ChildrenController extends Controller {
public function list () {
$child_select = ['id', 'first_name', 'last_name', 'tel', 'image'];
if (null === ($result = Child::select($child_select)->orderBy('created_at', 'desc')->get())) {
if (null === ($result = Child::select($child_select)->orderBy('updated_at', 'desc')->get())) {
// 親一覧の取得に失敗
return ['status_code' => 400];
}
@ -302,7 +302,7 @@ class ChildrenController extends Controller {
$result = [];
$child_select = ['id', 'image', 'first_name', 'last_name', 'company', 'tel', 'email'];
if (null === ($list = FatherRelation::select('child_id')->where('father_id', (int)$r->father_id)->orderBy('created_at', 'desc')->get())) {
if (null === ($list = FatherRelation::select('child_id')->where('father_id', (int)$r->father_id)->orderBy('updated_at', 'desc')->get())) {
return ['status_code' => 400];
}
@ -319,7 +319,7 @@ class ChildrenController extends Controller {
$result = [];
$child_select = ['id', 'image', 'last_name', 'first_name'];
if (null === ($list = MeetingApprovals::select('child_id')->where('meeting_id', (int)$r->meeting_id)->orderBy('created_at', 'desc')->get())) {
if (null === ($list = MeetingApprovals::select('child_id')->where('meeting_id', (int)$r->meeting_id)->orderBy('updated_at', 'desc')->get())) {
return ['status_code' => 400];
}
@ -341,7 +341,7 @@ class ChildrenController extends Controller {
$child_select = ['id', 'image', 'last_name', 'first_name', 'tel'];
$meeting_approvals_select = ['approval_at'];
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$r->meeting_id)->whereNull('approval_at')->orderBy('created_at', 'desc')->get())) {
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', (int)$r->meeting_id)->whereNull('approval_at')->orderBy('updated_at', 'desc')->get())) {
return ['status_code' => 400];
}
@ -364,7 +364,7 @@ class ChildrenController extends Controller {
$child_select = ['id', 'image', 'last_name', 'first_name', 'tel'];
$meeting_approvals_select = ['approval_at'];
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', $r->meeting_id)->whereNotNull('approval_at')->orderBy('created_at', 'desc')->get())) {
if (null === ($list = MeetingApprovals::select($meeting_approvals_select)->where('meeting_id', $r->meeting_id)->whereNotNull('approval_at')->orderBy('updated_at', 'desc')->get())) {
return ['status_code' => 400];
}