From 11575f3bedad4997a5969ad2c2e93a796d89789a Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:03:30 +0700 Subject: [PATCH] feat: api active only support for product closes https://github.com/Frappet/jws-frontend/issues/146 --- src/pages/04_product-service/MainPage.vue | 1 + src/pages/05_quotation/QuotationForm.vue | 1 + src/stores/product-service/index.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index cd1198bb..d6218544 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -596,6 +596,7 @@ async function fetchListOfProductIsAdd( pageSize: 150, orderField: 'name', orderBy: true ? 'asc' : 'desc', + activeOnly: true, }); if (res) { diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index ee43b2cd..94375f0b 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -665,6 +665,7 @@ async function getAllProduct( pageSize: opts?.pageSize ?? 9999, query: opts?.query, productGroupId: groupId, + activeOnly: true, }); if (ret) productList.value[groupId] = ret.result; } diff --git a/src/stores/product-service/index.ts b/src/stores/product-service/index.ts index ef12a196..f281d362 100644 --- a/src/stores/product-service/index.ts +++ b/src/stores/product-service/index.ts @@ -139,6 +139,7 @@ const useProductServiceStore = defineStore('api-product-service', () => { status?: string; shared?: boolean; orderField?: string; + activeOnly?: boolean; orderBy?: 'asc' | 'desc'; }) { const params = new URLSearchParams();