Browse Source

Fix duration & HR Activity Role

pull/1/head
Wahyu Ramadhan 2 years ago
parent
commit
67a060971f
  1. 14
      edit-mode/function/humanResource.js
  2. 2
      edit-mode/function/restActivityLink.js

14
edit-mode/function/humanResource.js

@ -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);

2
edit-mode/function/restActivityLink.js

@ -117,7 +117,9 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
});
}
data['sortorder'] = data['target'];
if(!data['rencana_biaya']){
data['duration'] += 1;
}
return gantt.ajax.put({
headers: {
"Content-Type": "application/json",

Loading…
Cancel
Save