Initial commit
This commit is contained in:
commit
35745a89ec
44 changed files with 3342 additions and 0 deletions
41
client/Accounts/UserMgmt/userMgmt.js
Normal file
41
client/Accounts/UserMgmt/userMgmt.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
|
||||
|
||||
Template.userMgmt.onCreated(function() {
|
||||
this.subscribe("userList");
|
||||
});
|
||||
|
||||
Template.userMgmt.onRendered(function() {
|
||||
|
||||
});
|
||||
|
||||
Template.userMgmt.helpers({
|
||||
userInfo: function() {
|
||||
return Meteor.users.find({});
|
||||
},
|
||||
userName: function() {
|
||||
return this.profile.fullname;
|
||||
},
|
||||
userEmail: function() {
|
||||
return this.emails[0].address;
|
||||
},
|
||||
userRole: function() {
|
||||
return Roles.getRolesForUser( this._id );
|
||||
}
|
||||
});
|
||||
|
||||
Template.userMgmt.events({
|
||||
"click .editUser" (event) {
|
||||
event.preventDefault();
|
||||
let userId = this._id;
|
||||
Session.set("usersId", userId);
|
||||
},
|
||||
"click .deleteUser" (event) {
|
||||
event.preventDefault();
|
||||
let userId = this._id;
|
||||
console.log("Delete called on : " + userId);
|
||||
Session.set("deleteId", userId);
|
||||
Session.set("item", "User");
|
||||
Session.set("view", "Users");
|
||||
Session.set("method", "delete.userFromSys");
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue