From aa96b13ec28a145af98df1d32bb162a9bd1e2d27 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Thu, 29 Aug 2024 12:28:30 +0100 Subject: [PATCH] ENCOA-121 & ENCOA-122: Fixed a bug where updating the account information of a Corporate or Master Corporate was not working --- src/components/UserCard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/UserCard.tsx b/src/components/UserCard.tsx index 069ed4a3..00f80961 100644 --- a/src/components/UserCard.tsx +++ b/src/components/UserCard.tsx @@ -140,8 +140,9 @@ const UserCard = ({ }, [users, referralAgent]); const updateUser = () => { - if (user.type === "corporate" || (user.type === "mastercorporate" && (!paymentValue || paymentValue < 0))) + if ((user.type === "corporate" || user.type === "mastercorporate") && (!paymentValue || paymentValue < 0)) return toast.error("Please set a price for the user's package before updating!"); + if (!confirm(`Are you sure you want to update ${user.name}'s account?`)) return; axios