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