Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
17 changes: 14 additions & 3 deletions app/views/events/home/_money_movement.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<%= turbo_frame_tag "money_movement" do %>
<% unless @money_in.empty? && @money_out.empty? %>
<div class="card card--breakdown shadow-none p-0 pb-4 px-0 flex-1 flex flex-col">
<h3 class="mt-4 mb-2 pl-8 sm:pl-4">Money in</h3>
<div class="p-2 pl-0 pt-4 sm:p-4 flex items-center justify-between">
<h3 class="m-0">Money in</h3>
<%= link_to event_transactions_path(@event, direction: "revenue"), class: "flex items-center shrink-0 no-underline" do %>
See all
<%= inline_icon "view-forward" %>
<% end %>
</div>

<% if @money_in.empty? %>
<div class="text-gray-500 text-center bg-zinc-100 dark:bg-zinc-700 rounded-xl mx-4 flex-1 flex items-center text-center justify-center">
Expand Down Expand Up @@ -55,8 +61,13 @@
</div>

<div class="card card--breakdown shadow-none p-0 pb-4 px-0 flex-1 flex flex-col">
<h3 class="mt-4 mb-2 pl-8 sm:pl-4">Money out</h3>

<div class="p-2 pl-0 pt-4 sm:p-4 flex items-center justify-between">
<h3 class="m-0">Money out</h3>
<%= link_to event_transactions_path(@event, direction: "expenses"), class: "flex items-center shrink-0 no-underline" do %>
See all
<%= inline_icon "view-forward" %>
<% end %>
</div>
<% if @money_out.empty? %>
<div class="text-gray-500 text-center bg-zinc-100 dark:bg-zinc-700 rounded-xl mx-4 flex-1 flex items-center text-center justify-center">
You haven't spent any money yet.
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/home/_number_stats.erb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the extension on this file wrong? Appears to be the same in _team_stats.erb as well.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="muted uppercase text-sm" style="font-weight: 700">Total raised</span>
<span class="stat__value -mb-2"><%= render_money_amount @event.total_raised %></span>
</div>
<%= link_to event_transactions_path(@event), class: "flex items-center shrink-0 no-underline -mr-2" do %>
<%= link_to event_transactions_path(@event, direction: "revenue"), class: "flex items-center shrink-0 no-underline -mr-2" do %>
See transactions
<%= inline_icon "view-forward" %>
<% end %>
Expand All @@ -14,7 +14,7 @@
<span class="muted uppercase text-sm" style="font-weight: 700">Total spent</span>
<span class="stat__value -mb-2"><%= render_money_amount @event.total_spent_cents %></span>
</div>
<%= link_to event_transactions_path(@event), class: "flex items-center shrink-0 no-underline -mr-2" do %>
<%= link_to event_transactions_path(@event, direction: "expenses"), class: "flex items-center shrink-0 no-underline -mr-2" do %>
See transactions
<%= inline_icon "view-forward" %>
<% end %>
Expand Down
14 changes: 7 additions & 7 deletions app/views/events/home/_transactions.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<% if @recent_transactions.length > 0 %>
<div class="card card--breakdown shadow-none p-0 px-0 flex-1 flex flex-col">
<h3 class="m-0 p-4 pb-0 mb-1">Recent transactions</h3>
<div class="p-2 pl-0 pt-4 sm:p-4 flex items-center justify-between">
<h3 class="m-0">Recent transactions</h3>
<%= link_to event_transactions_path(@event), class: "flex items-center shrink-0 no-underline" do %>
See all
<%= inline_icon "view-forward" %>
<% end %>
</div>
<% @recent_transactions.each do |transaction| %>
<% rendered_transaction = capture do %>
<div style="min-width:0;flex:1">
Expand Down Expand Up @@ -45,12 +51,6 @@
</section>
<% end %>
<% end %>
<div class="flex items-center px-4 pb-2 mt-auto justify-between">
<%= link_to event_transactions_path(event_id: @event.slug), class: "flex items-center no-underline" do %>
See all
<%= inline_icon "view-forward" %>
<% end %>
</div>
</div>
<% else %>
<div class="card card--breakdown shadow-none text-center p-0 flex-1 flex flex-col items-center justify-center">
Expand Down