@@ -28,6 +28,7 @@ export class PasseEingabeComponent implements OnInit, OnDestroy {
2828 form ! : FormGroup ;
2929 activeRow = - 1 ;
3030 private destroy$ = new Subject < void > ( ) ;
31+ private readonly autoFocusDelayMs = 2000 ;
3132 timeoutId : any = null ;
3233
3334 orderedShooters : SchuetzeStammdatenDTO [ ] = [ ] ;
@@ -117,8 +118,8 @@ export class PasseEingabeComponent implements OnInit, OnDestroy {
117118 const groups = this . orderedShooters . map ( ( schuetze , index ) => {
118119 console . log ( `Creating form group ${ index } for shooter ${ schuetze . schuetzenId } ` ) ;
119120 return this . fb . group ( {
120- schuss1 : [ null , [ Validators . required , Validators . min ( 0 ) , Validators . max ( 10 ) ] ] ,
121- schuss2 : [ null , [ Validators . required , Validators . min ( 0 ) , Validators . max ( 10 ) ] ] ,
121+ schuss1 : [ null , [ Validators . required , Validators . pattern ( / ^ ( 1 0 | [ 0 - 9 ] ) $ / ) ] ] ,
122+ schuss2 : [ null , [ Validators . required , Validators . pattern ( / ^ ( 1 0 | [ 0 - 9 ] ) $ / ) ] ] ,
122123 } ) ;
123124 } ) ;
124125
@@ -193,8 +194,8 @@ export class PasseEingabeComponent implements OnInit, OnDestroy {
193194 const grp = this . schuesse . at ( i ) as FormGroup ;
194195 return {
195196 schuetzenId : s . schuetzenId ,
196- schuss1 : grp . value . schuss1 ,
197- schuss2 : grp . value . schuss2 ,
197+ schuss1 : parseInt ( grp . value . schuss1 , 10 ) ,
198+ schuss2 : parseInt ( grp . value . schuss2 , 10 ) ,
198199 // No schuss3 - only 2 arrows per shooter to match backend ARROWS_PER_SHOOTER = 2
199200 } ;
200201 } ) ;
@@ -224,7 +225,7 @@ export class PasseEingabeComponent implements OnInit, OnDestroy {
224225 } else {
225226 console . warn ( 'Ungültiger Wert – kein automatischer Wechsel:' , value ) ;
226227 }
227- } , 700 ) ;
228+ } , this . autoFocusDelayMs ) ;
228229 }
229230
230231 focusNextField ( i : number , field : 'schuss1' | 'schuss2' ) {
0 commit comments