Do not allow editing on cancelled shipcalls
This commit is contained in:
parent
c253de0ba8
commit
d536d9479e
@ -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)
|
||||
{
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user