opt(users): admin can create maker for user if him already join other maker group

This commit is contained in:
OldHawk
2017-12-13 16:14:58 +08:00
parent 0523d911cc
commit c493b086ca
3 changed files with 21 additions and 2 deletions

View File

@@ -183,6 +183,25 @@
}
};
/**
* alreadyIsFounder
* @param u
* @returns {boolean}
*/
vm.alreadyIsFounder = function (u) {
var is = false;
if (u.makers.length > 0) {
angular.forEach(u.makers, function (m) {
if (m.user === u._id) {
is = true;
}
});
}
return is;
};
/**
* showMakerGroup
* @param evt