edit-task
Home
Up
Delete
Task Name:
Task Description:
PAGE ] modularize race code in app
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">v-005-002</h1> <h2 style="text-align: center;">races module</h2> <h2>[previously]</h2> <ol> <li><strong>[2015-06-14] NEW task IN outline</strong></li> <ol> <li>i] # # -</li> <li>] menu needs values from current race to calculate/build/set link values in menu</li> </ol> <li><strong>[00:00] NEW task IN PAGE races.js, </strong></li> <ol> <li>x] CREATE new module 'races' in dir '/routes', returns a race object</li> </ol> <li><strong>[00:00] NEW task IN PAGE server.js</strong></li> <ol> <li>x] ADD requires statement to server.js in /routes section</li> </ol> <li><strong>[00:00] NEW task IN home.js</strong></li> <ol> <li>x] ADD var races = requires('./races') to PAGE routes/home(index).js</li> <li>] CALL races() in pass data to each view, example - races: races() </li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] REPLACE existing 'races' object in index.js, move hardcode objects to races module</li> </ol> <li><strong>[2015-06-16] NEW task IN</strong></li> <ol> <li>] add method to get(index)</li> <li>] this returns a race object, pulled from the given index in the races array</li> <li>] example prevRace = curRace.get(1) // this will return the 2nd element in the races arrary</li> <li>] new pass the prevRace object into the view to render, prevRace:prevRace</li> </ol> <li><strong>[00:00] NEW task IN view/index</strong></li> <ol> <li>] use prevRace object to set Results link, race name and track</li> </ol> <li><strong>[00:00] NEW task IN home</strong></li> <ol> <li>] append currentRaceTrack property to menuMain object, to pass in name of raceTrack VS passing entire currentRace object</li> </ol> <li><strong>[00:00] NEW task IN view/index</strong></li> <ol> <li>] use menu.currentRaceTrack property to display track name in section 1] rankings and section 2] selections</li> <li>] wording on RANKINGS,</li> </ol> <li><strong>[00:00] NEW task IN PAGE rankings module</strong></li> <ol> <li>] # # - PRB using [raceIndex] or [this.raceIndex] wasnt accessing the raceIndex property of the object</li> <li>] SOL = set var 'raceIndex' outside of the currentRace [] object</li> </ol> <li><strong>[00:00] NEW task IN PAGE home.js</strong></li> <ol> <li>] # # - PRB curRace = curRace.get(3), prevRace= curRace.get(2), seems to return the - might be a node thing - non blocking - asynch</li> <li>] WORKAROUND = use call to curRace.get(3) in the pass to view page and it works</li> <li>*] BUT = need the prev race id value to set the results link in the menu</li> <li>x] TRY = putting the call several lines down in code, seems to work </li> </ol> <li><strong>[00:00] NEW task IN PAGE home.js</strong></li> <ol> <li>] # # - PRB - links arent being</li> <li>] CREATE# - menuInit function which performs, call menuInit(), then pass the configured/initialized instance { menu:mainMenu } and not {menu:mainMenu()} which</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>] # # -</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>] # # - set the currentRace, MANUALLY hard coding the races [] index value</li> <li>*] # # - currenty using var = currentRaceIndex in function menuInit(), in home.js,</li> <li>x] make currentRaceIndex global to home.js, move outside of function</li> <li>x] CHANGE pass data to view, from: menu:menuMain(), to menu:menuMain</li> <li>*] now using var currentRaceIndex-1 to get previous race lookup in some calls VS prev using string manip on '2015-12'</li> </ol> <li><strong>[00:00] NEW task IN PAGE routes/home.js -> GET view/results</strong></li> <ol> <li>x] # # - PRB - view/results - ERROR</li> <li>x] remove code that sets previous race, based on current race, prev raceID is passed in url param</li> <li>x] ADD data - to sample data set, added entries for races 2015-14, 2015-15</li> <li>x] PRB - view/results</li> <li>x] TRY = rem code to fill out the selections values</li> <li>x] CAUSE = missing data entry for race-2015-15 in 'selections',</li> <li>x] SOL = supply data for all selections entries</li> </ol> <li><strong>[00:00] NEW task IN PAGE view/results</strong></li> <ol> <li>] # # - x] pass in prevRace values as var race, use race. id, race.name, race.track VS prev using 'additional' menu properties</li> </ol> <li><strong>[00:00] NEW task IN PAGE rankings</strong></li> <ol> <li>] # # - ] set race#, race detals text with passed in var, VS hardcoded text</li> </ol></ol> <h2>[next]</h2> <ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>]</li> </ol></ol> <p> </p> <hr /><ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] REPLACE call to build mainMenu in each app.get/page/:param</li> </ol> <li><strong>[00:00] NEW task IN</strong></li> <ol> <li>x] # # - deprecate 'home.js(index) versions -v-001, -v-002, -v-003</li> <li>x] # # - deprecate 'entrants.js' -v-001, -v-002, -v-003 - module create</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>x] # # - remove greenspace - aka previous code - like the menu object, build menu function, calls to build menu, ... x] TEST = pass</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>]</li> </ol> <li>] # # - update menu - get current race is currently hardcoded B/C functions getCurrentRace are in index.js</li> <ol> <li>] function</li> </ol></ol> <p> </p>