From aaa39fc72f006045c4afd5fa713fc9c1caf009cf Mon Sep 17 00:00:00 2001 From: puriphatt Date: Tue, 29 Oct 2024 17:17:32 +0700 Subject: [PATCH] fix(04): service with workflow --- .../04_product-service/FormServiceWork.vue | 19 +- .../04_product-service/ServiceProperties.vue | 977 ++++++++++-------- .../WorkManagementComponent.vue | 479 ++++++--- src/pages/04_product-service/MainPage.vue | 76 +- 4 files changed, 994 insertions(+), 557 deletions(-) diff --git a/src/components/04_product-service/FormServiceWork.vue b/src/components/04_product-service/FormServiceWork.vue index 7232d137..dcae360a 100644 --- a/src/components/04_product-service/FormServiceWork.vue +++ b/src/components/04_product-service/FormServiceWork.vue @@ -74,7 +74,12 @@ async function addWork() { workItems.value.push({ id: '', name: '', - attributes: { additional: [], showTotalPrice: false }, + attributes: { + additional: [], + showTotalPrice: false, + stepProperties: [], + workflowId: '', + }, product: [], }); await nextTick(); @@ -177,8 +182,16 @@ watch( v-model:product-items="work.product" v-model:attributes="work.attributes" @add-product="$emit('addProduct', index)" - @move-work-up="moveItemUp(workItems, index)" - @move-work-down="moveItemDown(workItems, index)" + @move-work-up=" + () => { + moveItemUp(workItems, index); + } + " + @move-work-down=" + () => { + moveItemDown(workItems, index); + } + " @delete-work="confirmDelete(workItems, index)" @move-product-up="moveItemUp" @move-product-down="moveItemDown" diff --git a/src/components/04_product-service/ServiceProperties.vue b/src/components/04_product-service/ServiceProperties.vue index 235180b1..0fbae5fc 100644 --- a/src/components/04_product-service/ServiceProperties.vue +++ b/src/components/04_product-service/ServiceProperties.vue @@ -1,20 +1,35 @@ diff --git a/src/components/04_product-service/WorkManagementComponent.vue b/src/components/04_product-service/WorkManagementComponent.vue index 66085da1..bc2c5d0d 100644 --- a/src/components/04_product-service/WorkManagementComponent.vue +++ b/src/components/04_product-service/WorkManagementComponent.vue @@ -1,21 +1,32 @@