Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another
Commits
7e9913c0
Commit
7e9913c0
authored
Jun 28, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update src/tournament/tournament.service.ts, src/tournament/entities/Tournament.entity.ts files
parent
3816f8f0
Pipeline
#38207
passed with stages
in 3 minutes and 14 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
src/tournament/entities/Tournament.entity.ts
src/tournament/entities/Tournament.entity.ts
+15
-0
src/tournament/tournament.service.ts
src/tournament/tournament.service.ts
+2
-2
No files found.
src/tournament/entities/Tournament.entity.ts
View file @
7e9913c0
...
...
@@ -282,4 +282,19 @@ export class Tournament extends DescBase {
// this.calculateTree();
}
}
async
afterGet
()
{
this
.
participants
?.
sort
((
a
,
b
)
=>
{
if
(
a
.
seq
!==
b
.
seq
)
return
a
.
seq
-
b
.
seq
;
return
a
.
id
-
b
.
id
;
});
this
.
matches
?.
sort
((
a
,
b
)
=>
{
if
(
a
.
round
!==
b
.
round
)
return
a
.
round
-
b
.
round
;
if
(
a
.
isThirdPlaceMatch
!==
b
.
isThirdPlaceMatch
)
{
return
(
a
.
isThirdPlaceMatch
?
1
:
0
)
-
(
b
.
isThirdPlaceMatch
?
1
:
0
);
}
return
a
.
id
-
b
.
id
;
});
}
}
src/tournament/tournament.service.ts
View file @
7e9913c0
...
...
@@ -39,12 +39,12 @@ export class TournamentService extends CrudService(Tournament, {
'
matches.winner
'
,
],
extraGetQuery
:
(
qb
)
=>
{
qb
/*
qb
.addOrderBy('participants.seq', 'ASC')
.addOrderBy('participants.id', 'ASC')
.addOrderBy('matches.round', 'ASC')
.addOrderBy('matches.isThirdPlaceMatch', 'ASC')
.
addOrderBy
(
'
matches.id
'
,
'
ASC
'
);
.addOrderBy('matches.id', 'ASC');
*/
// qb.expressionMap.relationLoadStrategy = 'query';
return
qb
;
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment