|
|
@ -65,14 +65,14 @@ export function TeamActivityItem(props: TeamActivityItemProps) { |
|
|
|
const username = ( |
|
|
|
const username = ( |
|
|
|
<a |
|
|
|
<a |
|
|
|
href={`/team/member?t=${teamId}&m=${user?.memberId}`} |
|
|
|
href={`/team/member?t=${teamId}&m=${user?.memberId}`} |
|
|
|
className="inline-flex items-center underline underline-offset-2 hover:no-underline" |
|
|
|
className="inline-flex items-center gap-1.5 underline underline-offset-2 hover:underline" |
|
|
|
> |
|
|
|
> |
|
|
|
<img |
|
|
|
<img |
|
|
|
className="mr-1 inline-block h-5 w-5 rounded-full" |
|
|
|
className="inline-block h-5 w-5 rounded-full" |
|
|
|
src={userAvatar} |
|
|
|
src={userAvatar} |
|
|
|
alt={user.name} |
|
|
|
alt={user.name} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<span className="font-medium">{user?.name || 'Unknown'}</span> |
|
|
|
<span className="font-medium">{user?.name || 'Unknown'}</span> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
@ -84,11 +84,11 @@ export function TeamActivityItem(props: TeamActivityItemProps) { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<li |
|
|
|
<li |
|
|
|
key={user._id} |
|
|
|
key={user._id} |
|
|
|
className="flex flex-wrap items-center rounded-md border px-2 py-2.5 text-sm" |
|
|
|
className="flex flex-wrap items-center gap-1 rounded-md border px-2 py-2.5 text-sm" |
|
|
|
> |
|
|
|
> |
|
|
|
{actionType === 'in_progress' && ( |
|
|
|
{actionType === 'in_progress' && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p className="mb-1"> |
|
|
|
<p className="mb-1 flex w-full flex-wrap items-center"> |
|
|
|
{username} started |
|
|
|
{username} started |
|
|
|
{topicCount} topic{topicCount > 1 ? 's' : ''} in |
|
|
|
{topicCount} topic{topicCount > 1 ? 's' : ''} in |
|
|
|
{resourceLink(activity)} |
|
|
|
{resourceLink(activity)} |
|
|
@ -102,7 +102,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) { |
|
|
|
)} |
|
|
|
)} |
|
|
|
{actionType === 'done' && ( |
|
|
|
{actionType === 'done' && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p className="mb-1"> |
|
|
|
<p className="mb-1 flex w-full flex-wrap items-center"> |
|
|
|
{username} completed |
|
|
|
{username} completed |
|
|
|
{topicCount} topic{topicCount > 1 ? 's' : ''} in |
|
|
|
{topicCount} topic{topicCount > 1 ? 's' : ''} in |
|
|
|
{resourceLink(activity)} |
|
|
|
{resourceLink(activity)} |
|
|
@ -116,7 +116,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) { |
|
|
|
)} |
|
|
|
)} |
|
|
|
{actionType === 'answered' && ( |
|
|
|
{actionType === 'answered' && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<p className="mb-1"> |
|
|
|
<p className="mb-1 flex w-full flex-wrap items-center"> |
|
|
|
{username} answered |
|
|
|
{username} answered |
|
|
|
{topicCount} question{topicCount > 1 ? 's' : ''} |
|
|
|
{topicCount} question{topicCount > 1 ? 's' : ''} |
|
|
|
in |
|
|
|
in |
|
|
@ -141,7 +141,7 @@ export function TeamActivityItem(props: TeamActivityItemProps) { |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<li key={user._id} className="overflow-hidden rounded-md border"> |
|
|
|
<li key={user._id} className="overflow-hidden rounded-md border"> |
|
|
|
<h3 className="flex flex-wrap items-center bg-gray-100 px-2 py-2.5 text-sm"> |
|
|
|
<h3 className="flex flex-wrap items-center gap-1 bg-gray-100 px-2 py-2.5 text-sm"> |
|
|
|
{username} has {activities.length} updates in {uniqueResourcesCount} |
|
|
|
{username} has {activities.length} updates in {uniqueResourcesCount} |
|
|
|
resource(s) |
|
|
|
resource(s) |
|
|
|
</h3> |
|
|
|
</h3> |
|
|
|