Skip to content

Commit

Permalink
add team icons
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Sep 10, 2024
1 parent 6632a79 commit 30a6fe4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/Http/Resources/ProjectResourceShow.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function toArray(Request $request): array
'status_formatted' => str($this->status->name)->headline(),
'content' => $this->content,
'system_prompt' => $this->system_prompt,
'team' => TeamResource::make($this->team),
];
}
}
8 changes: 7 additions & 1 deletion app/Http/Resources/TeamResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class TeamResource extends JsonResource
*/
public function toArray(Request $request): array
{
return parent::toArray($request);
return [
'id' => $this->id,
'name' => $this->name,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'users' => UserResource::collection($this->users),
];
}
}
2 changes: 1 addition & 1 deletion resources/js/Layouts/AppLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const theme = ref('dark')
<ApplicationMark class="block h-9 w-auto" />
</Link>
<ul class="menu menu-horizontal px-1">
<li class="hidden lg:flex">
<li class="hidden sm:flex">
<Link :href="route('projects.index')"
:class="{ 'underline' : route().current('projects.index') }">
Projects
Expand Down
9 changes: 8 additions & 1 deletion resources/js/Pages/Projects/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,15 @@ const sendDailyReport = () => {
end: {{ project.data.end_date }}
</span>
</div>
</div>

<div class="avatar-group -space-x-6 rtl:space-x-reverse mt-2">
<div class="avatar" v-for="user in project.data.team.users" :key="user.id">
<div class="w-10">
<img :src="user.profile_photo_url" />
</div>
</div>
</div>
</div>
<div class="flex justify-end gap-2 items-center">
<Kickoff :project="project.data"/>
<Link
Expand Down

0 comments on commit 30a6fe4

Please sign in to comment.