IsPublic Routine

This commit is contained in:
2026-06-19 11:27:25 +02:00
parent b39bbd5316
commit 6fd35b72aa
2 changed files with 14 additions and 6 deletions

View File

@@ -41,6 +41,7 @@
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">Name</Label>
@@ -187,17 +188,17 @@
IsEnabled="False"
SelectedCompactEmployeeDC="{Binding ViewModel.Creator}" />
<!--<Label Grid.Row="4" Grid.Column="0">Öffentlich</Label>
<Label Grid.Row="6" Grid.Column="0">Öffentlich</Label>
<dxe:CheckEdit
Grid.Row="4"
Grid.Row="6"
Grid.Column="2"
Margin="3"
IsChecked="{Binding ViewModel.IsPublic}"
IsEnabled="{Binding ViewModel.CanShareEdit, UpdateSourceTrigger=PropertyChanged}" />-->
IsEnabled="{Binding ViewModel.CanShareEdit}" />
<Label Grid.Row="6" Grid.Column="0">Favorit</Label>
<Label Grid.Row="7" Grid.Column="0">Favorit</Label>
<dxe:CheckEdit
Grid.Row="6"
Grid.Row="7"
Grid.Column="2"
Margin="3"
IsChecked="{Binding ViewModel.IsFavorite}"
@@ -205,7 +206,7 @@
<StackPanel
Grid.Row="7"
Grid.Row="8"
Grid.ColumnSpan="3"
Margin="0,19,0,0"
HorizontalAlignment="Right"

View File

@@ -94,6 +94,13 @@ namespace BeWo.ViewModel
set => SetProperty(ref _Steps, value, nameof(Steps));
}
public bool CanShareEdit
{
get => BeWoApp.HasLoggedOnUserRight(UserRightType.AiModulePromptbausteinShare)
&& Creator?.EmployeeOid is long owner
&& owner == BeWoApp.CompactLoggedOnEmployee.EmployeeOid;
}
public string FavoritenHeader => IsFavorite ? "Favorit entfernen" : "Favorit hinzufügen";
public override bool IsDirty => base.IsDirty || Steps.IsDirty;