Conversation
6b8a5d4 to
77a3a72
Compare
|
looks too good.. Will review in some time |
| }) | ||
| ); | ||
|
|
||
| setPools(allTeamsName, allTeams); |
There was a problem hiding this comment.
Yo this will give wrong result when we have already created a pool, submitted and we refresh the page.
We will need to remove the teams which are already in the submitted pools.
Also well need to create the pools that were submitted before.. currently they will not show at all if we refresh after submitting
There was a problem hiding this comment.
Yeah i've fixed this now.
@Joe2k: if tournament is still in Draft, we should be able to edit the pools even after submitting right ?
If yes, maybe we can create the pool matches only when starting the tournament. Thoughts ?
There was a problem hiding this comment.
yep so this is what we were talking in #180
So can you pick those changes also in this PR?
|
|
||
| const [pools, setPools] = createStore({}); | ||
|
|
||
| createEffect(() => { |
There was a problem hiding this comment.
Better to change this to onMount as you want it run only on render
|
Oh just read
Sorry for reviewing before xD |
|
@SibiAkkash Lets try to complete this by Saturday if possible?... Comms will start creating tournament post sat afternoon. So be good to have this before that! |
Thanks @Joe2k yeah ;) this isnt' complete yet. I'll display the submitted pools above the drag drop, and remove them from allTeams list. |
This is a nice to have, IMO. Please don't kill yourselves to finish things for Comms. Deadlines are good, but we don't want to be dead after meeting them! |
no issues punch, shouldn't be a problem |
yup, working on it 👍 |
c867f25 to
0e50a98
Compare
248e1ec to
a153eb1
Compare
| createdPools.push({ | ||
| name: poolName, | ||
| seeding: poolSeeds, | ||
| sequence_number: index + 1 |
There was a problem hiding this comment.
Here index will be with respect to just newly created pools right? But we need to make sure this index is unique with old pools too
There was a problem hiding this comment.
no, while creating the pools store in TournamentManager, i'm adding the previously created pools also
// add previously created pools
for (let { name, initial_seeding } of alreadyCreatedPools) {
let poolTeams = [];
Object.keys(initial_seeding).forEach(seed => {
poolTeams.push({ seed, name: teamsMap()[tournamentSeeding()[seed]] });
});
setPools(name, poolTeams);
}There was a problem hiding this comment.
this is fine right ?
a153eb1 to
ec9c0ef
Compare
- The filter to check for invalid seeds was wrong, corrected this - Lint files with new plugins
ec9c0ef to
a8d8ce8
Compare
c60092f to
f3e9311
Compare
If you update the seeding before submitting pools, the pools get reset to the state from the db.
drag-drop-pools-2023-11-12_14.50.18.mp4
Fixes #166