From 424c109b25d025e26234fe408a14c91b34b3181a Mon Sep 17 00:00:00 2001 From: wjh Date: Thu, 9 May 2024 16:05:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=96=B9=E6=A1=88=E6=98=8E=E7=BB=86=E7=9A=84?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=20(#950)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/950 Reviewed-by: sealday Co-authored-by: wjh Co-committed-by: wjh --- .../plugin-rental/src/client/hooks/index.tsx | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx b/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx index f9f715925..e972dfd7a 100644 --- a/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx +++ b/packages/plugins/@hera/plugin-rental/src/client/hooks/index.tsx @@ -24,13 +24,11 @@ export const useLeaseItems = (planId, date) => { params: { appends: ['new_products'], filter: { - contract_plan: { - contract_items: { - start_date: { $dateBefore: nowDay }, - end_date: { $dateAfter: nowDay }, - contract_id: { - $eq: value, - }, + effect_contracts: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, }, }, }, @@ -66,13 +64,11 @@ export const useFeeItems = (planId, date) => { params: { appends: ['new_fee_products'], filter: { - contract_plan: { - contract_items: { - start_date: { $dateBefore: nowDay }, - end_date: { $dateAfter: nowDay }, - contract_id: { - $eq: value, - }, + effect_contracts: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, }, }, }, @@ -108,13 +104,11 @@ export const useProductFeeItems = (planId, date) => { params: { appends: ['fee_items', 'new_products'], filter: { - contract_plan: { - contract_items: { - start_date: { $dateBefore: nowDay }, - end_date: { $dateAfter: nowDay }, - contract_id: { - $eq: value, - }, + effect_contracts: { + start_date: { $dateBefore: nowDay }, + end_date: { $dateAfter: nowDay }, + contract_id: { + $eq: value, }, }, },