LT-117: Remove the user from reviewers of user is logout
This commit is contained in:
parent
2da841bab0
commit
8ee2eaf644
@ -238,6 +238,11 @@ Template.viewer.onCreated(function() {
|
|||||||
// Clear the toolData for this timepoint
|
// Clear the toolData for this timepoint
|
||||||
var imageId = data.timepoints[timepointId].imageId;
|
var imageId = data.timepoints[timepointId].imageId;
|
||||||
removeToolDataWithMeasurementId(imageId, toolType, measurementId);
|
removeToolDataWithMeasurementId(imageId, toolType, measurementId);
|
||||||
|
|
||||||
|
// Set reviewer for this timepoint
|
||||||
|
if (data.timepoints[timepointId].studyInstanceUid) {
|
||||||
|
Meteor.call('setReviewer',data.timepoints[timepointId].studyInstanceUid);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Sync database data with toolData for all the measurements
|
// Sync database data with toolData for all the measurements
|
||||||
|
|||||||
@ -84,15 +84,16 @@ function getReviewerTipText(reviewers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Observe changes on WorklistTabs
|
// Observe changes on WorklistTabs
|
||||||
|
// remove the current user from Reviewers if tab is removed
|
||||||
WorklistTabs.find().observe({
|
WorklistTabs.find().observe({
|
||||||
removed: function(tab) {
|
removed: function(tab) {
|
||||||
var timepointId = tab.timepointId;
|
var contentId = tab.contentid;
|
||||||
if (!timepointId) {
|
var timepointIds = ViewerData[contentId].timepointIds;
|
||||||
return;
|
if (timepointIds.length > 0) {
|
||||||
|
timepointIds.forEach(function(timepointId) {
|
||||||
|
// Remove the current user from Reviewers
|
||||||
|
Meteor.call('removeReviewer', timepointId);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the current user from Reviewers
|
|
||||||
Meteor.call('removeReviewer', timepointId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -45,6 +45,8 @@ Template.userAccountMenu.events({
|
|||||||
$('#serverInformationModal').modal('show');
|
$('#serverInformationModal').modal('show');
|
||||||
},
|
},
|
||||||
'click #logoutButton': function() {
|
'click #logoutButton': function() {
|
||||||
|
// Remove reviewers info for the user
|
||||||
|
Meteor.call('removeUserFromReviewers', Meteor.userId());
|
||||||
Meteor.logout(function() {
|
Meteor.logout(function() {
|
||||||
Router.go('/entrySignIn');
|
Router.go('/entrySignIn');
|
||||||
});
|
});
|
||||||
|
|||||||
@ -12,11 +12,6 @@ syncMeasurementAndToolData = function(measurement) {
|
|||||||
|
|
||||||
// Sync the Cornerstone ToolData with this Measurement's timepoint-specific data
|
// Sync the Cornerstone ToolData with this Measurement's timepoint-specific data
|
||||||
syncTimepointDataWithToolData(measurement, timepointData, imageId, toolType);
|
syncTimepointDataWithToolData(measurement, timepointData, imageId, toolType);
|
||||||
|
|
||||||
// Set reviewer for this timepoint
|
|
||||||
if (measurement.timepoints[key].studyInstanceUid) {
|
|
||||||
Meteor.call('setReviewer',measurement.timepoints[key].studyInstanceUid);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user