craigkai / volleyhub

Management software for 716 Volleyball!
https://volleyhub.vercel.app
9 stars 1 forks source link

Changing settings, isn't reflected across state #35

Closed craigkai closed 2 months ago

craigkai commented 3 months ago

If you change courts from X -> Y and then click "generate matches" the function will use the X value instead of the Y value.

craigkai commented 2 months ago

Working on this issue.

Some of the problems are around we aren't using $state for attributes on our objects (matches, tournaments, etc) but when we create a form we need to remove the proxy. This can be done using `$state.snapshot (but not in load functions).

Updated tournament attributes to be stateful and seeing that all work, but the reactivity is not fine grained. Should be able to watch only attributes like tournament.courts and update based on that. The idea being we want matches to watch courts, pools , refs and teams and update (clear) when those are changed.