Add comment if BSMD is allowed to edit agents data fields (at the bottom of the edit window)

This commit is contained in:
Daniel Schick 2023-09-21 09:36:35 +02:00
parent 110ff5ccce
commit ba29a8217e
5 changed files with 21 additions and 0 deletions

View File

@ -156,6 +156,7 @@
<CheckBox x:Name="checkBoxMooredLock" Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxMooredLock" Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<CheckBox x:Name="checkBoxCanceled" Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" /> <CheckBox x:Name="checkBoxCanceled" Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,4,0" />
<Label x:Name="labelBSMDGranted" Grid.Row="14" Grid.Column="1" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBSMDGranted}" Visibility="Hidden" FontWeight="DemiBold" />
<StackPanel Grid.Row="14" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right"> <StackPanel Grid.Row="14" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" IsEnabled="False" /> <Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" IsEnabled="False" />
<Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/> <Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/>

View File

@ -291,6 +291,8 @@ namespace BreCalClient
bool isBsmd = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD); bool isBsmd = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD);
bool isAgency = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY); bool isAgency = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY);
bool editRightGrantedForBSMD = false;
// Special case: Selected Agency allows BSMD to edit their fields // Special case: Selected Agency allows BSMD to edit their fields
if (this.comboBoxAgency.SelectedIndex >= 0) if (this.comboBoxAgency.SelectedIndex >= 0)
{ {
@ -300,6 +302,8 @@ namespace BreCalClient
{ {
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD) && isBsmd) if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD) && isBsmd)
isAgency = true; isAgency = true;
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD))
editRightGrantedForBSMD = true;
} }
} }
@ -331,6 +335,7 @@ namespace BreCalClient
this.integerUpDownRecommendedTugs.IsEnabled = isAgency; this.integerUpDownRecommendedTugs.IsEnabled = isAgency;
this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd; this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd;
this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden;
} }
#endregion #endregion

View File

@ -253,6 +253,15 @@ namespace BreCalClient.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to BSMD right to edit granted.
/// </summary>
public static string textBSMDGranted {
get {
return ResourceManager.GetString("textBSMDGranted", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Bunkering. /// Looks up a localized string similar to Bunkering.
/// </summary> /// </summary>

View File

@ -379,6 +379,9 @@
<data name="textBerthRemarks" xml:space="preserve"> <data name="textBerthRemarks" xml:space="preserve">
<value>Liegeplatz Informationen</value> <value>Liegeplatz Informationen</value>
</data> </data>
<data name="textBSMDGranted" xml:space="preserve">
<value>Freigabe zur Bearb. f. BSMD erteilt</value>
</data>
<data name="textRemarks" xml:space="preserve"> <data name="textRemarks" xml:space="preserve">
<value>Info</value> <value>Info</value>
</data> </data>

View File

@ -178,6 +178,9 @@
<data name="textBerths" xml:space="preserve"> <data name="textBerths" xml:space="preserve">
<value>Berths</value> <value>Berths</value>
</data> </data>
<data name="textBSMDGranted" xml:space="preserve">
<value>BSMD right to edit granted</value>
</data>
<data name="textBunkering" xml:space="preserve"> <data name="textBunkering" xml:space="preserve">
<value>Bunkering</value> <value>Bunkering</value>
</data> </data>