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.

groupusers.controller.js 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /**
  2. * Created by robin on 11/2/15.
  3. */
  4. angular.module('luticate')
  5. .controller('GroupUsersController', ['$scope', 'luticateAuthGroups', 'data',
  6. function($scope, luticateAuthGroups, data) {
  7. $scope.group = data;
  8. $scope.luTable = {
  9. columns: [
  10. {
  11. name: "Username",
  12. width: 3,
  13. getValue: function (item) {
  14. return item.Username;
  15. }
  16. }, {
  17. name: "Email",
  18. width: 3,
  19. getValue: function (item) {
  20. return item.Email;
  21. }
  22. }, {
  23. name: "Firstname",
  24. width: 3,
  25. getValue: function (item) {
  26. return item.Firstname;
  27. }
  28. }, {
  29. name: "Lastname",
  30. width: 3,
  31. getValue: function (item) {
  32. return item.Lastname;
  33. }
  34. }
  35. ],
  36. permissions: {
  37. add: 'LU_GROUP_USER_ADD',
  38. del: 'LU_GROUP_USER_DEL'
  39. },
  40. getLoadPagePromise: function (page, perPage, promise) {
  41. return luticateAuthGroups.usersGetAll({
  42. group_id: $scope.group.Id,
  43. page: page,
  44. perPage: perPage
  45. }, promise);
  46. },
  47. getDelPromise: function (id, promise) {
  48. return luticateAuthGroups.usersDel({
  49. group_id: $scope.group.Id,
  50. user_id: id
  51. }, promise);
  52. },
  53. getEditController: function () {
  54. return null;
  55. },
  56. displayItem: function(item, scope)
  57. {
  58. scope.toggleSelectedItem(item);
  59. }
  60. };
  61. }]);