Skip to content

Commit 4cf01bb

Browse files
authored
Merge branch 'develop' into DragAndDropTouch
2 parents 88a9a57 + 7bcdba0 commit 4cf01bb

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

bogenliga/src/app/modules/schusszettel/components/maske2eingabe/passe-eingabe.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ <h2>Passe {{ currentPasse }}</h2>
4242
<input
4343
#inputField
4444
id="schuss1-{{ i }}"
45-
type="number"
45+
type="text"
4646
inputmode="numeric"
47+
pattern="[0-9]*"
48+
maxlength="2"
4749
formControlName="schuss1"
4850
min="0"
4951
max="10"

bogenliga/src/app/modules/schusszettel/components/maske2eingabe/passe-eingabe.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,4 @@ form { width: 100%; max-width: 800px;}
201201
input::-webkit-outer-spin-button {
202202
appearance: none;
203203
}
204+

bogenliga/src/app/modules/schusszettel/components/maske2eingabe/passe-eingabe.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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(/^(10|[0-9])$/)]],
122+
schuss2: [null, [Validators.required, Validators.pattern(/^(10|[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') {

bogenliga/src/app/modules/schusszettel/components/shared/match-kontext/match-kontext.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ $gap: 0.75rem;
2424
/* two cards per row when space permits */
2525
display: grid;
2626
gap: $gap $gap*2;
27+
width: 100%;
2728
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
2829
margin: 0;
2930
}

0 commit comments

Comments
 (0)