From 6fd35b72aab64052680a643152b2c11d99f84aa9 Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Fri, 19 Jun 2026 11:27:25 +0200 Subject: [PATCH] IsPublic Routine --- .../View/Detail/AI/AiPromptbausteinRoutineView.xaml | 13 +++++++------ BeWo/ViewModel/AiPromptbausteinRoutineVM.cs | 7 +++++++ 2 files changed, 14 insertions(+), 6 deletions(-) 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;