Removed ETA from times dialog if shifting shipcall

This commit is contained in:
Daniel Schick 2024-07-10 09:05:45 +02:00
parent 208d74f9e3
commit e3000e1f16
2 changed files with 12 additions and 3 deletions

View File

@ -16,7 +16,7 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" x:Name="rowETA"/>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />

View File

@ -128,8 +128,11 @@ namespace BreCalClient
//if (this.datePickerETDBerth_End.Template.FindName("PART_TextBox", this.datePickerETDBerth_End) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
}
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
if (this.ShipcallModel.Shipcall?.Type != ShipcallType.Shifting)
{
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
}
switch (ShipcallModel.Shipcall?.Type)
{
@ -174,6 +177,12 @@ namespace BreCalClient
}
}
if (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)
{
this.rowETA.Height = new(0);
}
// setting en/dis-abled
if (this.Times.ParticipantId != App.Participant.Id)