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.8KB

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