From 184d15554bba645000ddb9e56dae1d5ef149d2fa Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Mon, 2 Dec 2024 08:15:23 +0100 Subject: [PATCH] Port may only be changed if the shipcall is created --- src/BreCalClient/EditShipcallControl.xaml.cs | 3 +++ src/BreCalClient/MainWindow.xaml.cs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs index 1fee1a4..1bcb02a 100644 --- a/src/BreCalClient/EditShipcallControl.xaml.cs +++ b/src/BreCalClient/EditShipcallControl.xaml.cs @@ -42,6 +42,8 @@ namespace BreCalClient public ShipApi? ShipApi { get; set; } + public bool IsCreate { get; set; } = false; + #endregion #region Event handler @@ -395,6 +397,7 @@ namespace BreCalClient this.datePickerETD.IsEnabled = isAgency || isBsmd; this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden; + this.comboBoxHarbour.IsEnabled = this.IsCreate; this.comboBoxCategories_SelectionChanged(null, null); } diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs index bd31192..c3a4383 100644 --- a/src/BreCalClient/MainWindow.xaml.cs +++ b/src/BreCalClient/MainWindow.xaml.cs @@ -247,7 +247,8 @@ namespace BreCalClient EditShipcallControl esc = new() { ShipEditingEnabled = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD), - ShipApi = _shipApi + ShipApi = _shipApi, + IsCreate = true }; if (model != null) esc.ShipcallModel = model;