@@ -4,12 +4,14 @@ import { stripIndent } from 'common-tags';
4
4
import { DateTime } from 'luxon' ;
5
5
import { keys as keysOf } from 'ts-transformer-keys' ;
6
6
import { MergeExclusive } from 'type-fest' ;
7
+ import { sortingForEnumIndex } from '~/core/database/query' ;
7
8
import { abstractType , e } from '~/core/edgedb' ;
8
9
import { RegisterResource } from '~/core/resources' ;
9
10
import {
10
11
DateInterval ,
11
12
DateTimeField ,
12
13
DbLabel ,
14
+ DbSort ,
13
15
DbUnique ,
14
16
ID ,
15
17
IntersectionType ,
@@ -44,7 +46,7 @@ import { Postable } from '../../post/dto';
44
46
import { ProjectChangeRequest } from '../../project-change-request/dto' ;
45
47
import { ProjectMember } from '../project-member/dto' ;
46
48
import { ProjectStatus } from './project-status.enum' ;
47
- import { SecuredProjectStep } from './project-step.enum' ;
49
+ import { ProjectStep , SecuredProjectStep } from './project-step.enum' ;
48
50
import { ProjectType } from './project-type.enum' ;
49
51
50
52
type AnyProject = MergeExclusive < TranslationProject , InternshipProject > ;
@@ -114,10 +116,12 @@ class Project extends Interfaces {
114
116
middleware : [ parentIdMiddleware ] ,
115
117
} )
116
118
@DbLabel ( 'ProjectStep' )
119
+ @DbSort ( sortingForEnumIndex ( ProjectStep ) )
117
120
readonly step : SecuredProjectStep ;
118
121
119
122
@Field ( ( ) => ProjectStatus )
120
123
@DbLabel ( 'ProjectStatus' )
124
+ @DbSort ( sortingForEnumIndex ( ProjectStatus ) )
121
125
readonly status : ProjectStatus ;
122
126
123
127
readonly primaryLocation : Secured < ID | null > ;
0 commit comments