] menu needs values from current race to calculate/build/set link values in menu
[00:00] NEW task IN PAGE races.js,
x] CREATE new module 'races' in dir '/routes', returns a race object
[00:00] NEW task IN PAGE server.js
x] ADD requires statement to server.js in /routes section
[00:00] NEW task IN home.js
x] ADD var races = requires('./races') to PAGE routes/home(index).js
] CALL races() in pass data to each view, example - races: races()
[00:00] NEW task IN
x] REPLACE existing 'races' object in index.js, move hardcode objects to races module
[2015-06-16] NEW task IN
] add method to get(index)
] this returns a race object, pulled from the given index in the races array
] example prevRace = curRace.get(1) // this will return the 2nd element in the races arrary
] new pass the prevRace object into the view to render, prevRace:prevRace
[00:00] NEW task IN view/index
] use prevRace object to set Results link, race name and track
[00:00] NEW task IN home
] append currentRaceTrack property to menuMain object, to pass in name of raceTrack VS passing entire currentRace object
[00:00] NEW task IN view/index
] use menu.currentRaceTrack property to display track name in section 1] rankings and section 2] selections
] wording on RANKINGS,
[00:00] NEW task IN PAGE rankings module
] # # - PRB using [raceIndex] or [this.raceIndex] wasnt accessing the raceIndex property of the object
] SOL = set var 'raceIndex' outside of the currentRace [] object
[00:00] NEW task IN PAGE home.js
] # # - PRB curRace = curRace.get(3), prevRace= curRace.get(2), seems to return the - might be a node thing - non blocking - asynch
] WORKAROUND = use call to curRace.get(3) in the pass to view page and it works
*] BUT = need the prev race id value to set the results link in the menu
x] TRY = putting the call several lines down in code, seems to work
[00:00] NEW task IN PAGE home.js
] # # - PRB - links arent being
] CREATE# - menuInit function which performs, call menuInit(), then pass the configured/initialized instance { menu:mainMenu } and not {menu:mainMenu()} which
[00:00] NEW task IN
] # # -
[00:00] NEW task IN
] # # - set the currentRace, MANUALLY hard coding the races [] index value
*] # # - currenty using var = currentRaceIndex in function menuInit(), in home.js,
x] make currentRaceIndex global to home.js, move outside of function
x] CHANGE pass data to view, from: menu:menuMain(), to menu:menuMain
*] now using var currentRaceIndex-1 to get previous race lookup in some calls VS prev using string manip on '2015-12'
[00:00] NEW task IN PAGE routes/home.js -> GET view/results
x] # # - PRB - view/results - ERROR
x] remove code that sets previous race, based on current race, prev raceID is passed in url param
x] ADD data - to sample data set, added entries for races 2015-14, 2015-15
x] PRB - view/results
x] TRY = rem code to fill out the selections values
x] CAUSE = missing data entry for race-2015-15 in 'selections',
x] SOL = supply data for all selections entries
[00:00] NEW task IN PAGE view/results
] # # - x] pass in prevRace values as var race, use race. id, race.name, race.track VS prev using 'additional' menu properties
[00:00] NEW task IN PAGE rankings
] # # - ] set race#, race detals text with passed in var, VS hardcoded text
[next]
[00:00] NEW task IN
]
[00:00] NEW task IN
x] REPLACE call to build mainMenu in each app.get/page/:param