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

@@ -8,7 +8,7 @@ import {
type FormField,
type FormStatus,
} from '@shared/schema';
import { eq, and, sql } from 'drizzle-orm';
import { eq, and, sql, isNull } from 'drizzle-orm';
import { storage } from '../storage';
import { VPN_FORM_ID } from './vpn.config';
@@ -30,7 +30,7 @@ export async function getVpnFormCache(organizationId: number): Promise<VpnFormCa
db
.select()
.from(formFields)
.where(eq(formFields.formId, VPN_FORM_ID))
.where(and(eq(formFields.formId, VPN_FORM_ID), isNull(formFields.deletedAt)))
.then(rows => rows as FormField[]),
db
.select()