* [perf story #59018] ajax response gantt drag event for validateResources function for gantt wg.
This commit is contained in:
@@ -304,6 +304,26 @@ function validateResources(id)
|
||||
if(type == 'task') itemID = task.id.split("-")[1];
|
||||
if(type == 'plan') itemID = task.id;
|
||||
if(type == 'point') itemID = task.id.split("-")[2];
|
||||
|
||||
let postData = {
|
||||
'id' : itemID,
|
||||
'startDate' : from.toLocaleDateString('en-CA'),
|
||||
'endDate' : to.toLocaleDateString('en-CA'),
|
||||
'type' : type
|
||||
};
|
||||
$.ajax({
|
||||
url: $.createLink('programplan', 'ajaxResponseGanttDragEvent'),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
data: postData,
|
||||
type: "post",
|
||||
success: function(response)
|
||||
{
|
||||
if(response.result == 'fail' && response.message)
|
||||
{
|
||||
zui.Messager.show({content: response.message, type: 'danger-outline', icon: 'exclamation-sign'});
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return flag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user