Skip to content

Commit 30a6fe4

Browse files
committed
add team icons
1 parent 6632a79 commit 30a6fe4

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

app/Http/Resources/ProjectResourceShow.php

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function toArray(Request $request): array
2626
'status_formatted' => str($this->status->name)->headline(),
2727
'content' => $this->content,
2828
'system_prompt' => $this->system_prompt,
29+
'team' => TeamResource::make($this->team),
2930
];
3031
}
3132
}

app/Http/Resources/TeamResource.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ class TeamResource extends JsonResource
1414
*/
1515
public function toArray(Request $request): array
1616
{
17-
return parent::toArray($request);
17+
return [
18+
'id' => $this->id,
19+
'name' => $this->name,
20+
'created_at' => $this->created_at,
21+
'updated_at' => $this->updated_at,
22+
'users' => UserResource::collection($this->users),
23+
];
1824
}
1925
}

resources/js/Layouts/AppLayout.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const theme = ref('dark')
4040
<ApplicationMark class="block h-9 w-auto" />
4141
</Link>
4242
<ul class="menu menu-horizontal px-1">
43-
<li class="hidden lg:flex">
43+
<li class="hidden sm:flex">
4444
<Link :href="route('projects.index')"
4545
:class="{ 'underline' : route().current('projects.index') }">
4646
Projects

resources/js/Pages/Projects/Show.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,15 @@ const sendDailyReport = () => {
8383
end: {{ project.data.end_date }}
8484
</span>
8585
</div>
86-
</div>
8786

87+
<div class="avatar-group -space-x-6 rtl:space-x-reverse mt-2">
88+
<div class="avatar" v-for="user in project.data.team.users" :key="user.id">
89+
<div class="w-10">
90+
<img :src="user.profile_photo_url" />
91+
</div>
92+
</div>
93+
</div>
94+
</div>
8895
<div class="flex justify-end gap-2 items-center">
8996
<Kickoff :project="project.data"/>
9097
<Link

0 commit comments

Comments
 (0)