You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GroupsBusiness.js 793B

12345678910111213141516171819202122232425262728
  1. (function()
  2. {
  3. angular.module('appSdk')
  4. .factory('GroupsBusiness', ['GroupsDataAccess', '$q', 'DataShareBusiness',
  5. function (GroupsDataAccess, $q, DataShareBusiness) {
  6. var Business = {};
  7. Business.getAll = function(promise)
  8. {
  9. var defer = $q.defer();
  10. GroupsDataAccess.getAll(promise).then(function(data)
  11. {
  12. data.forEach(function(group)
  13. {
  14. DataShareBusiness.makeParents(group);
  15. group.parent = null;
  16. });
  17. defer.resolve(data);
  18. }, defer.reject);
  19. return defer.promise;
  20. };
  21. return Business;
  22. }]);
  23. })();