From e9710cc82acae884a684b33fd59fd4aeca2710e5 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Mon, 11 Nov 2024 17:40:10 +0700 Subject: [PATCH] fix: attributes not stored in database --- src/controllers/04-flow-template-controller.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/04-flow-template-controller.ts b/src/controllers/04-flow-template-controller.ts index f8980f5..f992c16 100644 --- a/src/controllers/04-flow-template-controller.ts +++ b/src/controllers/04-flow-template-controller.ts @@ -198,6 +198,7 @@ export class FlowTemplateController extends Controller { name: v.name, detail: v.detail, order: i + 1, + attributes: v.attributes, responsiblePerson: { create: v.responsiblePersonId?.map((id) => ({ userId: id, @@ -247,6 +248,7 @@ export class FlowTemplateController extends Controller { name: v.name, detail: v.detail, order: i + 1, + attributes: v.attributes, value: { create: v.value?.map((val) => ({ value: val })), }, @@ -263,6 +265,7 @@ export class FlowTemplateController extends Controller { name: v.name, detail: v.detail, order: i + 1, + attributes: v.attributes, value: { deleteMany: {}, create: v.value?.map((val) => ({ value: val })),