From adc04a1a408a4786a35c69fc927cf945ee21203b Mon Sep 17 00:00:00 2001 From: louiscklaw Date: Tue, 22 Apr 2025 23:16:10 +0800 Subject: [PATCH] update fix status filter for customer, --- 002_source/cms/src/app/dashboard/customers/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/002_source/cms/src/app/dashboard/customers/page.tsx b/002_source/cms/src/app/dashboard/customers/page.tsx index a55faf8..1edb4a0 100644 --- a/002_source/cms/src/app/dashboard/customers/page.tsx +++ b/002_source/cms/src/app/dashboard/customers/page.tsx @@ -112,6 +112,10 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element { let tempFilter = [], tempSortDir = ''; + if (status) { + tempFilter.push(`status = "${status}"`); + } + if (sortDir) { tempSortDir = `-created`; } @@ -136,7 +140,7 @@ export default function Page({ searchParams }: PageProps): React.JSX.Element { // sort: tempSortDir, // // // }); - }, [sortDir, email, phone]); + }, [sortDir, email, phone, status]); if (showLoading) return ;