task

v-005-002

races module

[previously]

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

[next]

  1. [00:00] NEW task IN
    1. ]

 


  1. [00:00] NEW task IN
    1. x] REPLACE call to build mainMenu in each app.get/page/:param
  2. [00:00] NEW task IN
    1. x] # # - deprecate 'home.js(index) versions -v-001, -v-002, -v-003
    2. x] # # - deprecate 'entrants.js' -v-001, -v-002, -v-003 - module create
  3. [00:00] NEW task IN
    1. x] # # - remove greenspace - aka previous code - like the menu object, build menu function, calls to build menu, ... x] TEST = pass
  4. [00:00] NEW task IN
    1. ]
  5. ] # # - update menu - get current race is currently hardcoded B/C functions getCurrentRace are in index.js
    1. ] function

 

Details Photos Edit more

Details

ID: 5294

NAME: 4800-v-005-002

DESCRIPTION: PAGE ] modularize race code in app

START DATE TIME: 2015-06-15 19:06:40

EST DURATION: 01:00:00

END DATE TIME: 2015-06-15 20:06:40

STATUS: In-Process

PRIORITY: -5

OWNER ID: 75

Content Photos Edit more

photos

photos for this task

actions

Agenda Email task SMS task Priorities