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.

StaffsBusiness.js 781B

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