({
- queryKey: ['help_request_assignments', { id: request_id }],
- queryFn: () => helpRequestService.getAssignments(request_id),
+ queryKey: ['help_request_assignments', { id: request.id }],
+ queryFn: () => helpRequestService.getAssignments(request.id),
});
if (!user) return null;
@@ -54,15 +54,16 @@ export default function SolicitudComments({ request_id }: SolicitudCommentsProps
const userAssignment = assignments.find((x) => x.user_id === user?.id);
const userIsAssigned = !!userAssignment;
+ const userIsOwner = user.id === request.user_id;
- if (!userIsAssigned && !isAdmin) return null;
+ if (!userIsAssigned && !isAdmin && !userIsOwner) return null;
return (
{comments.map((comment) => (
))}
-
+
);
}