From 1df27aeed0ffd2f46eb4ae68d453b7e77ca4a1be Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 25 Nov 2024 09:57:35 +0700 Subject: [PATCH] fix: properties workflow when create package --- src/pages/04_product-service/MainPage.vue | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 9fb6ebc9..d0eae329 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -4144,16 +4144,21 @@ watch( " @submit=" (v) => { - if (!workItems[currentWorkIndex].attributes.workflowId) { + if ( + !workItems[currentWorkIndex].attributes.workflowId && + !dialogService + ) { 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; + workItems[currentWorkIndex].attributes.workflowStep.forEach( + (step) => { + if (!step.hasOwnProperty('productId')) { + console.log(1.1); + step.productsId = workItems[currentWorkIndex].product.map( + (p) => p.id, + ); + } + }, + ); } if (dialogService) {