fix: cannot remove user
This commit is contained in:
parent
185e76b7e9
commit
6002b6b1a7
1 changed files with 11 additions and 6 deletions
|
|
@ -272,12 +272,17 @@ export class FlowTemplateController extends Controller {
|
||||||
deleteMany: {},
|
deleteMany: {},
|
||||||
create: v.value?.map((val) => ({ value: val })),
|
create: v.value?.map((val) => ({ value: val })),
|
||||||
},
|
},
|
||||||
responsiblePerson: {
|
responsiblePerson: v.responsiblePersonId
|
||||||
createMany: {
|
? {
|
||||||
data: v.responsiblePersonId?.map((id) => ({ userId: id })) || [],
|
deleteMany: {
|
||||||
skipDuplicates: true,
|
userId: { notIn: v.responsiblePersonId },
|
||||||
},
|
},
|
||||||
},
|
createMany: {
|
||||||
|
data: v.responsiblePersonId?.map((id) => ({ userId: id })) || [],
|
||||||
|
skipDuplicates: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
responsibleInstitution: {
|
responsibleInstitution: {
|
||||||
deleteMany: {},
|
deleteMany: {},
|
||||||
create: v.responsibleInstitution?.map((group) => ({ group })),
|
create: v.responsibleInstitution?.map((group) => ({ group })),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue