3 Commits
Author SHA1 Message Date
fierke 1d54bd749a [feat:] dashboard 2026-09-23 18:14:50 +02:00
fierke cbda6d6563 [fix:] label pdf is not sorted by used_plz 2026-09-23 17:30:09 +02:00
fierke 6ed8c0e231 [fix:] default module config was wrong 2026-09-19 20:15:56 +02:00
5 changed files with 65 additions and 14 deletions
+1 -2
View File
@@ -99,8 +99,7 @@ public static class SchemaMigration
// Example: Add a new field that didn't exist before
if (!obj.ContainsKey("moduleConfig"))
{
string deflt = JsonConvert.SerializeObject(new ModuleConfig());
obj["moduleConfig"] = default;
obj["moduleConfig"] = JToken.FromObject(new ModuleConfig());
}
return obj;
+5 -1
View File
@@ -20,7 +20,7 @@ public class Settings
public Customers customers = new();
public PdfExportSettings pdfExport { get; set; } = new();
public ModuleConfig moduleConfig { get; set; } = new();
public ModuleConfig moduleConfig { get; set; } = new ModuleConfig();
public Settings()
{
@@ -79,6 +79,10 @@ public class ModuleConfig
/// Contains enabled modules and whether it's password-protected or not (non-existing-feature but soon)
/// </summary>
public List<(LCModule, bool)> EnabledModules = new();
public ModuleConfig()
{
EnabledModules = new List<(LCModule,bool)>();
}
}
public enum LCModule
+38 -1
View File
@@ -21,7 +21,44 @@
<MenuItem Header="Über" x:Name="MnuAbout" Click="MnuAbout_OnClick" />
</MenuItem>
</Menu>
<TabControl Grid.Row="1">
<TabControl Grid.Row="1" x:Name="TcMain">
<TabItem x:Name="Home">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<LucideIcon Kind="House" Width="32" Height="32" Size="32" />
<!-- <Label FontSize="20" Content="Addressverwaltung" VerticalContentAlignment="Center" /> -->
</StackPanel>
</TabItem.Header>
<Grid RowDefinitions="3*,*,100">
<StackPanel Orientation="Vertical" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" > <!-- ColumnDefinitions="*,*" -->
<Label Content="Welcome to Logofclient!" HorizontalAlignment="Center" FontSize="32" ></Label>
<Label Content="Version 1.0.1" FontSize="16" HorizontalAlignment="Center"></Label>
<!-- <Image Source="assets/calc_man.png" MaxHeight="350" VerticalAlignment="Center" HorizontalAlignment="Center" /> -->
</StackPanel>
<Grid Grid.Row="1" Margin="20" IsVisible="True" x:Name="GrdHMCalcMan">
<Image Source="assets/calc_man.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
<!-- <Grid ColumnDefinitions="*,*,*" Grid.Row="1"> -->
<StackPanel Grid.Row="2" Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center"
Margin="0,0,5,0">
<Button Width="250" HorizontalContentAlignment="Center"
Margin="0,0,0,10" IsEnabled="True" VerticalAlignment="Stretch"
x:Name="BtnAdmgmt" Click="BtnAdmgmt_OnClick">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<LucideIcon Kind="MapPinHouse" Width="36" Height="36" />
<Label Content="Addressverwaltung" VerticalContentAlignment="Center" FontSize="15"
FontWeight="Bold" />
</StackPanel>
<TextBlock TextWrapping="Wrap" FontSize="9" Text="Strukturierte Verwaltung von Adressen für Pressepost-Printmailings inkl. Erstellung von Bundleitzetteln." HorizontalAlignment="Stretch" TextAlignment="Left"></TextBlock>
</StackPanel>
</Button>
</StackPanel>
<!-- </Grid> -->
</Grid>
</TabItem>
<TabItem IsVisible="False" x:Name="Addressmanagement">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
+8
View File
@@ -1471,4 +1471,12 @@ public partial class MainWindow : Window
}
}
private void BtnAdmgmt_OnClick(object? sender, RoutedEventArgs e)
{
if (Addressmanagement.IsVisible && Addressmanagement.IsVisible)
{
TcMain.SelectedIndex = 1;
}
}
}
+13 -10
View File
@@ -121,17 +121,18 @@ public class PdfBuilder
}
// national addresses
for (var i = 0; i < addressSet.KasPersons.Count; i++)
foreach (var person in addressSet.KasPersons
.Where(person => person.IsGermany())
.OrderBy(person => person.used_plz))
{
string senderLineID = senderLine;
if (!addressSet.KasPersons[i].IsGermany()) continue;
var addr = AddressCreator.CreateFinalMarkdownString(addressSet.KasPersons[i].id);
var addr = AddressCreator.CreateFinalMarkdownString(person.id);
if (string.IsNullOrWhiteSpace(addr)) continue;
if (pvst)
senderLineID += $"</font6>**PvSt, DP AG, Entgelt bezahlt, ZKZ {Settings._instance.pdfExport.rsZKZ}**\n<font6>";
if (addressSet.KasPersons[i].refsid != null || addressSet.KasPersons[i].refsid != 0)
senderLineID += $"ID: {addressSet.KasPersons[i].refsid}\n</font6>";
if (person.refsid != null || person.refsid != 0)
senderLineID += $"ID: {person.refsid}\n</font6>";
else
senderLineID += "\n</font6>";
if (!string.IsNullOrEmpty(senderLineID))
@@ -141,17 +142,19 @@ public class PdfBuilder
}
// international addresses
for (var i = 0; i < addressSet.KasPersons.Count; i++)
foreach (var person in addressSet.KasPersons
.Where(person => !person.IsGermany())
.OrderBy(person => person.land)
.ThenBy(person => person.used_plz))
{
string senderLineID = senderLine;
if (addressSet.KasPersons[i].IsGermany()) continue;
var addr = AddressCreator.CreateFinalMarkdownString(addressSet.KasPersons[i].id);
var addr = AddressCreator.CreateFinalMarkdownString(person.id);
if (string.IsNullOrWhiteSpace(addr)) continue;
if (pvst)
senderLineID += $"</font6>**PvSt, DP AG, Entgelt bezahlt, ZKZ {Settings._instance.pdfExport.rsZKZ}**\n<font6>";
if (addressSet.KasPersons[i].refsid != null || addressSet.KasPersons[i].refsid != 0)
senderLineID += $"ID: {addressSet.KasPersons[i].refsid}\n</font6>";
if (person.refsid != null || person.refsid != 0)
senderLineID += $"ID: {person.refsid}\n</font6>";
else
senderLineID += "\n</font6>";
if (!string.IsNullOrEmpty(senderLineID))