From f56c5591cc744f482a84bfc0a5e1e140d8a79319 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Thu, 22 Aug 2024 16:37:27 +0700 Subject: [PATCH] refactor: no product on service work & select all search --- src/components/ProfileBanner.vue | 73 ++++++++------- src/pages/04_product-service/MainPage.vue | 103 +++++++++++++++------- 2 files changed, 112 insertions(+), 64 deletions(-) diff --git a/src/components/ProfileBanner.vue b/src/components/ProfileBanner.vue index d58ee26e..a3dc214d 100644 --- a/src/components/ProfileBanner.vue +++ b/src/components/ProfileBanner.vue @@ -81,38 +81,47 @@ const showOverlay = ref(false); @mouseleave="showOverlay = false" @click.stop="$emit('view')" > - - - +
+ + + +
{ + if (i.status === 'INACTIVE') { + return false; + } + return true; + }) + .forEach((i) => { + const productExists = selectProduct.value.some( + (product) => product.id === i.id, + ); + if (!productExists) { + selectProduct.value.push({ ...i }); + } + }); +} + async function fetchListOfOptionBranch() { const uid = getUserId(); const role = getRole(); @@ -3799,47 +3817,61 @@ watch( } " > -
-
+
+
- +