@ -42,6 +42,8 @@ class UserToActivityController extends Controller
"activity_id" => $request->activity_id,
"activity_id" => $request->activity_id,
"role_proyek_id" => $users_role[$index],
"role_proyek_id" => $users_role[$index],
"proyek_id" => $request->proyek_id,
"proyek_id" => $request->proyek_id,
"start_date" => $request->start_date,
"end_date" => $request->end_date,
"created_by" => $this->currentName,
"created_by" => $this->currentName,
"version_gantt_id" => $request->version_gantt_id
"version_gantt_id" => $request->version_gantt_id
);
);
@ -216,7 +218,7 @@ class UserToActivityController extends Controller
public function datatables(Request $request){
public function datatables(Request $request){
$id_activity = $request->query('idact');
$id_activity = $request->query('idact');
$data = UserToActivity::select("assign_hr_to_activity.id as id", "u.name as user_name", "mrp.name as role_name")
$data = UserToActivity::select("assign_hr_to_activity.id as id", "assign_hr_to_activity.start_date", "assign_hr_to_activity.end_date", "u.name as user_name", "mrp.name as role_name")
->join("m_role_proyek as mrp", "mrp.id", "=", "assign_hr_to_activity.role_proyek_id")
->join("m_role_proyek as mrp", "mrp.id", "=", "assign_hr_to_activity.role_proyek_id")
->join("m_users as u", "u.id", "=", "assign_hr_to_activity.user_id")
->join("m_users as u", "u.id", "=", "assign_hr_to_activity.user_id")