Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AstroProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robin VAN DE MERGHEL
AstroProject
Commits
08b5bef2
Commit
08b5bef2
authored
Jul 12, 2024
by
ForkBench
Browse files
Options
Downloads
Patches
Plain Diff
Loading stage and competition in case.
parent
feb06530
Branches
StageToFront
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/public/style.css
+5
-5
5 additions, 5 deletions
frontend/public/style.css
frontend/src/components/Registrations/Registrations.svelte
+40
-7
40 additions, 7 deletions
frontend/src/components/Registrations/Registrations.svelte
with
45 additions
and
12 deletions
frontend/public/style.css
+
5
−
5
View file @
08b5bef2
...
@@ -117,7 +117,7 @@ table {
...
@@ -117,7 +117,7 @@ table {
}
}
th
,
th
,
td
{
.el
{
margin
:
3px
;
margin
:
3px
;
padding-left
:
20px
;
padding-left
:
20px
;
text-align
:
left
;
text-align
:
left
;
...
@@ -128,24 +128,24 @@ tr {
...
@@ -128,24 +128,24 @@ tr {
border-radius
:
20px
;
border-radius
:
20px
;
}
}
td
:
first
-child
,
.
first
,
th
:first-child
{
th
:first-child
{
border-left
:
none
;
border-left
:
none
;
border-top-left-radius
:
20px
;
border-top-left-radius
:
20px
;
border-bottom-left-radius
:
20px
;
border-bottom-left-radius
:
20px
;
}
}
td
:
last
-child
,
.
last
,
th
:last-child
{
th
:last-child
{
border-top-right-radius
:
20px
;
border-top-right-radius
:
20px
;
border-bottom-right-radius
:
20px
;
border-bottom-right-radius
:
20px
;
}
}
tr
:nth-child
(
even
)
{
tr
:nth-child
(
even
)
.el
{
background-color
:
#e9ecef
;
background-color
:
#e9ecef
;
}
}
tr
:nth-child
(
odd
)
{
tr
:nth-child
(
odd
)
.el
{
background-color
:
#dee2e6
;
background-color
:
#dee2e6
;
}
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/components/Registrations/Registrations.svelte
+
40
−
7
View file @
08b5bef2
...
@@ -32,6 +32,21 @@
...
@@ -32,6 +32,21 @@
loadPlayers
();
loadPlayers
();
});
});
// Lod the stage and competition
async
function
loadStageAndCompetition
()
{
if
(
competition
===
undefined
)
{
return
;
}
await
Session
.
GetCompetition
(
competition
.
CompetitionID
).
then
(
(
result
)
=>
{
if
(
result
!==
null
)
{
SelectedCompetition
.
set
(
result
);
}
}
);
}
// Load the players from the selected competition
// Load the players from the selected competition
async
function
loadPlayers
()
{
async
function
loadPlayers
()
{
if
(
competition
===
undefined
)
{
if
(
competition
===
undefined
)
{
...
@@ -193,8 +208,24 @@
...
@@ -193,8 +208,24 @@
>
>
<td>
<td>
<!-- TODO: input checkbox -->
<!-- TODO: input checkbox -->
<!-- <input
type="checkbox"
checked={player.PlayerPresent}
on:change={async () => {
player.PlayerPresent =
!player.PlayerPresent;
if (competition != undefined)
await Session.UpdateCompetitionPlayer(
competition.CompetitionID,
player
).then(() => {
loadPlayers();
});
}}
/> -->
</td>
</td>
<td
<td
class=
"el first"
on:dblclick=
{
async
()
=>
{
on:dblclick=
{
async
()
=>
{
// Show a prompt to the user to change the rank
// Show a prompt to the user to change the rank
let
newRank
=
await
swal
(
{
let
newRank
=
await
swal
(
{
...
@@ -239,6 +270,7 @@
...
@@ -239,6 +270,7 @@
}}
>
{
player
.
PlayerInitialRank
}
</td
}}
>
{
player
.
PlayerInitialRank
}
</td
>
>
<td
<td
class=
"el"
on:dblclick=
{
async
()
=>
{
on:dblclick=
{
async
()
=>
{
// Show a prompt to the user to change the lastname
// Show a prompt to the user to change the lastname
let
newLastname
=
await
swal
(
{
let
newLastname
=
await
swal
(
{
...
@@ -270,6 +302,7 @@
...
@@ -270,6 +302,7 @@
>
{
player
.
PlayerLastname
.
toLocaleUpperCase
()
}
</td
>
{
player
.
PlayerLastname
.
toLocaleUpperCase
()
}
</td
>
>
<td
<td
class=
"el"
on:dblclick=
{
async
()
=>
{
on:dblclick=
{
async
()
=>
{
// Show a prompt to the user to change the firstname
// Show a prompt to the user to change the firstname
let
newFirstname
=
await
swal
(
{
let
newFirstname
=
await
swal
(
{
...
@@ -299,15 +332,15 @@
...
@@ -299,15 +332,15 @@
}
}
}}
>
{
player
.
PlayerFirstname
}
</td
}}
>
{
player
.
PlayerFirstname
}
</td
>
>
<td
<td
class=
"el"
>
{
#if
player
.
PlayerClub
}{
player
.
PlayerClub
>
{
#if
player
.
PlayerClub
}{
player
.
PlayerClub
.
club_name
}{
:
else
}
Sans Nom
{
/if
}
</td
.
club_name
}{
:
else
}
Sans Nom
{
/if
}
</td
>
>
<td
<td
class=
"el"
>
{
#if
player
.
PlayerRegion
}{
player
.
PlayerRegion
>
{
#if
player
.
PlayerRegion
}{
player
.
PlayerRegion
.
region_name
}{
:
else
}
Sans Nom
{
/if
}
</td
.
region_name
}{
:
else
}
Sans Nom
{
/if
}
</td
>
>
<td
class=
"flag-container"
<td
class=
"flag-container
el last
"
><img
><img
src=
{
getNationFlag
(
player
.
PlayerNation
)
}
src=
{
getNationFlag
(
player
.
PlayerNation
)
}
alt=
"Player's flag : {getNationFlatAlt(
alt=
"Player's flag : {getNationFlatAlt(
...
@@ -338,7 +371,7 @@
...
@@ -338,7 +371,7 @@
stage
?.
SeedingStageID
,
stage
?.
SeedingStageID
,
player
player
).then(() =
>
{
).then(() =
>
{
load
Players
();
load
StageAndCompetition
();
}
);
}
);
}}
}}
>
>
...
@@ -368,15 +401,15 @@
...
@@ -368,15 +401,15 @@
border
:
solid
1px
#003566
;
border
:
solid
1px
#003566
;
}
}
.gold
{
.gold
.el
{
background-color
:
#e9c46a
;
background-color
:
#e9c46a
;
}
}
.silver
{
.silver
.el
{
background-color
:
#adb5bd
;
background-color
:
#adb5bd
;
}
}
.bronze
{
.bronze
.el
{
background-color
:
#f28482
;
background-color
:
#f28482
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment