feat(fields): мягкое удаление полей формы — архив удалённых с восстановлением и блок «Удалённые поля» в задаче

This commit is contained in:
2026-09-21 14:35:45 +03:00
parent d5f2925886
commit e3f0ebfb89
18 changed files with 296 additions and 48 deletions

View File

@@ -2,7 +2,7 @@ import { uploadToS3, uploadToS3FromFile, downloadFromS3, isS3Enabled } from "../
import { uploadsDir } from "../utils/upload";
import { db } from "../db";
import { fileUploads, formFields, forms, tasks, taskFieldValues } from "@shared/schema";
import { eq, and } from "drizzle-orm";
import { eq, and, isNull } from "drizzle-orm";
import { DocumentTemplateService } from "./template.service";
import { DataResolutionService } from "./data-resolution.service";
import { AssetService } from "./asset.service";
@@ -425,6 +425,7 @@ export class DocumentGenerationService {
.where(and(
eq(formFields.formId, targetFormId),
eq(formFields.code, targetFieldCode),
isNull(formFields.deletedAt),
))
.limit(1);