マージコンフリクト??
このコミットが含まれているのは:
コミット
659d8e105d
|
@ -33,11 +33,11 @@ class MeetingApprovalsController extends Controller {
|
||||||
|
|
||||||
$cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
|
$cnt = MeetingApprovals::select('id')->whereNotNull('approval_at')->where('meeting_id', (int)$l->id)->count();
|
||||||
$apr = count($apr);
|
$apr = count($apr);
|
||||||
|
|
||||||
if ($apr != 0 && $apr == $cnt) {
|
if ($apr != 0 && $apr == $cnt) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,19 +96,19 @@ class MeetingApprovalsController extends Controller {
|
||||||
|
|
||||||
public function registerApproval (Request $r) {
|
public function registerApproval (Request $r) {
|
||||||
if (!isset($r->meeting_id) || !isset(session()->get('children')['id'])) {
|
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())) {
|
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())) {
|
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())) {
|
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];
|
// $update = ['approval_at' => null];
|
||||||
|
@ -120,22 +120,22 @@ class MeetingApprovalsController extends Controller {
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
// 失敗
|
// 失敗
|
||||||
Log::critical($e->getMessage());
|
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) {
|
public function listChildrenOfMeeting (Request $r) {
|
||||||
if (!isset($r->meeting_id) || !isset($r->child_id)) {
|
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'];
|
$meeting_approvals_select = ['id', 'child_id', 'approval_at'];
|
||||||
$update = ['hire_at' => date('Y-m-d H:i:s', strtotime($r->hire_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())) {
|
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 {
|
try {
|
||||||
|
@ -146,7 +146,7 @@ class MeetingApprovalsController extends Controller {
|
||||||
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 listChildrenOfApprovel (Request $r) {
|
public function listChildrenOfApprovel (Request $r) {
|
||||||
|
|
|
@ -122,7 +122,7 @@ const ChildMeetingDetail = () => {
|
||||||
<div className="p-consent-btn">
|
<div className="p-consent-btn">
|
||||||
<button className="btn-default btn-yellow btn-consent btn-shadow btn-r8 btn-h42"
|
<button className="btn-default btn-yellow btn-consent btn-shadow btn-r8 btn-h42"
|
||||||
onClick={e=>setShowConfirmMoal(true)}>
|
onClick={e=>setShowConfirmMoal(true)}>
|
||||||
<span>承認</span>
|
<span>承知</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ const ParentMeetingDetail = () => {
|
||||||
|
|
||||||
if(isAuthenticate()){
|
if(isAuthenticate()){
|
||||||
setLoaded(false);
|
setLoaded(false);
|
||||||
|
|
||||||
axios.get(`/api/fathers/meetings/detail/${params?.meeting_id}`, {params: { father_id: father_id}})
|
axios.get(`/api/fathers/meetings/detail/${params?.meeting_id}`, {params: { father_id: father_id}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if(isMountedRef.current) return;
|
if(isMountedRef.current) return;
|
||||||
|
@ -94,7 +94,7 @@ const ParentMeetingDetail = () => {
|
||||||
axios.delete(`/api/fathers/meetings/delete/${params?.meeting_id}`)
|
axios.delete(`/api/fathers/meetings/delete/${params?.meeting_id}`)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if(isMountedRef.current) return;
|
if(isMountedRef.current) return;
|
||||||
|
|
||||||
setNotice(response.data.notice);
|
setNotice(response.data.notice);
|
||||||
setSubmitDelete(false);
|
setSubmitDelete(false);
|
||||||
setShowDeleteModal(false);
|
setShowDeleteModal(false);
|
||||||
|
@ -116,7 +116,7 @@ const ParentMeetingDetail = () => {
|
||||||
formdata.append('meeting_id', meetingId);
|
formdata.append('meeting_id', meetingId);
|
||||||
formdata.append('is_favorite', currentFavorite == 1 ? 0 : 1);
|
formdata.append('is_favorite', currentFavorite == 1 ? 0 : 1);
|
||||||
axios.post('/api/fathers/meetings/registerFavorite', formdata)
|
axios.post('/api/fathers/meetings/registerFavorite', formdata)
|
||||||
|
|
||||||
const updatedItem = {
|
const updatedItem = {
|
||||||
...meeting,
|
...meeting,
|
||||||
is_favorite: currentFavorite == 1 ? 0 : 1,
|
is_favorite: currentFavorite == 1 ? 0 : 1,
|
||||||
|
|
新しいイシューから参照