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