/**
|
* Created by wisestone on 2018-01-04.
|
*/
|
'use strict';
|
|
define(['app'], function (app) {
|
app.factory("Task", ['$http', '$log', '$upload', function ($http, $log, $upload) {
|
return {
|
find : function (conditions) {
|
return $http.post("task/find", conditions).then(function (response) {
|
$log.debug("할일 목록 데이터 : ", response);
|
return response;
|
});
|
},
|
add : function (conditions) {
|
conditions.url = "task/add";
|
return $upload.upload(conditions).then(function (response) {
|
$log.debug("할일 생성 결과 : ", response);
|
return response;
|
});
|
},
|
modify : function (conditions) {
|
conditions.url = "task/modify";
|
return $upload.upload(conditions).then(function (response) {
|
$log.debug("할일 수정 결과 : ", response);
|
return response;
|
});
|
},
|
modifyData : function (conditions) {
|
return $http.post("task/modifyData", conditions).then(function (response) {
|
$log.debug("할일 수정 데이터 : ", response);
|
return response;
|
});
|
},
|
remove : function (conditions) {
|
return $http.post("task/remove", conditions).then(function (response) {
|
$log.debug("할일 삭제 결과 : ", response);
|
return response;
|
});
|
},
|
updateTaskKanBan : function (conditions) {
|
return $http.post("task/updateTaskKanBan", conditions).then(function (response) {
|
$log.debug("칸반보드 업데이트 결과 : ", response);
|
return response;
|
});
|
},
|
excelImport : function (conditions) {
|
conditions.url = "task/excelImport";
|
return $upload.upload(conditions).then(function (response) {
|
$log.debug("할일 Import 결과 : ", response);
|
return response;
|
});
|
}
|
}
|
}
|
])
|
});
|