From 23e2047836984f4980e0b541d83897c403e56abe Mon Sep 17 00:00:00 2001 From: Lixian Zhou Date: Tue, 10 Mar 2026 17:05:48 -0400 Subject: [PATCH] fix --- client/src/components/customers/UpdateCustomer.js | 15 ++++++++------- client/src/components/customers/ViewCustomer.js | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/src/components/customers/UpdateCustomer.js b/client/src/components/customers/UpdateCustomer.js index 1d3bce7..ce91804 100644 --- a/client/src/components/customers/UpdateCustomer.js +++ b/client/src/components/customers/UpdateCustomer.js @@ -40,6 +40,7 @@ const UpdateCustomer = () => { const [searchParams] = useSearchParams(); const initialTab = searchParams.get('tab'); const normalizedInitialTab = ['additionalInfo', 'complianceDeadlines'].includes(initialTab) ? 'personalInfo' : initialTab; + const showDischargeButton = searchParams.get('fromEdit') === '1'; const [activeTab, setActiveTab] = useState(normalizedInitialTab || 'personalInfo'); const [currentCustomer, setCurrentCustomer] = useState(undefined); @@ -1310,13 +1311,6 @@ const UpdateCustomer = () => { )} )} - {isCustomerActive() && ( -
- -
- )} {!isCustomerActive() && (
+
+ )} closeDeleteModal()}> diff --git a/client/src/components/customers/ViewCustomer.js b/client/src/components/customers/ViewCustomer.js index 324b120..a17dc39 100644 --- a/client/src/components/customers/ViewCustomer.js +++ b/client/src/components/customers/ViewCustomer.js @@ -44,7 +44,7 @@ const ViewCustomer = () => { } const goToEdit = (id) => { - navigate(`/customers/edit/${id}?tab=${activeTab}`) + navigate(`/customers/edit/${id}?tab=${activeTab}&fromEdit=1`) } // Check if customer is active