fix(career): preserve reviewed profile values
Keep extraction heuristics out of manual save, version, and import paths so reviewed locations, URLs, dates, and languages round-trip unchanged.
This commit is contained in:
@@ -103,7 +103,7 @@ namespace JobTrackerApi.Controllers
|
||||
|
||||
private async Task<TailoredCvDraft> UpsertGeneratedTailoredCvDraftAsync(JobApplication job, ApplicationUser user, string? mode, CancellationToken cancellationToken)
|
||||
{
|
||||
var structured = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
|
||||
var structured = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
|
||||
var jobText = string.Join("\n\n", new[] { job.JobTitle, job.Company?.Name, job.Description, job.TranslatedDescription, job.Notes, job.ShortSummary, job.JobUrl }
|
||||
.Where(value => !string.IsNullOrWhiteSpace(value)));
|
||||
var structuredCvContext = BuildStructuredCvContext(user);
|
||||
@@ -1312,7 +1312,7 @@ Canonical profile:
|
||||
// Builds CV text grouped by section so match coverage can show *where* the evidence sits.
|
||||
private static Dictionary<string, string> BuildCvSections(ApplicationUser? user)
|
||||
{
|
||||
var structured = StructuredCvProfileJson.Deserialize(user?.ProfileCvStructureJson);
|
||||
var structured = StructuredCvProfileJson.DeserializePersisted(user?.ProfileCvStructureJson);
|
||||
var sections = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
void Add(string name, IEnumerable<string?> values)
|
||||
@@ -1752,7 +1752,7 @@ Candidate CV/profile:
|
||||
return BadRequest("Add your profile CV text on the Profile page before generating a tailored CV draft.");
|
||||
}
|
||||
|
||||
var structured = StructuredCvProfileJson.Deserialize(user.ProfileCvStructureJson);
|
||||
var structured = StructuredCvProfileJson.DeserializePersisted(user.ProfileCvStructureJson);
|
||||
if (structured.Summary.Count == 0 && structured.Jobs.Count == 0 && structured.Skills.Count == 0)
|
||||
{
|
||||
return BadRequest("Build and review your canonical structured CV on the Profile page before generating a tailored draft.");
|
||||
|
||||
Reference in New Issue
Block a user