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

@@ -1,5 +1,5 @@
import { db } from "../db";
import { eq, and, sql } from "drizzle-orm";
import { eq, and, sql, isNull } from "drizzle-orm";
import { tasks, taskFieldValues, contractNumberCounters, forms, formFields } from "@shared/schema";
export interface ContractNumberConfig {
@@ -50,7 +50,8 @@ async function getTaskFieldValueByCode(
.where(
and(
eq(formFields.formId, task.tasks.formId),
eq(formFields.code, fieldCode)
eq(formFields.code, fieldCode),
isNull(formFields.deletedAt)
)
)
.limit(1);