Skip to content

Commit 8ca14c8

Browse files
committed
feat: "view all" link in dashboard
1 parent 98119f7 commit 8ca14c8

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/Models/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public function rolesArray(): Attribute {
100100
*/
101101
public function participantAndProjects(): Collection {
102102
return $this->participants()->where('project_type', 'App\Models\Project')->with([
103-
'project', 'project.approvalDocument', 'project.summaryDocument',
103+
'project:id,created_at,updated_at,year,number,name,period_end,department_id,closure_submitted_at,closure_approved_status',
104+
'project.approvalDocument', 'project.summaryDocument',
104105
])->orderByDesc('id')->get()->filter(fn(ProjectParticipant $participant) => $participant->project?->approvalDocument)->values();
105106
}
106107

resources/js/Pages/Dashboard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ const projectsAwaitingVerify = participants.map(participant => participant.proje
8080
<div class="p-8 sm:px-20 w-full bg-white border border-gray-200 sm:rounded-lg shadow-lg">
8181
<div class="flex items-center justify-between mb-4">
8282
<h5 class="text-xl font-bold leading-none text-gray-900">โครงการที่ฉันมีส่วนร่วม</h5>
83-
<!-- a class="text-sm font-medium text-blue-600 hover:underline dark:text-blue-500" href="#">
84-
View all
85-
</a -->
83+
<a class="text-sm font-medium text-blue-600 hover:underline dark:text-blue-500" :href="route('profile.show')">
84+
ดูทั้งหมด
85+
</a>
8686
</div>
8787
<div class="flow-root">
8888
<ul class="divide-y divide-gray-200" role="list">

resources/js/Pages/Profile/MyProjects.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<ActionSection>
33
<template #title>
4-
โครงการ
4+
ประวัติการเข้าร่วมกิจกรรม (Activity Transcript)
55
</template>
66

77
<template #description>
8-
โครงการที่ฉันมีส่วนร่วม
8+
โครงการ/กิจกรรมที่ฉันมีส่วนร่วม
99
<Link :href="route('profile.printMyProjects')" class="text-green-600 ml-2 inline-block">
1010
<PrinterIcon class="inline-block h-5 w-5" /> พิมพ์
1111
</Link>

0 commit comments

Comments
 (0)