diff --git a/web/components/human/humanListItem.tsx b/web/components/human/humanListItem.tsx index e067986b..cee4f022 100644 --- a/web/components/human/humanListItem.tsx +++ b/web/components/human/humanListItem.tsx @@ -14,6 +14,7 @@ type HumanListItemProps = { onAccept?: (id: number) => void; onReject?: (id: number) => void; onCancel?: (id: number) => void; + onRequest?: (id: number) => void; hasDots?: boolean; dotsActions?: object; }; @@ -32,6 +33,7 @@ export function HumanListItem(props: HumanListItemProps) { onAccept, onReject, onCancel, + onRequest, hasDots, } = props; @@ -70,7 +72,7 @@ export function HumanListItem(props: HumanListItemProps) { )} -
+
{unreadCount ? ( {unreadCount} ) : undefined} @@ -107,6 +109,15 @@ export function HumanListItem(props: HumanListItemProps) { キャンセル )} + {onRequest && ( + // biome-ignore lint/a11y/useButtonType: + + )} {hasDots && ( + !matches?.some((match) => match.id === userId) && + !pending?.some((pending) => pending.id === userId); + return (
{users?.map((user) => ( @@ -30,6 +44,14 @@ export default function UserTable({ query }: { query: string }) { name={user.name} pictureUrl={user.pictureUrl} onOpen={() => openModal(user)} + onRequest={ + canRequest(user.id) + ? () => { + request.send(user.id); + location.reload(); + } + : undefined + } /> ))}