|
|
@ -129,7 +129,7 @@ $(document).ready(function () { |
|
|
|
// console.log("cek item", item)
|
|
|
|
// console.log("cek item", item)
|
|
|
|
return { |
|
|
|
return { |
|
|
|
text: item.name, |
|
|
|
text: item.name, |
|
|
|
id: item.id, |
|
|
|
id: item.id + "|" + item.proyek_role, |
|
|
|
proyek_role: item.proyek_role |
|
|
|
proyek_role: item.proyek_role |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
@ -157,9 +157,15 @@ $(document).ready(function () { |
|
|
|
$('#btn-assign-hr').prop("disabled", true); |
|
|
|
$('#btn-assign-hr').prop("disabled", true); |
|
|
|
|
|
|
|
|
|
|
|
// var formData = new FormData(this);
|
|
|
|
// var formData = new FormData(this);
|
|
|
|
let user_id = $("#select-hr").val(); |
|
|
|
let users = $("#select-hr").val(); |
|
|
|
let user_role = $("#hr_role").val(); |
|
|
|
let user_id = []; |
|
|
|
if (!user_id || user_id < 0) { |
|
|
|
let user_role = []; |
|
|
|
|
|
|
|
users.map((item)=>{ |
|
|
|
|
|
|
|
let text = item.split('|'); |
|
|
|
|
|
|
|
user_id.push(text[0]); |
|
|
|
|
|
|
|
user_role.push(text[1]); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (!users || users < 0) { |
|
|
|
gantt.alert("Please choose user to assign!"); |
|
|
|
gantt.alert("Please choose user to assign!"); |
|
|
|
$('#btn-assign-hr').html('Assign'); |
|
|
|
$('#btn-assign-hr').html('Assign'); |
|
|
|
$('#btn-assign-hr').prop("disabled", false); |
|
|
|
$('#btn-assign-hr').prop("disabled", false); |
|
|
|