ENCOA-121 & ENCOA-122: Fixed a bug where updating the account information of a Corporate or Master Corporate was not working

This commit is contained in:
Tiago Ribeiro
2024-08-29 12:28:30 +01:00
parent f9429d1056
commit aa96b13ec2

View File

@@ -140,8 +140,9 @@ const UserCard = ({
}, [users, referralAgent]); }, [users, referralAgent]);
const updateUser = () => { 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!"); 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; if (!confirm(`Are you sure you want to update ${user.name}'s account?`)) return;
axios axios