|
@@ -147,9 +147,11 @@ class ProjectController extends Controller
|
|
'whitelist' => $request->whitelist ? sprintf(",%s", implode(',', $request->whitelist)) : null,
|
|
'whitelist' => $request->whitelist ? sprintf(",%s", implode(',', $request->whitelist)) : null,
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
+ $changes = ModelChangeDetector::detector(ActionObjectType::PROJECT, $project);
|
|
|
|
+
|
|
$project->save();
|
|
$project->save();
|
|
|
|
|
|
- ActionRepository::createByProject($project, ObjectAction::EDITED);
|
|
|
|
|
|
+ ActionRepository::createByProject($project, ObjectAction::EDITED, objectChanges: $changes);
|
|
|
|
|
|
if ($request->has("assets")) {
|
|
if ($request->has("assets")) {
|
|
ProjectAsset::where('project_id', $project->id)->delete();
|
|
ProjectAsset::where('project_id', $project->id)->delete();
|
|
@@ -195,9 +197,12 @@ class ProjectController extends Controller
|
|
$project = Project::findOrFail($id);
|
|
$project = Project::findOrFail($id);
|
|
|
|
|
|
$project->status = ProjectStatus::CLOSED->value;
|
|
$project->status = ProjectStatus::CLOSED->value;
|
|
|
|
+ $changes = ModelChangeDetector::detector(ActionObjectType::PROJECT, $project);
|
|
$project->save();
|
|
$project->save();
|
|
|
|
|
|
- ActionRepository::createByProject($project, ObjectAction::CLOSED, $request->get("comment"));
|
|
|
|
|
|
+ ActionRepository::createByProject(
|
|
|
|
+ $project, ObjectAction::CLOSED, $request->get("comment"), objectChanges: $changes
|
|
|
|
+ );
|
|
|
|
|
|
return $this->noContent();
|
|
return $this->noContent();
|
|
}
|
|
}
|
|
@@ -225,9 +230,12 @@ class ProjectController extends Controller
|
|
$project = Project::findOrFail($id);
|
|
$project = Project::findOrFail($id);
|
|
|
|
|
|
$project->status = ProjectStatus::PAUSE->value;
|
|
$project->status = ProjectStatus::PAUSE->value;
|
|
|
|
+ $changes = ModelChangeDetector::detector(ActionObjectType::PROJECT, $project);
|
|
$project->save();
|
|
$project->save();
|
|
|
|
|
|
- ActionRepository::createByProject($project, ObjectAction::PAUSED, $request->get("comment"));
|
|
|
|
|
|
+ ActionRepository::createByProject(
|
|
|
|
+ $project, ObjectAction::PAUSED, $request->get("comment"), objectChanges: $changes
|
|
|
|
+ );
|
|
|
|
|
|
return $this->noContent();
|
|
return $this->noContent();
|
|
}
|
|
}
|
|
@@ -246,9 +254,12 @@ class ProjectController extends Controller
|
|
$project->fill($request->only([
|
|
$project->fill($request->only([
|
|
'begin', 'end'
|
|
'begin', 'end'
|
|
]));
|
|
]));
|
|
|
|
+ $changes = ModelChangeDetector::detector(ActionObjectType::PROJECT, $project);
|
|
$project->save();
|
|
$project->save();
|
|
|
|
|
|
- ActionRepository::createByProject($project, ObjectAction::DELAY, $request->get("comment"));
|
|
|
|
|
|
+ ActionRepository::createByProject(
|
|
|
|
+ $project, ObjectAction::DELAY, $request->get("comment"), objectChanges: $changes
|
|
|
|
+ );
|
|
|
|
|
|
return $this->noContent();
|
|
return $this->noContent();
|
|
}
|
|
}
|