Add comment if BSMD is allowed to edit agents data fields (at the bottom of the edit window)
This commit is contained in:
parent
110ff5ccce
commit
ba29a8217e
@ -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="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">
|
||||
<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"/>
|
||||
|
||||
@ -291,6 +291,8 @@ namespace BreCalClient
|
||||
bool isBsmd = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD);
|
||||
bool isAgency = App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY);
|
||||
|
||||
bool editRightGrantedForBSMD = false;
|
||||
|
||||
// Special case: Selected Agency allows BSMD to edit their fields
|
||||
if (this.comboBoxAgency.SelectedIndex >= 0)
|
||||
{
|
||||
@ -300,6 +302,8 @@ namespace BreCalClient
|
||||
{
|
||||
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD) && isBsmd)
|
||||
isAgency = true;
|
||||
if(p.IsFlagSet(ParticipantFlag.ALLOW_BSMD))
|
||||
editRightGrantedForBSMD = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,6 +335,7 @@ namespace BreCalClient
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = isAgency;
|
||||
this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd;
|
||||
|
||||
this.labelBSMDGranted.Visibility = editRightGrantedForBSMD ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -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>
|
||||
/// Looks up a localized string similar to Bunkering.
|
||||
/// </summary>
|
||||
|
||||
@ -379,6 +379,9 @@
|
||||
<data name="textBerthRemarks" xml:space="preserve">
|
||||
<value>Liegeplatz Informationen</value>
|
||||
</data>
|
||||
<data name="textBSMDGranted" xml:space="preserve">
|
||||
<value>Freigabe zur Bearb. f. BSMD erteilt</value>
|
||||
</data>
|
||||
<data name="textRemarks" xml:space="preserve">
|
||||
<value>Info</value>
|
||||
</data>
|
||||
|
||||
@ -178,6 +178,9 @@
|
||||
<data name="textBerths" xml:space="preserve">
|
||||
<value>Berths</value>
|
||||
</data>
|
||||
<data name="textBSMDGranted" xml:space="preserve">
|
||||
<value>BSMD right to edit granted</value>
|
||||
</data>
|
||||
<data name="textBunkering" xml:space="preserve">
|
||||
<value>Bunkering</value>
|
||||
</data>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user