Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/gallium/ticketing.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/gallium/ticketing/attendee.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/gallium/ticketing/checkout_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/gallium_web/live/backoffice/attendees_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
<p class="font-cormorant text-gray-600 my-2">
Insere o teu número de telemóvel para pagar via MB WAY
</p>
<div class="mt-4 flex gap-3 rounded-box border border-amber-200 bg-amber-50 p-4 text-amber-800">
<.icon name="hero-exclamation-triangle" class="mt-0.5 size-5 shrink-0" />
<p class="font-cormorant text-sm sm:text-base leading-relaxed">
Se já efetuaste o pagamento, aguarda alguns minutos e atualiza a página. Não repitas o processo de pagamento.
</p>
</div>
</div>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
</label>
Expand All @@ -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
</label>
Expand Down
6 changes: 6 additions & 0 deletions lib/gallium_web/live/user_live/profile.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ defmodule GalliumWeb.UserLive.Profile do
<p class="text-gray-800 text-xl">{@user_info.nif}</p>
</div>
<% end %>
<%= if @user_info.table_preference do %>
<div>
<p class="text-gray-400 text-xs uppercase tracking-widest mb-1">Nome da Mesa</p>
<p class="text-gray-800 text-xl">{@user_info.table_preference}</p>
</div>
<% end %>
</div>

<%= if @user_info.payment do %>
Expand Down
Loading