feat(fields): мягкое удаление полей формы — архив удалённых с восстановлением и блок «Удалённые поля» в задаче
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user