diff --git a/misc/version.txt b/misc/version.txt index 2379a4c..5dc1d67 100644 --- a/misc/version.txt +++ b/misc/version.txt @@ -1 +1 @@ -1.6.0.6 \ No newline at end of file +1.6.0.8 \ No newline at end of file diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj index a6dcc3a..88b1f22 100644 --- a/src/BreCalClient/BreCalClient.csproj +++ b/src/BreCalClient/BreCalClient.csproj @@ -8,8 +8,8 @@ True BreCalClient.App ..\..\misc\brecal.snk - 1.6.0.6 - 1.6.0.6 + 1.6.0.8 + 1.6.0.8 Bremen calling client A Windows WPF client for the Bremen calling API. containership.ico diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs index 76fd1a0..f02ab43 100644 --- a/src/BreCalClient/EditShipcallControl.xaml.cs +++ b/src/BreCalClient/EditShipcallControl.xaml.cs @@ -188,6 +188,8 @@ namespace BreCalClient void CheckForCompletion() { + if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // Cancelled shipcall never clicks ok + bool isEnabled = true; isEnabled &= this.comboBoxShip.SelectedItem != null; @@ -378,6 +380,8 @@ namespace BreCalClient bool editRightGrantedForBSMD = false; + if (this.ShipcallModel.Shipcall?.Canceled ?? false) return; // do not allow edit on canceled shipcall + // Special case: Selected Agency allows BSMD to edit their fields if (this.comboBoxAgency.SelectedIndex >= 0) { diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs index d0273a9..4362f2c 100644 --- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs @@ -366,7 +366,7 @@ namespace BreCalClient private void CheckOKButton() { - this.buttonOK.IsEnabled = _editing && RequiredFieldsSet(); + this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false); } #endregion diff --git a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs index c866dfb..5506317 100644 --- a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs @@ -356,7 +356,7 @@ namespace BreCalClient private void CheckOKButton() { - this.buttonOK.IsEnabled = _editing && RequiredFieldsSet(); + this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false); } #endregion diff --git a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs index dab96ed..aab35ab 100644 --- a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs @@ -394,7 +394,7 @@ namespace BreCalClient private void CheckOKButton() { - this.buttonOK.IsEnabled = _editing && RequiredFieldsSet(); + this.buttonOK.IsEnabled = _editing && RequiredFieldsSet() && !(this.ShipcallModel.Shipcall?.Canceled ?? false); } #endregion diff --git a/src/BreCalClient/EditTimesControl.xaml.cs b/src/BreCalClient/EditTimesControl.xaml.cs index 8e8d7c8..f0ca1f4 100644 --- a/src/BreCalClient/EditTimesControl.xaml.cs +++ b/src/BreCalClient/EditTimesControl.xaml.cs @@ -259,7 +259,7 @@ namespace BreCalClient // setting en/dis-abled - if (this.Times.ParticipantId != App.Participant.Id) + if ((this.Times.ParticipantId != App.Participant.Id) || (this.ShipcallModel.Shipcall?.Canceled ?? false)) { this.buttonFixedOrder.IsEnabled = false; this.buttonOK.IsEnabled = false; diff --git a/src/BreCalClient/EditTimesTerminalControl.xaml.cs b/src/BreCalClient/EditTimesTerminalControl.xaml.cs index 54d87a3..36e55ec 100644 --- a/src/BreCalClient/EditTimesTerminalControl.xaml.cs +++ b/src/BreCalClient/EditTimesTerminalControl.xaml.cs @@ -217,7 +217,7 @@ namespace BreCalClient private void EnableControls() { - if (this.Times.ParticipantId != App.Participant.Id) + if ((this.Times.ParticipantId != App.Participant.Id) || (this.ShipcallModel.Shipcall?.Canceled ?? false)) { this.buttonOK.IsEnabled = false; return; diff --git a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml index 7e092c7..6e4026a 100644 --- a/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml +++ b/src/BreCalClient/Properties/PublishProfiles/ClickOnceTestProfile.pubxml @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 6 - 1.6.0.6 + 1.6.0.8 True Debug True @@ -41,7 +41,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. bin\Debug\net6.0-windows\win-x64\app.publish\ win-x64 false - 1.6.0.6 + 1.6.0.8 diff --git a/src/server/BreCal/validators/input_validation_shipcall.py b/src/server/BreCal/validators/input_validation_shipcall.py index ff86287..060909f 100644 --- a/src/server/BreCal/validators/input_validation_shipcall.py +++ b/src/server/BreCal/validators/input_validation_shipcall.py @@ -498,7 +498,7 @@ class InputValidationShipcall(): # if the *existing* shipcall in the database is canceled, it may not be changed if shipcall.get("canceled", False): - raise ValidationError({"canceled":f"The shipcall with id 'shipcall_id' is canceled. A canceled shipcall may not be changed."}) + raise ValidationError({"canceled":f"The shipcall with id {shipcall_id} is canceled. A canceled shipcall may not be changed."}) return @staticmethod