feat(match-report): add test mode functionality for lineup confirmation and PIN validation
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 54s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 54s
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
<h3>{{ $t('matchReportApi.homeLineup') }} ({{ meetingData.homeTeamname }})</h3>
|
||||
|
||||
<!-- PIN-Eingabe für Heimverein -->
|
||||
<div class="pin-section">
|
||||
<div v-if="!isTestMode" class="pin-section">
|
||||
<h4>{{ $t('matchReportApi.pinInput') }}</h4>
|
||||
<div class="pin-input-group">
|
||||
<label for="homePin">{{ $t('matchReportApi.homePin') }}:</label>
|
||||
@@ -237,6 +237,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="test-lineup-confirmation">
|
||||
<span>🧪 Im Testmodus ist keine PIN erforderlich.</span>
|
||||
<button type="button" class="btn-secondary" :disabled="!canSignLineup('home')" @click="signLineup('home')">
|
||||
Testaufstellung bestätigen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="meetingDetails && meetingDetails.teamLineupHomePlayers" class="lineup-section">
|
||||
<h4>{{ $t('matchReportApi.selectedPlayers') }}</h4>
|
||||
@@ -330,7 +336,7 @@
|
||||
<h3>{{ $t('matchReportApi.guestLineup') }} ({{ meetingData.guestTeamname }})</h3>
|
||||
|
||||
<!-- PIN-Eingabe für Gastverein -->
|
||||
<div class="pin-section">
|
||||
<div v-if="!isTestMode" class="pin-section">
|
||||
<h4>{{ $t('matchReportApi.pinInput') }}</h4>
|
||||
<div class="pin-input-group">
|
||||
<label for="guestPin">{{ $t('matchReportApi.guestPin') }}:</label>
|
||||
@@ -350,6 +356,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="test-lineup-confirmation">
|
||||
<span>🧪 Im Testmodus ist keine PIN erforderlich.</span>
|
||||
<button type="button" class="btn-secondary" :disabled="!canSignLineup('guest')" @click="signLineup('guest')">
|
||||
Testaufstellung bestätigen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="meetingDetails && meetingDetails.teamLineupGuestPlayers" class="lineup-section">
|
||||
<h4>{{ $t('matchReportApi.selectedPlayers') }}</h4>
|
||||
@@ -4456,13 +4468,13 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
|
||||
}
|
||||
const pin = team === 'home' ? this.homePin : this.guestPin;
|
||||
|
||||
if (!pin) {
|
||||
if (!this.isTestMode && !pin) {
|
||||
this.showPinValidation(team, false, 'Keine PIN eingegeben');
|
||||
return;
|
||||
}
|
||||
|
||||
// PIN validieren
|
||||
const isValid = await this.validatePin(team, pin);
|
||||
const isValid = this.isTestMode || await this.validatePin(team, pin);
|
||||
|
||||
if (isValid) {
|
||||
// Aufstellung zertifizieren
|
||||
@@ -4655,7 +4667,7 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
|
||||
const pin = team === 'home' ? this.homePin : this.guestPin;
|
||||
|
||||
// PIN prüfen
|
||||
if (!pin || pin.length === 0) {
|
||||
if (!this.isTestMode && (!pin || pin.length === 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -5152,6 +5164,20 @@ Wir wünschen den Spielen einen schönen, spannenden und fairen Verlauf und begr
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.test-lineup-confirmation {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
margin: 0 0 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
border: 1px solid #d78a00;
|
||||
border-radius: 8px;
|
||||
background: #fff8df;
|
||||
color: #795300;
|
||||
}
|
||||
|
||||
.test-data-inspector {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
|
||||
Reference in New Issue
Block a user