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.

users.controller.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. angular.module('luticate')
  2. .controller('UsersController', ['$scope', 'luticateAuthUsers',
  3. function($scope, luticateAuthUsers) {
  4. $scope.columns = [
  5. {
  6. name: "Username",
  7. width: 3,
  8. getValue: function(item) {
  9. return item.Username;
  10. }
  11. }, {
  12. name: "Email",
  13. width: 3,
  14. getValue: function(item) {
  15. return item.Email;
  16. }
  17. }, {
  18. name: "Firstname",
  19. width: 3,
  20. getValue: function(item) {
  21. return item.Firstname;
  22. }
  23. }, {
  24. name: "Lastname",
  25. width: 3,
  26. getValue: function(item) {
  27. return item.Lastname;
  28. }
  29. }
  30. ];
  31. $scope.getLoadPagePromise = function(page, perPage, promise)
  32. {
  33. return luticateAuthUsers.getAll({page: page, perPage: perPage}, promise);
  34. };
  35. $scope.getDelPromise = function(id, promise)
  36. {
  37. return luticateAuthUsers.del({user_id: id}, promise);
  38. };
  39. $scope.getEditController = function()
  40. {
  41. return "UserEdit";
  42. };
  43. }]);