diff --git a/src/app/groups/group-edit-dialog.controller.js b/src/app/groups/group-edit-dialog.controller.js new file mode 100644 index 0000000..14473ad --- /dev/null +++ b/src/app/groups/group-edit-dialog.controller.js @@ -0,0 +1,38 @@ +module.controller('groups.GroupEditDialogController', [ + '$scope', + '$uibModalInstance', + 'GroupService', + 'Alert', + 'parentScope', + function ($scope, $modalInstance, GroupService, $alert, parentScope) { + $scope.group = {}; + // true if group is being saved. + $scope.isLoading = false; + + /** + * Close dialog + */ + $scope.close = function () { + $modalInstance.close(); + }; + + /** + * Create or updates the user SSO profile. + */ + $scope.save = function () { + $scope.isLoading = true; + GroupService + .create($scope.group) + .then(function (data) { + parentScope.fetch(); + $scope.close(); + }) + .catch(function (error) { + $alert.error(error.error, $scope); + }) + . finally(function () { + $scope.isLoading = false; + }); + } + } +]); diff --git a/src/app/groups/group-edit-dialog.html b/src/app/groups/group-edit-dialog.html new file mode 100644 index 0000000..a914d30 --- /dev/null +++ b/src/app/groups/group-edit-dialog.html @@ -0,0 +1,33 @@ +
+
| User ID | -Handle | -Primary Email | -Name | -User Status | -Email Status | -Created at | -Modified at | -Activation Code | -User Active | -Action | -
|---|---|---|---|---|---|---|---|---|---|---|
| {{user.id}} | -{{user.handle}} | -{{user.email}} | -{{user.firstName}} {{user.lastName}} | -- {{user.statusDesc()}} - - - - | -{{user.emailStatusDesc()}} | -{{user.createdAtLabel()}} | -{{user.modifiedAtLabel()}} | -
- {{user.credential.activationCode}}
-
-
-
-
-
-
-
-
- |
- - - | -
-
-
-
-
-
- Activate
-
-
- Deactivate
-
- |
-
|
- |
- ||||||||||
+ | User ID | +Handle | +Primary Email | +Name | +User Status | +Email Status | +Created at | +Modified at | +Activation Code | +User Active | +Action | +
|---|---|---|---|---|---|---|---|---|---|---|
| {{user.id}} | +{{user.handle}} | +{{user.email}} | +{{user.firstName}} {{user.lastName}} | ++ {{user.statusDesc()}} + + + + | +{{user.emailStatusDesc()}} | +{{user.createdAtLabel()}} | +{{user.modifiedAtLabel()}} | +
+ {{user.credential.activationCode}}
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ Activate
+
+
+ Deactivate
+
+ |
+
|
+ |
+ ||||||||||