feat(cv): redesign document editing with revision-safe letters and writing tools

This commit is contained in:
cesnimda
2026-10-25 22:44:14 +01:00
parent 01e10996c5
commit 2bfaf6c14b
57 changed files with 2859 additions and 118 deletions
@@ -0,0 +1,35 @@
using JobTrackerApi.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JobTrackerApi.Migrations;
[DbContext(typeof(JobTrackerContext))]
[Migration("20261025090000_AddCoverLetterDocumentDesign")]
public sealed class AddCoverLetterDocumentDesign : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
var text = ActiveProvider.Contains("MySql", StringComparison.OrdinalIgnoreCase) ? "longtext" : "TEXT";
migrationBuilder.AddColumn<string>(name: "CoverLetterDocumentSettingsJson", table: "JobApplications", type: text, nullable: true);
migrationBuilder.AddColumn<string>(name: "DocumentSettingsJson", table: "CoverLetterVersions", type: text, nullable: true);
migrationBuilder.AddColumn<string>(name: "CoverLetterDocumentSettingsJson", table: "SubmittedApplicationPackages", type: text, nullable: true);
migrationBuilder.AddColumn<string>(name: "RenderedCoverLetterHtml", table: "SubmittedApplicationPackages", type: text, nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
foreach (var (table, column) in new[]
{
("JobApplications", "CoverLetterDocumentSettingsJson"), ("CoverLetterVersions", "DocumentSettingsJson"),
("SubmittedApplicationPackages", "CoverLetterDocumentSettingsJson"), ("SubmittedApplicationPackages", "RenderedCoverLetterHtml"),
})
{
if (ActiveProvider.Contains("Sqlite", StringComparison.OrdinalIgnoreCase))
migrationBuilder.Sql($"ALTER TABLE \"{table}\" DROP COLUMN \"{column}\";");
else migrationBuilder.DropColumn(name: column, table: table);
}
}
}
@@ -1104,6 +1104,7 @@ namespace JobTrackerApi.Migrations
modelBuilder.Entity("JobTrackerApi.Models.CoverLetterVersion", b =>
{
b.Property<string>("DocumentSettingsJson").HasColumnType("TEXT");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
@@ -1150,6 +1151,8 @@ namespace JobTrackerApi.Migrations
b.Property<string>("ApplicationMaterialJson").IsRequired().HasColumnType("TEXT");
b.Property<string>("CareerProfileJson").HasColumnType("TEXT");
b.Property<string>("CoverLetterText").HasColumnType("TEXT");
b.Property<string>("CoverLetterDocumentSettingsJson").HasColumnType("TEXT");
b.Property<string>("RenderedCoverLetterHtml").HasColumnType("TEXT");
b.Property<DateTimeOffset>("CreatedAtUtc").HasColumnType("TEXT");
b.Property<string>("CvSettingsJson").HasColumnType("TEXT");
b.Property<string>("CvThemeId").HasMaxLength(64).HasColumnType("TEXT");
@@ -1832,6 +1835,8 @@ namespace JobTrackerApi.Migrations
b.Property<string>("CoverLetterText")
.HasColumnType("TEXT");
b.Property<string>("CoverLetterDocumentSettingsJson").HasColumnType("TEXT");
b.Property<DateTime?>("DateApplied")
.HasColumnType("TEXT");