[WIP] Moving ViewerStudies collection to TypeSafeCollection implementation + Fixing sorting bug in findAllBy method in TypeSafeCollection

This commit is contained in:
Emanuel F. Oliveira committed 2017-01-29 22:11:17 -02:00
1 parent a4e7aa86ab
commit d25141f336
18 files changed
+143 -77

No files matched your search

@@ -1,4 +1,5 @@
import { Template } from 'meteor/templating';
import { OHIF } from 'meteor/ohif:core';
Template.studyTimepoint.onCreated(() => {
const instance = Template.instance();
@@ -39,9 +40,12 @@ Template.studyTimepoint.events({
// Defines where will be the studies searched
let $studiesTarget = instance.$('.studyTimepoint');
// @TypeSafeStudies
debugger;
if (changed.isQuickSwitch) {
// Changes the current quick switch study
const study = ViewerStudies.findOne({
const study = OHIF.viewer.Studies.findBy({
studyInstanceUid: changed.studyInstanceUid
});
instance.data.currentStudy.set(study);