Closed roshanr10 closed 6 years ago
This event key was hardcoded for testing purposes.
I'd like to be able to edit it via an info-box like the one on the dashboard, while keeping it amber for consistency. This can be added directly to the template. Just make sure to use the match key as part of the config so it doesn't disappear when loading new data.
Just add a blur event to the <div ... contenteditable="true"></div>
:
This was created for testing.. shouldn't be creating a config
object there. Should just be editing templates.schedule.config
to add whatever properties the template needs. Also, recommend using an {{if}}
statement to verify the config is populated (event matches found) before you try to use the config, as to avoid fatal errors while generating the template.
All of the app is written based around the Handlebars templating engine.
The hook for the schedule template is here. https://github.com/FRCteam4909/The-Green-Alliance/blob/de9fb6e89fbf0a86ef3a926408340bdf683aed50/app/www/index.html#L134
Please copy the style of the dashboard table as found here. https://github.com/FRCteam4909/The-Green-Alliance/blob/de9fb6e89fbf0a86ef3a926408340bdf683aed50/app/www/index.html#L107
Header Row: Blank, Red 1-Y, Blue 1-Y (color coded) Match Row: Time, Red 1-Y, Blue 1-Y (white background)
where Y is equal to matches[0].alliances.red.length
(pass that thru somehow from the api call)... just for the matches with backup bots at higher levels of play and stuff. it'll be either 3 or 4. you can implement the {{each}}
like how the team numbers are in the dashboard currently.
Closing due to unneeded complexity; can just as easily use TBA event data, maybe in future...
Need to implement a way to input event key, add info-box with event handler to the template like the dashboard page.
Once the event key is being passed, it's a matter of simply copying the table design from the dashboard template and revising it slightly to work with the outputted data.
API call are currently fully functional.