mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
added edit permissions
This commit is contained in:
@ -347,10 +347,12 @@ biomed.ClientEditCtrl = function($scope, $routeParams, Clients) {
|
||||
}
|
||||
|
||||
$scope.toggleFrequency = function(frequency, month) {
|
||||
$scope.master.frequencies[frequency][month] =! $scope.master.frequencies[frequency][month];
|
||||
Clients.update({id: $scope.master._id}, $scope.master, function() {
|
||||
updatePms();
|
||||
});
|
||||
if (accountHasPermission('system.edit')) {
|
||||
$scope.master.frequencies[frequency][month] =! $scope.master.frequencies[frequency][month];
|
||||
Clients.update({id: $scope.master._id}, $scope.master, function() {
|
||||
updatePms();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user