Änderungen - Fehler in der View
This commit is contained in:
@@ -123,6 +123,9 @@
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinView.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\AI\AiPromptbausteinView2.xaml.cs">
|
||||
<DependentUpon>AiPromptbausteinView2.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Document\RtfEditView.xaml.cs">
|
||||
<DependentUpon>RtfEditView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -146,6 +149,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\AI\AiPromptbausteinView2.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Document\RtfEditView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -55,6 +55,22 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/SendNewMessage", ReplyAction="http://tempuri.org/IAiEnhancedService/SendNewMessageResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/SendNewMessageBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AiConversationMessageDC> SendNewMessage(long conversation, string message);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/GetAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> GetAiPromptbausteine();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteineResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/CreateAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDC);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteineResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/UpdateAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDCs);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteine", ReplyAction="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteineResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAiEnhancedService/DeleteAiPromptbausteineBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void DeleteAiPromptbausteine(System.Collections.Generic.Dictionary<long, long> oid2version);
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
|
||||
@@ -140,5 +156,25 @@ namespace BeWo.ServiceProxy
|
||||
{
|
||||
return base.Channel.SendNewMessage(conversation, message);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> GetAiPromptbausteine()
|
||||
{
|
||||
return base.Channel.GetAiPromptbausteine();
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> CreateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDC)
|
||||
{
|
||||
return base.Channel.CreateAiPromptbausteine(aiPromptbausteinDC);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<long, long> UpdateAiPromptbausteine(System.Collections.Generic.List<BS.Shared.DataContracts.AiPromptbausteinDC> aiPromptbausteinDCs)
|
||||
{
|
||||
return base.Channel.UpdateAiPromptbausteine(aiPromptbausteinDCs);
|
||||
}
|
||||
|
||||
public void DeleteAiPromptbausteine(System.Collections.Generic.Dictionary<long, long> oid2version)
|
||||
{
|
||||
base.Channel.DeleteAiPromptbausteine(oid2version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
AcceptsReturn="True"
|
||||
AcceptsTab="True"
|
||||
EditMode="InplaceActive"
|
||||
IsEnabled="{Binding Path=DataContext.RowData.Row, Converter={StaticResource IsOnlyForEmployeeRightsConverter}, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
IsEnabled="{Binding Path=DataContext.RowData.Row, Converter={StaticResource IsOnlyForEmployeeRightsConverter2}, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
SelectAllOnGotFocus="False"
|
||||
SelectAllOnMouseUp="False"
|
||||
Text="{Binding Path=DataContext.RowData.Row.Text, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
|
||||
@@ -38,13 +38,13 @@ namespace BeWo.View.Detail
|
||||
|
||||
private readonly bool _IsInAdministrationView;
|
||||
|
||||
public AiPromptbausteinView(AiPromptbausteinListVM pViewModel, bool pIsInAdministrationView = false)
|
||||
public AiPromptbausteinView(AiPromptbausteinListVM viewmodel, bool pIsInAdministrationView = false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_IsInAdministrationView = pIsInAdministrationView;
|
||||
|
||||
ViewModel = pViewModel;
|
||||
ViewModel = viewmodel;
|
||||
}
|
||||
|
||||
protected override void Save()
|
||||
|
||||
241
BeWo/View/Detail/AI/AiPromptbausteinView2.xaml
Normal file
241
BeWo/View/Detail/AI/AiPromptbausteinView2.xaml
Normal file
@@ -0,0 +1,241 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.AI.AiPromptbausteinView2"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
|
||||
xmlns:view="clr-namespace:BeWo.View.Detail"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<localView:BeWoView.Resources>
|
||||
<ResourceDictionary>
|
||||
<view:ValueListEntryTypeToFontWeightConverter x:Key="ValueListEntryTypeToFontWeightConverter" />
|
||||
</ResourceDictionary>
|
||||
</localView:BeWoView.Resources>
|
||||
<GroupBox
|
||||
Name="groupbox_root"
|
||||
Header="Ziele und Maßnahmen"
|
||||
KeyDown="Groupbox_root_KeyDown"
|
||||
Style="{StaticResource ObjectEditGroupBox}">
|
||||
<GroupBox.Resources>
|
||||
<ContextMenu
|
||||
x:Key="cmGoals"
|
||||
MenuItem.Click="ContextMenuGoals_Click"
|
||||
Opened="ContextMenuGoals_Opened">
|
||||
<MenuItem Header="Neue Maßnahme">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Neues Ziel">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Add24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Bearbeiten">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Rename24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
<MenuItem Header="Einzelnes Element kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Elementbaum kopieren">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Copy24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Einfügen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Paste24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<!--<MenuItem Header="Umbenennen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Rename24.png"/>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>-->
|
||||
<Separator />
|
||||
<MenuItem Header="Löschen">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="..\..\Ressources\Icons\Delete24.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</GroupBox.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Content="Neues Ziel" />
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Margin="1"
|
||||
VerticalContentAlignment="Center"
|
||||
Text="{Binding ViewModel.NewVM.Description, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Click="ZielHinzufuegenButton_Click"
|
||||
Content="Hinzufügen" />
|
||||
<Button
|
||||
Grid.Column="3"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Click="IcfImport_Click"
|
||||
Content="Icf Importieren" />
|
||||
<ToggleButton
|
||||
x:Name="EditToggleButton"
|
||||
Grid.Column="4"
|
||||
Width="157"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Checked="ToggleButton_Checked"
|
||||
Content="Bearbeiten aktivieren"
|
||||
ToolTip="Wenn der Bearbeiten Modus aktiviert ist, können Sie Elemente mit Drag und Drop verschieben"
|
||||
Unchecked="ToggleButton_Unchecked"
|
||||
Visibility="Visible" />
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Grid.Column="5"
|
||||
Grid.ColumnSpan="10"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Visible">
|
||||
<Button
|
||||
x:Name="PrevButton"
|
||||
Width="25"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Click="PrevButton_Click"
|
||||
ToolTip="Letzte Änderung rückgängig machen">
|
||||
<Image
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="0,3,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Source="..\..\Ressources\Icons\Undo.png" />
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="NextButton"
|
||||
Width="25"
|
||||
Height="25"
|
||||
Margin="3"
|
||||
Click="NextButton_Click">
|
||||
<Image
|
||||
Width="20"
|
||||
Height="18"
|
||||
Margin="0,3,0,0"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Source="..\..\Ressources\Icons\Undo.png" />
|
||||
<Button.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="-1" />
|
||||
<TranslateTransform X="25" />
|
||||
</TransformGroup>
|
||||
|
||||
|
||||
</Button.RenderTransform>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
<GroupBox Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<TreeView
|
||||
x:Name="TreeView"
|
||||
Grid.Row="1"
|
||||
Grid.RowSpan="1"
|
||||
Margin="3,3,7,3"
|
||||
Padding="0,5,10,5"
|
||||
AllowDrop="True"
|
||||
ContextMenu="{StaticResource cmGoals}"
|
||||
ItemContainerStyle="{DynamicResource igoal_treeitemstyle}"
|
||||
ItemTemplate="{DynamicResource igoal_treeitemtemplate}"
|
||||
ItemsSource="{Binding IndividualGoalTree, UpdateSourceTrigger=PropertyChanged}"
|
||||
MouseDown="TreeView_MouseDown"
|
||||
MouseMove="TreeView_MouseMove"
|
||||
PreviewDragOver="TreeView_PreviewDragOver"
|
||||
PreviewDrop="TreeView_PreviewDrop"
|
||||
PreviewMouseDown="GoalTreeViewItem_PreviewMouseRightButtonDown">
|
||||
<TreeView.Resources>
|
||||
<Style x:Key="igoal_treeitemstyle" TargetType="TreeViewItem">
|
||||
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
|
||||
</Style>
|
||||
<HierarchicalDataTemplate
|
||||
x:Key="igoal_treeitemtemplate"
|
||||
DataType="{x:Type localViewModel:AiPromptbausteinVM}"
|
||||
ItemsSource="{Binding Path=Items}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBox
|
||||
Height="21"
|
||||
Margin="0,0,0,0"
|
||||
Padding="0,3,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Cursor="Arrow"
|
||||
Focusable="False"
|
||||
FontWeight="{Binding Path=IsGoal, Converter={StaticResource ValueListEntryTypeToFontWeightConverter}}"
|
||||
IsReadOnly="True"
|
||||
KeyDown="TextBox_KeyDown"
|
||||
LostFocus="TextBox_LostFocus"
|
||||
Text="{Binding Path=GoalEntryVM.DisplayName, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
ToolTipService.ShowDuration="100000">
|
||||
<TextBox.ToolTip>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Label Content="{Binding Path=GoalEntryVM.DisplayName, Mode=OneWay}" FontWeight="Bold" />
|
||||
<TextBox
|
||||
MaxWidth="500"
|
||||
Padding="3,1,0,0"
|
||||
VerticalAlignment="Center"
|
||||
AcceptsReturn="True"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding Path=GoalEntryVM.Notice}"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
|
||||
</Grid>
|
||||
</HierarchicalDataTemplate>
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</localView:BeWoView>
|
||||
28
BeWo/View/Detail/AI/AiPromptbausteinView2.xaml.cs
Normal file
28
BeWo/View/Detail/AI/AiPromptbausteinView2.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.AI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AiPromptbausteinView2.xaml
|
||||
/// </summary>
|
||||
public partial class AiPromptbausteinView2 : BeWoView
|
||||
{
|
||||
public AiPromptbausteinView2()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -318,6 +318,13 @@
|
||||
Header="{markup:Translate Ressource}"
|
||||
Selected="Tabitem_Selected" />
|
||||
</dxa:AccordionItem>
|
||||
<dxa:AccordionItem Foreground="{StaticResource TabItemTextBrush}" Header="{markup:Translate AiTitle}">
|
||||
<dxa:AccordionItem
|
||||
Name="TabitemAiPromptbausteine"
|
||||
Foreground="Black"
|
||||
Header="{markup:Translate AiPromptbausteine}"
|
||||
Selected="Tabitem_Selected" />
|
||||
</dxa:AccordionItem>
|
||||
<dxa:AccordionItem Foreground="{StaticResource TabItemTextBrush}" Header="Sonstiges">
|
||||
<dxa:AccordionItem
|
||||
Name="TabitemAbsenceCategories"
|
||||
|
||||
@@ -566,6 +566,10 @@ namespace BeWo.View.Master
|
||||
case nameof(TabitemSozioTherapie):
|
||||
CheckMandatorVM(() => AddView(TabitemSozioTherapie, new SoziotherapieSettingsView(this)));
|
||||
return;
|
||||
case nameof(TabitemAiPromptbausteine):
|
||||
VMFactory.CreateAiPromptbausteinListAsync(
|
||||
r => this.Dispatch(() => AddView(TabitemAiPromptbausteine, new AiPromptbausteinView(r))));
|
||||
return;
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(accordionItem));
|
||||
|
||||
@@ -41,10 +41,10 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
|
||||
public AbstractDCListMapperVM(IEnumerable<DCType> pDCList)
|
||||
{
|
||||
_DCBackup = pDCList != null ? pDCList.ToObservableCollection() : new ObservableCollection<DCType>();
|
||||
_DCBackup = pDCList != null ? pDCList.ToObservableCollection() : new ObservableCollection<DCType>();
|
||||
|
||||
_DCBackup.CollectionChanged += (s, e) => _VMList.AddRange(e.NewItems.Cast<DCType>().Select(CreateVM));
|
||||
}
|
||||
_DCBackup.CollectionChanged += (s, e) => _VMList.AddRange(e.NewItems.Cast<DCType>().Select(CreateVM));
|
||||
}
|
||||
|
||||
public AbstractDCListMapperVM() : this(null) { }
|
||||
|
||||
@@ -156,6 +156,14 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Update(IEnumerable<DCType> pDCList)
|
||||
{
|
||||
// Zwingt _VMList, damit es die Anweisung im Konstruktor nicht knallt
|
||||
var t = VMList;
|
||||
|
||||
DCBackup.AddRange(pDCList);
|
||||
}
|
||||
|
||||
public virtual VMType AddNewVMToList()
|
||||
{
|
||||
VMList.Add(NewVM);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
private readonly List<AiPromptbausteinVM> _PossibleAiPromptbausteinParents;
|
||||
|
||||
|
||||
public AiPromptbausteinListVM(IEnumerable<AiPromptbausteinDC> pDataContracts) : base(pDataContracts)
|
||||
public AiPromptbausteinListVM(IEnumerable<AiPromptbausteinDC> pDataContracts = null) : base(pDataContracts)
|
||||
{
|
||||
_PossibleAiPromptbausteinParents = VMList.Where(w => w.IsParent).ToList();
|
||||
}
|
||||
|
||||
@@ -932,5 +932,14 @@ namespace BeWo.ViewModel
|
||||
callback(new AiConversationListVM(cb));
|
||||
});
|
||||
}
|
||||
|
||||
internal static void CreateAiPromptbausteinListAsync(Action<AiPromptbausteinListVM> rtn_viewmodel)
|
||||
{
|
||||
ServiceFacade.DoAiEnhancedServiceAsnyc(x => x.GetAiPromptbausteine(), cb =>
|
||||
{
|
||||
var list = new AiPromptbausteinListVM(cb);
|
||||
rtn_viewmodel(list);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
12528
Data/Access/SearchDAO.cs
12528
Data/Access/SearchDAO.cs
File diff suppressed because it is too large
Load Diff
@@ -64,5 +64,26 @@ namespace BeWo.Service.ServiceContracts
|
||||
[OperationContract]
|
||||
[RequirePermission(UserRightType.AiModuleChatAdd)]
|
||||
AiConversationMessageDC[] SendNewMessage(long conversation, string message);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
//[RequirePermission(UserRightType.AiModulePromptbausteineView)]
|
||||
IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine();
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequirePermission(UserRightType.AiModulePromptbausteineAdd)]
|
||||
IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDC);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequirePermission(UserRightType.AiModulePromptbausteineEdit)]
|
||||
Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
[RequirePermission(UserRightType.AiModulePromptbausteineRemove)]
|
||||
void DeleteAiPromptbausteine(Dictionary<long, long> oid2version);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.Service.Plugins;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Service.Plugins;
|
||||
using BeWo.Service.ServiceContracts;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -11,21 +12,66 @@ namespace BeWo.Service.ServiceImplementations
|
||||
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
||||
public class AiEnhancedServiceImp : IAiEnhancedService
|
||||
{
|
||||
public AiConfigDC GetAiConfig() => GetAiService().GetAiConfig();
|
||||
public AiConfigDC UpdateAiConfig(AiConfigDC toUpdate) => GetAiService().UpdateAiConfig(toUpdate);
|
||||
public IEnumerable<AiModelDC> GetAiModels() => GetAiService().GetAiModels();
|
||||
public IEnumerable<AiConversationDC> GetAiConversations(AiContextType uicontext, long? oid) => GetAiService().GetAiConversations(uicontext, oid);
|
||||
public AiConversationDC CreateAiConversation(AiConversationDC conversation, long modell_oid) => GetAiService().CreateAiConversation(conversation, modell_oid);
|
||||
public AiConversationDC CreateAiConversationWithMessage(AiConversationDC conversation, long modell_oid, string message) => GetAiService().CreateAiConversationWithMessage(conversation, modell_oid, message);
|
||||
public AiConversationDC CloneAiConversation(long conversation_oid, long? last_message_oid) => GetAiService().CloneAiConversation(conversation_oid, last_message_oid);
|
||||
public long UpdateAiConversationDisplayname(long oid, long version, string displayname) => GetAiService().UpdateAiConversationDisplayname(oid, version, displayname);
|
||||
public void DeleteAiConversation(long conversation_oid) => GetAiService().DeleteAiConversation(conversation_oid);
|
||||
public AiConfigDC GetAiConfig()
|
||||
=> GetAiService().GetAiConfig();
|
||||
|
||||
public AiConfigDC UpdateAiConfig(AiConfigDC toUpdate)
|
||||
=> GetAiService().UpdateAiConfig(toUpdate);
|
||||
|
||||
public IEnumerable<AiModelDC> GetAiModels()
|
||||
=> GetAiService().GetAiModels();
|
||||
|
||||
public IEnumerable<AiConversationDC> GetAiConversations(AiContextType uicontext, long? oid)
|
||||
=> GetAiService().GetAiConversations(uicontext, oid);
|
||||
|
||||
public AiConversationDC CreateAiConversation(AiConversationDC conversation, long modell_oid)
|
||||
=> GetAiService().CreateAiConversation(conversation, modell_oid);
|
||||
public AiConversationDC CreateAiConversationWithMessage(AiConversationDC conversation, long modell_oid, string message)
|
||||
=> GetAiService().CreateAiConversationWithMessage(conversation, modell_oid, message);
|
||||
|
||||
public AiConversationDC CloneAiConversation(long conversation_oid, long? last_message_oid)
|
||||
=> GetAiService().CloneAiConversation(conversation_oid, last_message_oid);
|
||||
|
||||
public long UpdateAiConversationDisplayname(long oid, long version, string displayname)
|
||||
=> GetAiService().UpdateAiConversationDisplayname(oid, version, displayname);
|
||||
|
||||
public void DeleteAiConversation(long conversation_oid)
|
||||
=> GetAiService().DeleteAiConversation(conversation_oid);
|
||||
|
||||
public AiConversationMessageDC[] SendNewMessage(long conversation, string message)
|
||||
=> GetAiService().SendNewMessage(conversation, message);
|
||||
|
||||
public AiConversationMessageDC[] SendNewMessage(long conversation, string message) => GetAiService().SendNewMessage(conversation, message);
|
||||
private AiService2 GetAiService()
|
||||
{
|
||||
var plugin = PluginLoader.FindClass<AiService2>();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public IEnumerable<AiPromptbausteinDC> GetAiPromptbausteine()
|
||||
{
|
||||
var dc = new AiPromptbausteinDC();
|
||||
|
||||
dc.Oid = 1;
|
||||
dc.IsParent = false;
|
||||
dc.Version = 1;
|
||||
dc.Text = "Beispiel";
|
||||
|
||||
return new List<AiPromptbausteinDC> { dc };
|
||||
}
|
||||
|
||||
public IEnumerable<AiPromptbausteinDC> CreateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDC)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Dictionary<long, long> UpdateAiPromptbausteine(IEnumerable<AiPromptbausteinDC> aiPromptbausteinDCs)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteAiPromptbausteine(Dictionary<long, long> oid2version)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -635,6 +635,12 @@ namespace BS.Shared
|
||||
AiModuleView2 = 201004,
|
||||
AiModuleViewSetting = 201005,
|
||||
AiModuleChatClone = 201006,
|
||||
AiModulePromptbausteineView = 201007,
|
||||
AiModulePromptbausteineAdd = 201008,
|
||||
AiModulePromptbausteineEdit = 201009,
|
||||
AiModulePromptbausteineRemove = 201010,
|
||||
AiModulePromptbausteineSeeAll = 201011,
|
||||
|
||||
}
|
||||
|
||||
public enum PersonType
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace BS.Shared.Extensions
|
||||
{
|
||||
public static class ControlExtensions
|
||||
{
|
||||
public static void Dispatch(this DispatcherObject p, Action pAction)
|
||||
public static void Dispatch(this DispatcherObject p, Action pAction, DispatcherPriority dispatcherPriority = DispatcherPriority.Normal)
|
||||
{
|
||||
p.Dispatcher.BeginInvoke(DispatcherPriority.Normal, pAction);
|
||||
p.Dispatcher.BeginInvoke(dispatcherPriority, pAction);
|
||||
}
|
||||
|
||||
private static Action EmptyDelegate = delegate() { };
|
||||
|
||||
Reference in New Issue
Block a user