mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
* Added notification for approval request in the group leaders language * Added test for group task meta actions. Added sync when user claims * Added tests for group task actions. Ensured assigned members are synce when added or removed * Fixed approval required toggle * Added support for users with comma in their name * Fixed sync issue when user is approved and reloads the website * Added advance options for group rewards * Added back ticks to group claim message * Fixed disappearing tasks that need approval * Up chat limit to 400 for subbed groups * Fixed line endings * Updated activie subscription check * Added group isSubscribed function * Changed to isAfter
17 lines
577 B
JavaScript
17 lines
577 B
JavaScript
habitrpg.controller('GroupTaskMetaActionsCtrl', ['$scope', 'Shared', 'Tasks', 'User',
|
|
function ($scope, Shared, Tasks, User) {
|
|
$scope.assignedMembers = [];
|
|
$scope.user = User.user;
|
|
|
|
$scope.claim = function () {
|
|
if (!confirm("Are you sure you want to claim this task?")) return;
|
|
Tasks.assignTask($scope.task.id, $scope.user._id);
|
|
$scope.task.group.assignedUsers.push($scope.user._id);
|
|
User.sync();
|
|
};
|
|
|
|
$scope.userIsAssigned = function () {
|
|
return $scope.task.group.assignedUsers.indexOf($scope.user._id) !== -1;
|
|
};
|
|
}]);
|