Skip to content

UI Things to Know

JSON S edited this page May 14, 2017 · 18 revisions

This page will contain information on how to use the new tree component and remaining tasks for Eureka! UI.

Tree Component

  • There are two Tree components. I had to create two different components, because the phenotypes are saved differently between Cohorts and Phenotypes. Cohorts requires more properties to add and save a Phenotype, then adding and saving a user define Phenotype. The tree used in Cohorts is a directive where the tree component used in the Pheotypes is not a directive, but reused code in the edit and create views.

Tree Component Directive

  • Tree component one is a directive. To use the directive
  • <tree-component current-memeber-list="newCohort.memberList"></tree-component>
  • You will need to pass a value to current-member-list. The value will need to be an array(newCohort.memberList is an empty array). The memberList value is an array that binds to the tree component. The variable will hold the items added to the tree or removed from the tree.
  • The table will render after adding the empty array. Nothing more is needed
  • How to get access to the values that you add or remove from the tree? The values will be automatically binded to the empty array you created in your controller(newCohort.memberList). Memberlist is your handle to do whatever you like with the items added/removed from your tree

Tree Component Phenotypes

  • Tree component two is not a directive. This tree is used in the Phenotypes views(create/edit). The reason behind this was because Cohorts and Phenotypes to save and create take different values
  • The tree component works the same, except it is not packaged in an html tag and to access the values in the tree there is a variable named myList. The myList variable is an array that holds all the values for the tree.
  • This version of the tree component also compensates for dynamic values too used in Sequence and Threshold

Cohorts - Things to know

  • Both edit and create should be working
  • Validation will need to be added

Phenotypes - Things to know

  • All types of Phenotypes for create should be working
  • Edit is not working but code is stubbed out to work like create. The edit data is returning and populating the correct object. The remaining code is to map to the correct fields. Once the mapping is correct the edit will update and save