Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Turnierplan.App/Client/src/app/i18n/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ export const de = {
TeamLinkCreated: 'Verknpüfung mit Turnier erstellt',
TeamLinkDestroyed: 'Verknpüfung mit Turnier aufgehoben'
},
TournamentClassTooltip: 'Turnierklasse',
EmptyText: 'leer',
LabelAdded: 'hinzugefügt zur Mannschaft',
LabelRemoved: 'entfernt von der Mannschaft',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,20 @@
<span class="text-decoration-underline">{{ teamName }}</span>
</div>
} @else if (changeLogType === ApplicationChangeLogType.TeamAdded) {
<span class="value-display p-1 border text-success flex-grow-0">{{ teamName }}</span>
@if (tournamentClassName && tournamentClassName.length > 0) {
<!-- tournament class name was not saved until 2025.4.0 -->
<div class="d-flex flex-row gap-2">
<span class="value-display p-1 border text-success flex-grow-0">{{ teamName }}</span>
<span class="value-display p-1 border flex-grow-0">
<i
class="bi-x-diamond me-2"
[ngbTooltip]="'Portal.ViewPlanningRealm.Applications.ChangeLog.TournamentClassTooltip' | translate"></i>
<span>{{ tournamentClassName }}</span>
</span>
</div>
} @else {
<span class="value-display p-1 border text-success flex-grow-0">{{ teamName }}</span>
}
} @else if (changeLogType === ApplicationChangeLogType.TeamRemoved) {
<span class="value-display p-1 border text-danger flex-grow-0">{{ teamName }}</span>
} @else if (changeLogType === ApplicationChangeLogType.TeamLinkCreated) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import { ApplicationChangeLogType } from '../../../api/models/application-change
import { ApplicationChangeLogProperty } from '../../../api/models/application-change-log-property';
import { ApplicationChangeLogDto } from '../../../api/models/application-change-log-dto';
import { LabelDto } from '../../../api/models/label-dto';
import { TranslateDirective } from '@ngx-translate/core';
import { TranslateDirective, TranslatePipe } from '@ngx-translate/core';
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';

@Component({
selector: 'tp-application-change-log-entry',
imports: [LabelComponent, TranslateDatePipe, TranslateDirective],
imports: [LabelComponent, TranslateDatePipe, TranslateDirective, NgbTooltip, TranslatePipe],
templateUrl: './application-change-log-entry.component.html',
styleUrl: './application-change-log-entry.component.scss'
})
Expand Down Expand Up @@ -41,6 +42,7 @@ export class ApplicationChangeLogEntryComponent {
case ApplicationChangeLogType.TeamAdded: {
this.changeLogIcon = 'bi-plus-circle';
this.teamName = propertyValue(ApplicationChangeLogProperty.TeamName);
this.tournamentClassName = propertyValue(ApplicationChangeLogProperty.TournamentClassName);
break;
}
case ApplicationChangeLogType.TeamRemoved: {
Expand Down Expand Up @@ -86,4 +88,5 @@ export class ApplicationChangeLogEntryComponent {
protected teamName?: string;
protected mockLabel?: LabelDto;
protected tournamentName?: string;
protected tournamentClassName?: string;
}
5 changes: 4 additions & 1 deletion src/Turnierplan.Core/PlanningRealm/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
private string? _contactTelephone;
private string? _comment;

internal Application(long id, int tag, DateTime createdAt, string notes, string contact, string? contactEmail, string? contactTelephone, string? comment, Guid? formSession)

Check warning on line 17 in src/Turnierplan.Core/PlanningRealm/Application.cs

View workflow job for this annotation

GitHub Actions / Validate

Constructor has 9 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
{
Id = id;
Tag = tag;
Expand Down Expand Up @@ -161,7 +161,10 @@
var team = new ApplicationTeam(this, tournamentClass, name);
_teams.Add(team);

AddChangeLog(ApplicationChangeLogType.TeamAdded, [new ApplicationChangeLog.Property(ApplicationChangeLogProperty.TeamName, team.Name)]);
AddChangeLog(ApplicationChangeLogType.TeamAdded, [
new ApplicationChangeLog.Property(ApplicationChangeLogProperty.TeamName, team.Name),
new ApplicationChangeLog.Property(ApplicationChangeLogProperty.TournamentClassName, tournamentClass.Name)
]);

return team;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public enum ApplicationChangeLogProperty
LabelName = 4,
LabelColorCode = 5,
TeamName = 6,
TournamentName = 7
TournamentName = 7,
TournamentClassName = 8
}
Loading