From dbae8752fb4931691fa2310eb77f94abed6ca6af Mon Sep 17 00:00:00 2001 From: Nuno Miguel Date: Mon, 11 May 2026 21:40:37 +0100 Subject: [PATCH 1/2] fix: midas message --- lib/gallium/ticketing.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gallium/ticketing.ex b/lib/gallium/ticketing.ex index c47e750..5aa229e 100644 --- a/lib/gallium/ticketing.ex +++ b/lib/gallium/ticketing.ex @@ -360,7 +360,7 @@ defmodule Gallium.Ticketing do method: "mbway", phone_number: form_data.mbway_number }, - message: "CeSIUM - Midas 2026 Tickets", + message: "CeSIUM - Jantar de Gala 2026 Bilhete", extra_fields: %{attendee_id: attendee.id} } } From 0bbb8ce097b8125409b50a18ad46d36c41b84f8a Mon Sep 17 00:00:00 2001 From: Nuno Miguel Date: Mon, 11 May 2026 22:14:27 +0100 Subject: [PATCH 2/2] feat: add warning message and transport default to true --- lib/gallium/ticketing/attendee.ex | 2 +- lib/gallium/ticketing/checkout_form.ex | 2 +- lib/gallium_web/live/backoffice/attendees_live/index.ex | 5 +++-- .../live/ticketing_purchase/steps/payment.html.heex | 6 ++++++ .../live/ticketing_purchase/steps/personal_data.html.heex | 4 ++-- lib/gallium_web/live/user_live/profile.ex | 6 ++++++ 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/gallium/ticketing/attendee.ex b/lib/gallium/ticketing/attendee.ex index 34b420a..600e56d 100644 --- a/lib/gallium/ticketing/attendee.ex +++ b/lib/gallium/ticketing/attendee.ex @@ -13,7 +13,7 @@ defmodule Gallium.Ticketing.Attendee do field :student_number, :string field :nif, :string field :is_cesium_member, :boolean, default: false - field :wants_transport, :boolean, default: false + field :wants_transport, :boolean, default: true field :table_preference, :string field :allergies, :string belongs_to :user, Gallium.Accounts.User, type: :binary_id diff --git a/lib/gallium/ticketing/checkout_form.ex b/lib/gallium/ticketing/checkout_form.ex index 24fad00..3b5d49c 100644 --- a/lib/gallium/ticketing/checkout_form.ex +++ b/lib/gallium/ticketing/checkout_form.ex @@ -12,7 +12,7 @@ defmodule Gallium.Ticketing.CheckoutForm do field :nif, :string field :mbway_number, :string field :is_cesium_member, :boolean - field :wants_transport, :boolean, default: false + field :wants_transport, :boolean, default: true field :table_preference, :string field :allergies, :string field :terms_accepted, :boolean, default: false, virtual: true diff --git a/lib/gallium_web/live/backoffice/attendees_live/index.ex b/lib/gallium_web/live/backoffice/attendees_live/index.ex index 6d4e7bf..c284180 100644 --- a/lib/gallium_web/live/backoffice/attendees_live/index.ex +++ b/lib/gallium_web/live/backoffice/attendees_live/index.ex @@ -26,17 +26,18 @@ defmodule GalliumWeb.BackOffice.AttendeesLive.Index do def handle_params(_params, _uri, socket) do attendees = Ticketing.list_attendees_with_details() + accompany_count = Enum.count(attendees, & &1.accompany) socket = socket |> assign(:attendees, attendees) - |> assign(:total_count, length(attendees)) + |> assign(:total_count, length(attendees) + accompany_count) |> assign(:paid_count, Enum.count(attendees, &(&1.payment && &1.payment.status == :paid))) |> assign( :member_count, Enum.count(attendees, &(&1.user.ticket && &1.user.ticket.type == :member)) ) - |> assign(:accompany_count, Enum.count(attendees, & &1.accompany)) + |> assign(:accompany_count, accompany_count) {:noreply, socket} end diff --git a/lib/gallium_web/live/ticketing_purchase/steps/payment.html.heex b/lib/gallium_web/live/ticketing_purchase/steps/payment.html.heex index 193bc18..69a56db 100644 --- a/lib/gallium_web/live/ticketing_purchase/steps/payment.html.heex +++ b/lib/gallium_web/live/ticketing_purchase/steps/payment.html.heex @@ -4,6 +4,12 @@

Insere o teu número de telemóvel para pagar via MB WAY

+
+ <.icon name="hero-exclamation-triangle" class="mt-0.5 size-5 shrink-0" /> +

+ Se já efetuaste o pagamento, aguarda alguns minutos e atualiza a página. Não repitas o processo de pagamento. +

+
diff --git a/lib/gallium_web/live/ticketing_purchase/steps/personal_data.html.heex b/lib/gallium_web/live/ticketing_purchase/steps/personal_data.html.heex index 79b5d55..33d746b 100644 --- a/lib/gallium_web/live/ticketing_purchase/steps/personal_data.html.heex +++ b/lib/gallium_web/live/ticketing_purchase/steps/personal_data.html.heex @@ -134,7 +134,7 @@ type="radio" name={@form_data[:wants_transport].name} value="true" - checked={@form_data[:wants_transport].value == true} + checked={@form_data[:wants_transport].value in [true, "true"]} class="radio radio-sm radio-primary" /> Sim @@ -143,7 +143,7 @@ type="radio" name={@form_data[:wants_transport].name} value="false" - checked={@form_data[:wants_transport].value != true} + checked={@form_data[:wants_transport].value in [false, "false"]} class="radio radio-sm radio-primary" /> Não diff --git a/lib/gallium_web/live/user_live/profile.ex b/lib/gallium_web/live/user_live/profile.ex index c59245f..09db8ee 100644 --- a/lib/gallium_web/live/user_live/profile.ex +++ b/lib/gallium_web/live/user_live/profile.ex @@ -100,6 +100,12 @@ defmodule GalliumWeb.UserLive.Profile do

{@user_info.nif}

<% end %> + <%= if @user_info.table_preference do %> +
+

Nome da Mesa

+

{@user_info.table_preference}

+
+ <% end %> <%= if @user_info.payment do %>