Sports Team Manager Dashboard
MEAN Day 11 (Mon, Belt Week)
Friday of this week is the MEAN stack belt exam, so we’re going to be doing projects to prepare. Today’s project was kind of cool, and it had and interesting twist.
The assignment was to create a dashboard where sports team manager could keep track of the players, their position (optional) and (here’s the cool part) the ability to update (in real time, with color coding) the status of the player (playing, not playing or undecided). You can then add as many games to track.
I thought the status feature was cool. By clicking on the status button, the player’s status is updated in the database, and angular changes the CSS class of the button based on the status in the database. I did run into some trouble changing the CSS class of the current page link but I found some workarounds by using the window URL and location. But I digress.
Anyway, tomorrow we”ll get into user validations. I better get it right because I’m going to be reusing that code quite a bit this week, especially in the belt exam. My goal is to get it super clean and DRY, so I hope that works out. Stay tuned (I’m sure you can’t wait for the update 😂).
Today’s algorithms were to 1. remove duplicate words without creating a new array. (I wrote a solution using for and while loops but I ran into a problem with consecutive duplicates, but we’ll fix that). 2. Return the value that appears most often in an array. I’m still working on that. My thought is to use a dynamically created key and value for each new value in the array, but I’ll need to get back to it.
That’s it for today. I hope you enjoyed. Happy coding!