feat(match-report): add lineup certification logic in MatchReportApiDialog
- Implemented applyLineupCertificationFromMeetingDetails method to automatically set lineup certification based on meeting details. - Enhanced the initialization process to include lineup confirmation when PINs are already signed, improving user experience and data accuracy.
This commit is contained in:
@@ -1945,6 +1945,9 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
|
||||
// PINs automatisch laden
|
||||
this.loadPinsAutomatically();
|
||||
|
||||
// Aufstellungs-Bestätigung aus nuscore übernehmen (wenn bereits signiert)
|
||||
this.applyLineupCertificationFromMeetingDetails();
|
||||
|
||||
// Vereins-Einstellungen für Begrüßung laden
|
||||
await this.loadClubSettings();
|
||||
|
||||
@@ -2061,6 +2064,25 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
|
||||
|
||||
console.log('✅ Team "Nicht angetreten" angewendet:', this.teamNotAppeared, 'wo:', woValue);
|
||||
},
|
||||
|
||||
/**
|
||||
* Setzt die Aufstellungs-Bestätigung (certified) aus den Meeting-Details.
|
||||
* In nuscore wird nach PIN-Eingabe ein Hash gespeichert (homePin/guestPin).
|
||||
* Ist dieser gesetzt, gilt die Aufstellung als bereits bestätigt.
|
||||
*/
|
||||
applyLineupCertificationFromMeetingDetails() {
|
||||
if (!this.meetingDetails) return;
|
||||
|
||||
const homePinSet = this.meetingDetails.homePin != null && String(this.meetingDetails.homePin).trim() !== '';
|
||||
const guestPinSet = this.meetingDetails.guestPin != null && String(this.meetingDetails.guestPin).trim() !== '';
|
||||
|
||||
if (homePinSet) {
|
||||
this.isHomeLineupCertified = true;
|
||||
}
|
||||
if (guestPinSet) {
|
||||
this.isGuestLineupCertified = true;
|
||||
}
|
||||
},
|
||||
resolveSide(label, side) {
|
||||
// label z.B. "A1 – B2" oder "DA1 – DB1"
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user