From 5379cdb0d204ca34956cacfa592faee14627c42f Mon Sep 17 00:00:00 2001 From: Joao Ramos Date: Fri, 12 Jan 2024 00:23:18 +0000 Subject: [PATCH] Blocked corporate user edit for corporate --- src/dashboards/Agent.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dashboards/Agent.tsx b/src/dashboards/Agent.tsx index c2dcff5d..943a5742 100644 --- a/src/dashboards/Agent.tsx +++ b/src/dashboards/Agent.tsx @@ -40,9 +40,9 @@ export default function AgentDashboard({user}: Props) { const inactiveReferredCorporateFilter = (x: User) => referredCorporateFilter(x) && (x.status === "disabled" || moment().isAfter(x.subscriptionExpirationDate)); - const UserDisplay = (displayUser: User) => ( + const UserDisplay = ({ displayUser, allowClick = true }: {displayUser: User, allowClick?: boolean}) => (
setSelectedUser(displayUser)} + onClick={() => allowClick && setSelectedUser(displayUser)} className="flex w-full p-4 gap-4 items-center hover:bg-mti-purple-ultralight cursor-pointer transition ease-in-out duration-300"> {displayUser.name}
@@ -146,7 +146,7 @@ export default function AgentDashboard({user}: Props) { .filter(referredCorporateFilter) .sort((a, b) => dateSorter(a, b, "desc", "registrationDate")) .map((x) => ( - + ))}
@@ -157,7 +157,7 @@ export default function AgentDashboard({user}: Props) { .filter(corporateFilter) .sort((a, b) => dateSorter(a, b, "desc", "registrationDate")) .map((x) => ( - + ))} @@ -172,7 +172,7 @@ export default function AgentDashboard({user}: Props) { moment().isBefore(moment(x.subscriptionExpirationDate)), ) .map((x) => ( - + ))}