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

@@ -44,7 +44,8 @@ export async function getGanttFieldsByForm(formIds: number[], organizationId: nu
.where(and(
inArray(formFields.formId, formIds),
eq(forms.organizationId, organizationId),
sql`${formFields.ganttRole} IS NOT NULL`
sql`${formFields.ganttRole} IS NOT NULL`,
isNull(formFields.deletedAt)
));
return rows
@@ -146,7 +147,8 @@ export async function shiftRelatedTasks(
.innerJoin(forms, eq(formFields.formId, forms.id))
.where(and(
eq(forms.organizationId, organizationId),
sql`${formFields.ganttRole} IS NOT NULL`
sql`${formFields.ganttRole} IS NOT NULL`,
isNull(formFields.deletedAt)
));
const validFields: GanttFieldInfo[] = allGanttFields