Skip to content

Commit

Permalink
attendeed and ticket display
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Nov 23, 2022
1 parent c773253 commit 363a84d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ defmodule RauversionWeb.Live.EventsLive.Components.AttendeesComponent do
|> assign(:status, :error)}

any ->
IO.inspect(any)

{:noreply,
socket
|> assign(:status, :error)}
Expand Down Expand Up @@ -134,6 +132,7 @@ defmodule RauversionWeb.Live.EventsLive.Components.AttendeesComponent do
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 sm:pl-6">Name</th>
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 lg:table-cell">Price</th>
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 sm:table-cell">Email</th>
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100 lg:table-cell">Ticket</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">Status</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-gray-100">Checked in</th>
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
Expand All @@ -158,6 +157,7 @@ defmodule RauversionWeb.Live.EventsLive.Components.AttendeesComponent do
<% #= ticket.event_ticket.currency %>
</td>
<td class="hidden px-3 py-4 text-sm text-gray-500 dark:text-gray-300 sm:table-cell"><%= ticket.user.email %></td>
<td class="px-3 py-4 text-sm text-gray-500 dark:text-gray-300"><%= ticket.event_ticket.title %></td>
<td class="px-3 py-4 text-sm text-gray-500 dark:text-gray-300"><%= ticket.state %></td>
<td class="px-3 py-4 text-sm text-gray-500 dark:text-gray-300"><%= ticket.checked_in_at %></td>
<td class="py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
Expand Down
16 changes: 14 additions & 2 deletions lib/rauversion_web/live/qr_live/components/ticket_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,20 @@ defmodule RauversionWeb.QrLive.Components.TicketComponent do
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-100">
<%= @ticket.user.email %>
</h3>
<div class="p-2 bg-green-600 text-white block rounded-md">
<%= @ticket.state %>
<div class="flex">
<div class="p-2 bg-green-600 text-white block rounded-md">
<%= @ticket.state %>
</div>
</div>
<div class="p-2 flex flex-col space-y-2 text-white block">
<span class="text-bold">
TICKET: <%= @ticket.event_ticket.title %>
</span>
<span class="text-sm text-gray-600">
<%= Number.Currency.number_to_currency(@ticket.event_ticket.price, precision: Rauversion.Events.presicion_for_currency(@ticket.event_ticket.event)) %>
<%= @ticket.event_ticket.event.event_settings.ticket_currency %>
</span>
</div>
</div>
</div>
Expand Down

0 comments on commit 363a84d

Please sign in to comment.