123456789101112131415161718192021222324252627 |
- (function()
- {
- angular.module('appSdk')
- .factory('StaffsBusiness', ['StaffsDataAccess', '$q', 'DataShareBusiness', function (StaffsDataAccess, $q, DataShareBusiness) {
-
- var Business = {};
-
- Business.getAll = function(promise)
- {
- var defer = $q.defer();
-
- StaffsDataAccess.getAll(promise).then(function(data)
- {
- data.forEach(function(group)
- {
- DataShareBusiness.makeParents(group);
- group.parent = null;
- });
- defer.resolve(data);
- }, defer.reject);
-
- return defer.promise;
- };
-
- return Business;
- }]);
- })();
|