Mandator Erweitert + Setting Page Anbindung

This commit is contained in:
2024-12-05 14:20:14 +01:00
parent 688ac1de9a
commit d50a925b95
9 changed files with 189 additions and 13 deletions

View File

@@ -9,11 +9,12 @@
x:Name="root"
d:DesignWidth="100"
mc:Ignorable="d">
<Grid Background="White">
<Grid>
<Button
x:Name="btn"
Height="24"
Padding="0"
Background="Transparent"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
dx:ThemeManager.ThemeName="None"

View File

@@ -10,15 +10,16 @@
xmlns:utils="clr-namespace:BeWo.View.Controls.Utils"
xmlns:view="clr-namespace:BeWo.View"
mc:Ignorable="d">
<Grid HorizontalAlignment="Left">
<Grid HorizontalAlignment="Left" IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<GroupBox
x:Name="groupBoxSozio"
Grid.Row="3"
Grid.ColumnSpan="2"
Margin="3,3,3,3"
Margin="3"
Header="Soziotherapie"
Style="{StaticResource ObjectEditGroupBox}"
Visibility="{Binding Path=Itself, Converter={StaticResource UserPermission2BoolConverter}, ConverterParameter={x:Static core:SettingsKeys.AllowGkvAbrechnung}}">
Style="{StaticResource ObjectEditGroupBox}">
<!-- Kann frei genutzt werden -->
<Grid>
<Grid.RowDefinitions>
@@ -62,17 +63,73 @@
Margin="3"
SearchMode="All"
SelectedCompactEmployeeDC="{Binding SoziotherapieAnsprechpartner, Mode=TwoWay}" />
</Grid>
</GroupBox>
<GroupBox
x:Name="groupBoxGkvAnsicht"
Grid.Row="1"
Margin="3"
Header="GKV-Abrechnung Ansicht"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
WaitingForKrankenkasse
</Label>
<utils:ColorPicker
Grid.Row="0"
Grid.Column="1"
Margin="3"
SelectedColor="{Binding ColorWaitTooLong, Mode=TwoWay}" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
SendeUrbelege
</Label>
<utils:ColorPicker
Grid.Row="1"
Grid.Column="1"
Margin="3"
SelectedColor="{Binding ColorSendUrbelege, Mode=TwoWay}" />
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Signalfarbe 1
Begleitzettel einzeln drucken
</Label>
<utils:ColorPicker
<CheckBox
Grid.Row="2"
Grid.Column="1"
Margin="3" />
Margin="6,3,3,3"
IsChecked="{Binding ShowGkvBzEinzel}" />
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Begleitzettel mit Urbelegen drucken
</Label>
<CheckBox
Grid.Row="3"
Grid.Column="1"
Margin="6,3,3,3"
IsChecked="{Binding ShowGkvBzUrbelege}" />
</Grid>
</GroupBox>
</Grid>

View File

@@ -7,6 +7,7 @@ using BS.Shared.Extensions;
using BeWo.Core;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using System.Windows.Media;
namespace BeWo.ViewModel
{
@@ -53,6 +54,12 @@ namespace BeWo.ViewModel
private string _IBAN;
private CompactEmployeeDC _SoziotherapieAnsprechpartner;
private ImageVM _Logo;
private string _ColorWaitTooLongStr;
private string _ColorSendUrbelegeStr;
private SolidColorBrush _ColorWaitTooLong;
private SolidColorBrush _ColorSendUrbelege;
private bool _ShowGkvBzEinzel;
private bool _ShowGkvBzUrbelege;
public MandatorVM(IList<InvoiceNumberVM> invoiceNumberList, MandatorDC pDC) : base(pDC, true)
{
@@ -586,7 +593,66 @@ namespace BeWo.ViewModel
FirePropertyChanged(nameof(Logo));
}
}
public SolidColorBrush ColorWaitTooLong
{
get { return _ColorWaitTooLong; }
set
{
if (!AreDifferent(ColorWaitTooLong, value))
return;
_ColorWaitTooLongStr = value?.ToString();
_ColorWaitTooLong = value;
StoreDirtyInformation(AreDifferent(DataContract.ColorWaitTooLong, value), nameof(ColorWaitTooLong));
FirePropertyChanged(nameof(ColorWaitTooLong));
}
}
public SolidColorBrush ColorSendUrbelege
{
get { return _ColorSendUrbelege; }
set
{
if (!AreDifferent(ColorSendUrbelege, value))
return;
_ColorSendUrbelegeStr = value?.ToString();
_ColorSendUrbelege = value;
StoreDirtyInformation(AreDifferent(DataContract.ColorSendUrbelege, value), nameof(ColorSendUrbelege));
FirePropertyChanged(nameof(ColorSendUrbelege));
}
}
public bool ShowGkvBzEinzel
{
get { return _ShowGkvBzEinzel; }
set
{
if (!AreDifferent(ShowGkvBzEinzel, value))
return;
_ShowGkvBzEinzel = value;
StoreDirtyInformation(AreDifferent(DataContract.ShowGkvBzEinzel, value), nameof(ShowGkvBzEinzel));
FirePropertyChanged(nameof(ShowGkvBzEinzel));
}
}
public bool ShowGkvBzUrbelege
{
get { return _ShowGkvBzUrbelege; }
set
{
if (!AreDifferent(ShowGkvBzUrbelege, value))
return;
_ShowGkvBzUrbelege = value;
StoreDirtyInformation(AreDifferent(DataContract.ShowGkvBzUrbelege, value), nameof(ShowGkvBzUrbelege));
FirePropertyChanged(nameof(ShowGkvBzUrbelege));
}
}
public bool CanEditIKLeistungserbringer { get; set; }
public string CanEditIKLeistungserbringerTooltip { get; set; }
@@ -612,6 +678,12 @@ namespace BeWo.ViewModel
CanEditIKLeistungserbringer = pDataContract.CanEditIKLeistungserbringer;
CanEditIKLeistungserbringerTooltip = pDataContract.CanEditIKLeistungserbringerTooltip;
_SoziotherapieAnsprechpartner = pDataContract.SoziotherapieAnsprechpartner;
_ColorWaitTooLong = ColorExtensions.ParseSolidColorBrush(pDataContract.ColorWaitTooLong);
_ColorWaitTooLongStr = pDataContract.ColorWaitTooLong;
_ColorSendUrbelege = ColorExtensions.ParseSolidColorBrush(pDataContract.ColorSendUrbelege);
_ColorSendUrbelegeStr = pDataContract.ColorSendUrbelege;
_ShowGkvBzEinzel = pDataContract.ShowGkvBzEinzel;
_ShowGkvBzUrbelege = pDataContract.ShowGkvBzUrbelege;
if(pDataContract.Logo is object)
Logo = new ImageVM(pDataContract.Logo);
@@ -677,7 +749,12 @@ namespace BeWo.ViewModel
pDataContract.BankAccount.Bic = Bic;
pDataContract.BankAccount.IBAN = IBAN;
pDataContract.SoziotherapieAnsprechpartner = SoziotherapieAnsprechpartner;
pDataContract.ColorWaitTooLong = _ColorWaitTooLongStr;
pDataContract.ColorSendUrbelege = _ColorSendUrbelegeStr;
pDataContract.ShowGkvBzEinzel = ShowGkvBzEinzel;
pDataContract.ShowGkvBzUrbelege = ShowGkvBzUrbelege;
pDataContract.Logo = Logo.CommitToDataContract();
return pDataContract;

View File

@@ -49,7 +49,11 @@ namespace BeWo.Data.Entities
public virtual BankAccount BankAccount { get; set; }
public virtual Employee SoziotherapieAnsprechpartner { get; set; }
public virtual Image Logo { get; set; }
public virtual string ColorWaitTooLong { get; set; }
public virtual string ColorSendUrbelege { get; set; }
public virtual bool ShowGkvBzEinzel { get; set; }
public virtual bool ShowGkvBzUrbelege { get; set; }
public virtual long BeWoClientType
{
get

View File

@@ -29,6 +29,10 @@
<property name="LastModules" />
<property column="ApiKey" type="String" name="Apikey" length="256" />
<property column="IKLeistungserbringer" type="String" name="IKLeistungserbringer" length="16" />
<property name="ColorWaitTooLong"/>
<property name="ColorSendUrbelege"/>
<property name="ShowGkvBzEinzel"/>
<property name="ShowGkvBzUrbelege"/>
<many-to-one name="BankAccount" column="BankAccountOid" class="BeWo.Data.Entities.BankAccount,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
<many-to-one name="SoziotherapieAnsprechpartner" column="SoziotherapieAnsprechpartnerOid" class="BeWo.Data.Entities.Employee,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
<many-to-one name="Logo" column="ImageOid" class="BeWo.Data.Entities.Image,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>

View File

@@ -0,0 +1,5 @@
ALTER TABLE `mandator`
ADD COLUMN `ColorWaitTooLong` VARCHAR(16) NULL DEFAULT NULL AFTER `ImageOid`,
ADD COLUMN `ColorSendUrbelege` VARCHAR(16) NULL DEFAULT NULL AFTER `ColorWaitTooLong`,
ADD COLUMN `ShowGkvBzEinzel` TINYINT NULL DEFAULT NULL AFTER `ColorSendUrbelege`,
ADD COLUMN `ShowGkvBzUrbelege` TINYINT NULL DEFAULT NULL AFTER `ShowGkvBzEinzel`;

View File

@@ -31,6 +31,11 @@ namespace BeWo.Service.DCEntityMapper
to.AllowSbd = !string.IsNullOrEmpty(to.ClientId) && to.ClientId == "SBD";
to.ShowGkvBzEinzel = from.ShowGkvBzEinzel;
to.ShowGkvBzUrbelege = from.ShowGkvBzUrbelege;
to.ColorSendUrbelege = from.ColorSendUrbelege;
to.ColorWaitTooLong = from.ColorWaitTooLong;
#if DEBUG
//pDataContract.AllowSbd = true;
#endif
@@ -77,6 +82,11 @@ namespace BeWo.Service.DCEntityMapper
to.SoziotherapieAnsprechpartner = MapperFactory.CompactEmployeeDC_Employee.MergeWithEntity(from.SoziotherapieAnsprechpartner, to.SoziotherapieAnsprechpartner, false);
to.Logo = MapperFactory.ImageDC_Image.MergeWithEntity(from.Logo, to.Logo, false);
to.ShowGkvBzEinzel = from.ShowGkvBzEinzel;
to.ShowGkvBzUrbelege = from.ShowGkvBzUrbelege;
to.ColorSendUrbelege = from.ColorSendUrbelege;
to.ColorWaitTooLong = from.ColorWaitTooLong;
return to;
}

View File

@@ -1,6 +1,7 @@
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Invoicing;
using System.Runtime.Serialization;
using System.Windows.Media;
namespace BS.Shared.DataContracts
{
@@ -31,5 +32,9 @@ namespace BS.Shared.DataContracts
[DataMember] public string CanEditIKLeistungserbringerTooltip { get; set; }
[DataMember] public CompactEmployeeDC SoziotherapieAnsprechpartner { get; set; }
[DataMember] public ImageDC Logo { get; set; }
[DataMember] public string ColorWaitTooLong { get; set; }
[DataMember] public string ColorSendUrbelege { get; set; }
[DataMember] public bool ShowGkvBzEinzel { get; set; }
[DataMember] public bool ShowGkvBzUrbelege { get; set; }
}
}

View File

@@ -78,5 +78,18 @@ namespace BS.Shared.Extensions
}
public static bool IsBrighter(this Color c, double threshold) => c.GetBrightness() > threshold;
public static Color Parse(string str)
{
return (Color)ColorConverter.ConvertFromString(str);
}
public static SolidColorBrush ParseSolidColorBrush(string str)
{
if (str is null)
return null;
return (SolidColorBrush)new BrushConverter().ConvertFrom(str);
}
}
}