SNPRC Scheduler project updates#858
Conversation
…fb_scheduler_updates
…fb_scheduler_updates
…fb_scheduler_updates
…fb_scheduler_updates
…fb_scheduler_updates
| "addTimelineItem(timelineId: " + | ||
| timeline.TimelineId + | ||
| ", animalId: " + | ||
| id + |
There was a problem hiding this comment.
What is this id variable? I don't see it declared
There was a problem hiding this comment.
Must have been a copy paste error. Fixed now.
| INNER JOIN ehr.project as ep on p.ReferenceId = ep.project | ||
| INNER JOIN study.assignment as a on ep.protocol = a.protocol | ||
| LEFT JOIN study.deaths as d on d.Id = a.Id | ||
| LEFT JOIN study.departure as dep on dep.Id = a.Id |
There was a problem hiding this comment.
If an animal has multiple departure records, a left join could be bringing back multiple rows for one animal
There was a problem hiding this comment.
Ok got it. I didn't know you guys supported multiple departures. I updated this to grab the most recent departure. Let me know if that's not what you'd want to see.
| export function filterAnimals(pattern) { | ||
| if (verboseOutput) console.log("filterAnimals(" + pattern + ")"); | ||
| return (dispatch) => { | ||
| dispatch(createAction(ANIMAL_LIST_FILTERED, pattern)); |
There was a problem hiding this comment.
ANIMAL_LIST_FILTERED is not a declared const. Possibly missed this one after a name change to the variable?
There was a problem hiding this comment.
this was part of some dead code that is now removed
| // New items must be within the current revision's start/end dates | ||
| if (scheduleDate.before(startDate) || scheduleDate.after(endDate)) | ||
| { | ||
| SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
There was a problem hiding this comment.
This dateFormat is re-instantiated multiple times inside this for loop but can be a single local variable outside the loop
Rationale
Bring SNPRC Scheduler React project up to date with update packages and webpack build.
Changes