File tree Expand file tree Collapse file tree
src/pages/Competition/Export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,8 +69,15 @@ const groupNumber = ({ activityCode }: Pick<Activity, 'activityCode'>) =>
6969const staffingAssignmentToText = ( { assignmentCode, activity } : AssignmentWithActivity ) =>
7070 `${ assignmentCode . split ( '-' ) [ 1 ] [ 0 ] . toUpperCase ( ) } ${ groupNumber ( activity ) } ` ;
7171
72+ const stagePrefixForNametags = ( room : Room , activity : ActivityWithParent ) => {
73+ const stageName = getStageName ( room , activity ) ;
74+ const stagePrefix = stageName . match ( / [ A - Z a - z ] + / ) ?. [ 0 ] ;
75+
76+ return stagePrefix || room . name [ 0 ] ;
77+ } ;
78+
7279const competingAssignmentToText = ( activity : ActivityWithParent ) =>
73- `${ activity . parent . room . name [ 0 ] } ${ groupNumber ( activity ) } ` ;
80+ `${ stagePrefixForNametags ( activity . parent . room , activity ) } ${ groupNumber ( activity ) } ` ;
7481
7582const getStageName = ( room : Room , activity : ActivityWithParent ) => {
7683 const stages = getRoomExtensionData ( room ) ?. stages ;
You can’t perform that action at this time.
0 commit comments