|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
|
|
use DateTime; |
|
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
use App\Models\Project; |
|
|
|
|
use App\Models\UserToProyek; |
|
|
|
@ -349,7 +350,16 @@ class ProjectController extends Controller
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static function setSyncDate($activity_id, $activity, $report) { |
|
|
|
|
$status = AssignMaterial::select('status_activity')->where('activity_id', $activity_id)->first(); |
|
|
|
|
$status = AssignMaterial::where('activity_id', $activity_id)->first(); |
|
|
|
|
if (!isset($status)) { |
|
|
|
|
$reports = array( |
|
|
|
|
'activity_id' => $activity_id, |
|
|
|
|
'min_date' => new DateTime($activity->start_date), |
|
|
|
|
'max_date' => new DateTime($activity->end_date), |
|
|
|
|
'status' => 'open' |
|
|
|
|
); |
|
|
|
|
return $reports; |
|
|
|
|
} |
|
|
|
|
if (!isset($status->status_activity)) { |
|
|
|
|
$status->status_activity = 'open'; |
|
|
|
|
} |
|
|
|
|