Skip to content

Commit

Permalink
wip on showpage
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Oct 16, 2023
1 parent 5d3a7bf commit f1173cd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/Filament/Resources/ProjectResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function (callable $get) {
TextInput::make('url'),
]),
Forms\Components\Repeater::make('external_links')->schema([
TextInput::make('title'),
TextInput::make('url'),
]),
]);
Expand Down
1 change: 1 addition & 0 deletions app/Http/Resources/Project/ShowProjectResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function toArray(Request $request): array
'organization' => [
'name' => $this->organization->name,
'id' => $this->organization->id,
'description' => $this->organization->description,
],
'is_national' => \boolval($this->is_national),
'beneficiaries' => $this->beneficiaries,
Expand Down
1 change: 1 addition & 0 deletions app/Http/Resources/ProjectCardResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function toArray(Request $request): array
'organization' => [
'name' => $this->organization->name,
'id' => $this->organization->id,

],
'categories' => $this->categories->pluck('name')->join(', '),
'donations' => [
Expand Down
17 changes: 17 additions & 0 deletions resources/js/Pages/Public/Projects/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,22 @@
<h2 class="mb-6 text-3xl font-bold text-cyan-900">{{ $t('why_to_donate') }}</h2>
<div class="text-lg text-gray-500" v-html="project.reason_to_donate"></div>
</div>

<div class="mb-10" v-if="project.external_links.length>0">
<div class="pt-12 pb-20 mt-16 bg-primary-500 px-9 lg:px-0">
<div class="flex items-center gap-4 mx-auto max-w-7xl">
<div class="flex items-center justify-center w-10 h-10 p-2 text-white rounded-lg bg-primary-100">
<SpeakerphoneIcon />
</div>
<h3 class="mb-6 text-3xl font-bold text-cyan-900">{{ $t('external_links') }}</h3>
</div>
</div>

<div class="" v-for="item in project.external_links">
<p v-html="item.title"/>
<a :href="item.url" target="_blank" v-html="item.url"/>
</div>
</div>
</div>

<!-- How can you help -->
Expand Down Expand Up @@ -340,6 +356,7 @@
import SharePage from '@/Components/SharePage.vue';
import LargeSquarePattern from '@/Components/patterns/LargeSquarePattern.vue';
import {SpeakerphoneIcon} from "@heroicons/vue/outline";
const props = defineProps({
project: {
Expand Down

0 comments on commit f1173cd

Please sign in to comment.