fix: ensure leagueId is retained when editing a team to prevent accidental removal of MyTischtennis link
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 51s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 51s
This commit is contained in:
@@ -1578,12 +1578,16 @@ export default {
|
||||
!!String(teamToEdit.value?.plannedLeagueName || '').trim();
|
||||
const teamData = {
|
||||
name: newTeamName.value.trim(),
|
||||
leagueId: normalizedLeagueId,
|
||||
seasonId: selectedSeasonId.value,
|
||||
teamGender: newTeamGender.value,
|
||||
teamAgeGroup: newTeamAgeGroup.value,
|
||||
plannedLeagueName: shouldClearPlannedLeague ? null : (newPlannedLeagueName.value.trim() || null)
|
||||
};
|
||||
// Beim Bearbeiten darf ein leeres Auswahlfeld die bestehende Liga- und
|
||||
// damit die MyTischtennis-Verknüpfung nicht versehentlich entfernen.
|
||||
if (!teamToEdit.value || normalizedLeagueId) {
|
||||
teamData.leagueId = normalizedLeagueId;
|
||||
}
|
||||
|
||||
if (teamToEdit.value) {
|
||||
// Bearbeitung eines bestehenden Teams
|
||||
|
||||
Reference in New Issue
Block a user