fix: gate calendar reviews on confirmed booking. Refs EventHub/EventHubFront#8

This commit is contained in:
2026-07-20 21:08:12 +03:00
parent dcb5163946
commit 4932f9abae
3 changed files with 32 additions and 1 deletions
Regular → Executable
+5
View File
@@ -324,9 +324,14 @@ format_event(Event) ->
#location{address = Addr, lat = Lat, lon = Lon} ->
#{address => Addr, lat => Lat, lon => Lon}
end,
CalendarTitle = case core_calendar:get_by_id(Event#event.calendar_id) of
{ok, Cal} -> Cal#calendar.title;
_ -> null
end,
#{
id => Event#event.id,
calendar_id => Event#event.calendar_id,
calendar_title => CalendarTitle,
title => Event#event.title,
description => Event#event.description,
event_type => Event#event.event_type,