Skip to content

Commit fd414c3

Browse files
committed
Add OverrideIndex property to SignalStreckenZuordnung table.
This migration adds a new "OverrideIndex" column to the "SignalStreckenZuordnung" table, allowing for manual ordering of signals within a track configuration. The column is nullable and stores an integer value representing the override index. This enables more flexible control over signal placement beyond the default sorting logic.
1 parent af3b773 commit fd414c3

File tree

11 files changed

+1058
-2
lines changed

11 files changed

+1058
-2
lines changed

Streckenbuch.Client/Components/Dialogs/AddSignalZuordnungDetails.razor

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{
99
<MudTextField Label="Spezialität" @bind-Value="model.SpecialCase" For="@(() => model.SpecialCase)"></MudTextField>
1010
}
11+
<MudTextField T="int?" Clearable="true" @bind-Value="model.OverrideIndex" For="@(() => model.OverrideIndex)"></MudTextField>
1112
</MudCardContent>
1213
<MudCardActions>
1314
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary">Erstellen</MudButton>
@@ -39,6 +40,8 @@
3940

4041
public string? SpecialCase { get; set; }
4142

43+
public int? OverrideIndex { get; set; }
44+
4245
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
4346
{
4447
if (IsSpecialCase.HasValue && IsSpecialCase.Value && string.IsNullOrEmpty(SpecialCase))

Streckenbuch.Client/Components/Dialogs/EditSignalZuordnung.razor

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ else
134134
{
135135
request.SpecialCase = zuordnungDetails.SpecialCase;
136136
}
137+
138+
if (zuordnungDetails.OverrideIndex.HasValue)
139+
{
140+
request.OverrideIndex = zuordnungDetails.OverrideIndex.Value;
141+
}
137142
var empty = await signalService.CreateSignalZuordnungAsync(request);
138143

139144

Streckenbuch.Server/Data/Entities/Signale/SignalStreckenZuordnung.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ public class SignalStreckenZuordnung : IEntity
2020
public bool NonStandard { get; set; }
2121

2222
public string? NonStandardKommentar { get; set; }
23+
24+
public int? OverrideIndex { get; set; }
2325
}

0 commit comments

Comments
 (0)