Only allow editing (OK-Button enabled) for the assigned owner of the times record

This commit is contained in:
Daniel Schick 2024-09-17 08:26:39 +02:00
parent d2bab6e2c2
commit 081995990f
2 changed files with 6 additions and 1 deletions

View File

@ -236,6 +236,7 @@ namespace BreCalClient
if (this.Times.ParticipantId != App.Participant.Id) if (this.Times.ParticipantId != App.Participant.Id)
{ {
this.buttonFixedOrder.IsEnabled = false; this.buttonFixedOrder.IsEnabled = false;
this.buttonOK.IsEnabled = false;
return; // if this is not "my" entry, there is no editing! return; // if this is not "my" entry, there is no editing!
} }

View File

@ -208,7 +208,11 @@ namespace BreCalClient
private void EnableControls() private void EnableControls()
{ {
if (this.Times.ParticipantId != App.Participant.Id) return; if (this.Times.ParticipantId != App.Participant.Id)
{
this.buttonOK.IsEnabled = false;
return;
}
this.datePickerOperationStart.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival; this.datePickerOperationStart.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
this.datePickerOperationStart_End.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival; this.datePickerOperationStart_End.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;