From da4842a4dd7b1e24b6b5b7ea29a6df12f31f1afe Mon Sep 17 00:00:00 2001 From: puriphatt Date: Fri, 22 Nov 2024 16:16:38 +0700 Subject: [PATCH] fix: package properties --- src/pages/04_product-service/MainPage.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 89231c23..4ad97952 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -4142,6 +4142,18 @@ watch( " @submit=" (v) => { + if (!workItems[currentWorkIndex].attributes.workflowId) { + workItems[currentWorkIndex].attributes.workflowId = v.id; + workItems[currentWorkIndex].attributes.workflowStep.forEach((s) => { + if (!s.hasOwnProperty('productId')) { + s.productsId = workItems[currentWorkIndex].product.map( + (p) => p.id, + ); + } + }); + return; + } + if (dialogService) { workItems[currentWorkIndex].attributes.workflowId = v.id; workItems[currentWorkIndex].attributes.workflowStep.forEach(