fix(cv): bind letter proposals to current sources and preserve document choices

This commit is contained in:
cesnimda
2026-10-26 03:44:37 +01:00
parent 8948c988e2
commit 8979244576
21 changed files with 816 additions and 32 deletions
@@ -6,6 +6,7 @@ namespace JobTrackerApi.Models;
public sealed class CoverLetterDocumentSettings
{
public int SchemaVersion { get; set; } = 1;
public string Language { get; set; } = "en";
public string SenderName { get; set; } = "";
public string SenderTitle { get; set; } = "";
public string SenderEmail { get; set; } = "";
@@ -47,6 +48,7 @@ public static class CoverLetterDocumentSettingsJson
return new()
{
SchemaVersion = 1, ThemeId = theme.Id,
Language = value.Language?.Trim().ToLowerInvariant() is "nb" or "nb-no" ? "nb-NO" : "en",
SenderName = Text(value.SenderName, 300), SenderTitle = Text(value.SenderTitle, 300),
SenderEmail = Text(value.SenderEmail, 300), SenderPhone = Text(value.SenderPhone, 100), SenderLocation = Text(value.SenderLocation, 300),
Recipient = Text(value.Recipient, 2000), Subject = Text(value.Subject, 500), Date = Text(value.Date, 100),