Fix to show task button

pull/724/head
nchamo 2019-09-08 18:36:07 -03:00
rodzic a5d6384385
commit 07d763d5ce
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -11,18 +11,20 @@ PluginsAPI.Dashboard.addNewTaskButton(
PluginsAPI.Dashboard.addTaskActionButton( PluginsAPI.Dashboard.addTaskActionButton(
["cloudimport/build/TaskView.js"], ["cloudimport/build/TaskView.js"],
function(args, ImportView) { function(args, TaskView) {
var reactElement;
$.ajax({ $.ajax({
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl", url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
dataType: 'json', dataType: 'json',
async: false, async: false,
success: function(data) { success: function(data) {
if (data.folder_url) { if (data.folder_url) {
return React.createElement(ImportView, { reactElement = React.createElement(TaskView, {
folderUrl: data.folder_url, folderUrl: data.folder_url,
}); });
} }
} }
}); });
return reactElement;
} }
); );