Skip to content

Commit 83d6c59

Browse files
committed
fix: update event card display logic for pricing and registration availability
1 parent 020fa0f commit 83d6c59

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

src/app/components/cards/event-card.ts

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,18 @@ import { CommunityEvent } from '../../../models/community-event.model';
4242
<div
4343
class="flex items-center justify-between bg-gray-50 p-4 rounded-2xl"
4444
>
45-
@if (event().startingPrice) {
45+
@if (!event().isFree) {
4646
<div class="flex flex-col">
4747
<div class="text-sm text-gray-500">Starting from</div>
4848
<div class="font-bold text-2xl text-[#26A0D9]">
49-
$ {{ event().startingPrice }}*
49+
@if (event().startingPrice) {
50+
$ {{ event().startingPrice }}*
51+
} @else {
52+
To be announced
53+
}
5054
</div>
5155
</div>
52-
} @else if (event().isFree) {
56+
} @else {
5357
<div class="flex flex-col">
5458
<div class="text-sm text-gray-500">Registration</div>
5559
<div class="font-bold text-2xl text-[#26A0D9]">Free</div>
@@ -62,13 +66,21 @@ import { CommunityEvent } from '../../../models/community-event.model';
6266
</div>
6367
}
6468
</div>
65-
<a
66-
[href]="event().url"
67-
target="_blank"
68-
class="w-full flex items-center justify-center text-sm bg-[#26A0D9] text-white p-2 rounded-lg"
69-
>
70-
Register now
71-
</a>
69+
@if (event().url) {
70+
<a
71+
[href]="event().url"
72+
target="_blank"
73+
class="w-full flex items-center justify-center text-sm bg-[#26A0D9] text-white p-2 rounded-lg"
74+
>
75+
Register now
76+
</a>
77+
} @else {
78+
<div
79+
class="w-full flex items-center justify-center text-sm bg-gray-200 p-2 rounded-lg"
80+
>
81+
No registration available
82+
</div>
83+
}
7284
<a
7385
[href]="event().organizer.url"
7486
target="_blank"

0 commit comments

Comments
 (0)