Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

GroupsBusiness.js 803B

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, "Groups");
  15. group.parent = null;
  16. });
  17. defer.resolve(data);
  18. }, defer.reject);
  19. return defer.promise;
  20. };
  21. return Business;
  22. }]);
  23. })();