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