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