diff --git a/BeWo/View/Detail/AI/AiPromptbausteinRoutineView.xaml b/BeWo/View/Detail/AI/AiPromptbausteinRoutineView.xaml index be07fb10f..5376f90ff 100644 --- a/BeWo/View/Detail/AI/AiPromptbausteinRoutineView.xaml +++ b/BeWo/View/Detail/AI/AiPromptbausteinRoutineView.xaml @@ -41,6 +41,7 @@ + @@ -187,17 +188,17 @@ IsEnabled="False" SelectedCompactEmployeeDC="{Binding ViewModel.Creator}" /> - + IsEnabled="{Binding ViewModel.CanShareEdit}" /> - + 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;