Skip to content

Commit

Permalink
Merge pull request #362 from dump-hr/schedule-section-images-fix
Browse files Browse the repository at this point in the history
bartole ostavi me na miru
  • Loading branch information
bdeak4 authored May 19, 2024
2 parents 592c807 + a5cb815 commit 324933a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions apps/api/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const eventType = pgEnum('event_type', [
'workshop',
'flyTalk',
'campfireTalk',
'panel',
'other',
]);

Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/event/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export class EventService {

const speakers = result
.filter((r) => r.event.id === id)
.map((r) => r.speaker);
.map((r) => r.speaker)
.filter((s) => s !== null);

const speakersWithCompany = speakers.map((speaker) => {
const company =
Expand Down
10 changes: 7 additions & 3 deletions apps/web/src/components/ScheduleSection/ScheduleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ const ScheduleCard: React.FC<ScheduleCardProps> = ({ event }) => {
</div>
<div className={c.scheduleCardCenterWrapper}>
<div className={c.scheduleCardCenter}>
<div className={c.themeBadge}>
<p className={c.themeBadgeText}>{getThemeShort(event.theme)}</p>
</div>
{event.type !== 'other' && (
<div className={c.themeBadge}>
<p className={c.themeBadgeText}>
{getThemeShort(event.theme)}
</p>
</div>
)}
<div className={c.scheduleCardTitleWrapper}>
<h3
className={c.scheduleCardTitle}
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/ScheduleSection/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ export const getEventTypeTranslation = (type: string) => {
return 'FLY TALK';
case 'campfireTalk':
return 'CAMPFIRE TALK';
case 'panel':
return 'PANEL';
case 'other':
return 'OSTALO';
return null;
}
};

Expand Down
1 change: 1 addition & 0 deletions packages/types/src/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export enum EventType {
Workshop = 'workshop',
FlyTalk = 'flyTalk',
CampfireTalk = 'campfireTalk',
Panel = 'panel',
Other = 'other',
}

Expand Down

0 comments on commit 324933a

Please sign in to comment.