Merge branch 'backend' of https://github.com/nakazawakan/kikikanri into p_account
このコミットが含まれているのは:
コミット
4ebe219056
|
@ -340,12 +340,17 @@ KIKI承知システムを使って「聞いてない!」「言ってない!
|
|||
}
|
||||
|
||||
$child_select = ['email', 'tel', 'last_name', 'first_name', 'identity', 'image', 'company'];
|
||||
$father_relations_select = ['hire_at'];
|
||||
|
||||
// 親詳細の取得に成功
|
||||
if (null === ($params = Child::select($child_select)->where('id', (int)$child_id)->first())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
if (null === ($params->father_relations = FatherRelation::select($father_relations_select)->where('child_id', (int)$child_id)->first())) {
|
||||
return ['status_code' => 400];
|
||||
}
|
||||
|
||||
return ['status_code' => 200, 'params' => $params];
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class FatherRelationsController extends Controller {
|
|||
|
||||
public function updateHireDate (Request $r, $child_id) {
|
||||
if (!isset($child_id) || !isset($r->father_id) || !isset($r->hire_at)) {
|
||||
return ['status_code' => 400, 'success_messages' => ['子の入社日の更新に失敗しました。']];
|
||||
return ['status_code' => 400, 'error_messages' => ['子の入社日の更新に失敗しました。']];
|
||||
}
|
||||
|
||||
$update = [
|
||||
|
@ -52,7 +52,7 @@ class FatherRelationsController extends Controller {
|
|||
} catch (\Throwable $e) {
|
||||
// 失敗
|
||||
Log::critical($e->getMessage());
|
||||
return ['status_code' => 400, 'success_messages' => ['子の入社日の更新に失敗しました。']];
|
||||
return ['status_code' => 400, 'error_messages' => ['子の入社日の更新に失敗しました。']];
|
||||
}
|
||||
|
||||
return ['status_code' => 200, 'success_messages' => ['子の入社日の更新に成功しました。']];
|
||||
|
@ -60,7 +60,7 @@ class FatherRelationsController extends Controller {
|
|||
|
||||
public function deleteRelationChild ($child_id) {
|
||||
if (!isset($child_id)) {
|
||||
return ['status_code' => 400, 'success_messages' => ['子の削除に失敗しました。']];
|
||||
return ['status_code' => 400, 'error_messages' => ['子の削除に失敗しました。']];
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -68,7 +68,7 @@ class FatherRelationsController extends Controller {
|
|||
} catch (\Throwable $e) {
|
||||
// 失敗
|
||||
Log::critical($e->getMessage());
|
||||
return ['status_code' => 400, 'success_messages' => ['子の削除に失敗しました。']];
|
||||
return ['status_code' => 400, 'error_messages' => ['子の削除に失敗しました。']];
|
||||
}
|
||||
|
||||
return ['status_code' => 200, 'success_messages' => ['子の削除に成功しました。']];
|
||||
|
|
新しいイシューから参照