mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 03:38:17 +00:00
fix
This commit is contained in:
@@ -281,9 +281,9 @@ export const TeamMembers = ({
|
||||
};
|
||||
|
||||
const ActionDropdown = ({ employee }: { employee: TeamMemberDto }) => {
|
||||
const status = getUserStatus(employee);
|
||||
const isPending = status === "pending";
|
||||
const isNotInvited = status === "Not Invited";
|
||||
// getUserStatus only ever yields "accepted" | "pending" — a member with no
|
||||
// password set is "pending", so anything else has one already.
|
||||
const isPending = getUserStatus(employee) === "pending";
|
||||
|
||||
return (
|
||||
<DropdownMenu>
|
||||
@@ -328,8 +328,11 @@ export const TeamMembers = ({
|
||||
{t("positions.viewPositions")}
|
||||
</DropdownMenuItem>
|
||||
|
||||
{/* Resend/Invite Option */}
|
||||
{onInviteEmployee && (isPending || isNotInvited) && (
|
||||
{/* Resend/Invite Option. Offered for accepted members too: the code
|
||||
this sends lets them set a new password, so for someone who
|
||||
already has one it is a reset — labelled as such rather than as an
|
||||
invite, which would misdescribe what the operator is doing. */}
|
||||
{onInviteEmployee && (
|
||||
<DropdownMenuItem
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -337,7 +340,7 @@ export const TeamMembers = ({
|
||||
}}
|
||||
className="cursor-pointer dark:text-gray-200 dark:hover:bg-gray-600">
|
||||
<RefreshCw className="h-4 w-4 mr-2" />
|
||||
{isPending ? t("Resend Invite") : t("Send Invite")}
|
||||
{isPending ? t("Resend Invite") : t("Send Password Reset")}
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user