Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby
1.3 KB
Raw Blame
<%# locals: (entry:) %>
<div class="flex items-start justify-between gap-4" id="<%= dom_id(entry, :header) %>">
  <div>
    <h3 class="font-medium flex items-center gap-2">
      <span class="text-2xl text-primary privacy-sensitive">
        <%= format_money -entry.amount_money %>
      </span>
      <span class="text-lg text-secondary">
        <%= entry.currency %>
      </span>
      <% if entry.transaction.transfer? %>
        <%= icon "arrow-left-right", size: "sm", class: "text-secondary" %>
      <% end %>
      <% if entry.linked? %>
        <span title="<%= t("transactions.transaction.linked_with_provider", provider: entry.account.provider_name&.titleize) %>" class="text-secondary">
          <%= icon("refresh-ccw", size: "sm") %>
        </span>
      <% end %>
    </h3>
    <div class="flex flex-wrap items-center gap-2">
      <span class="text-sm text-secondary">
        <%= entry.date ? I18n.l(entry.date, format: :long) : "—" %>
      </span>
      <% if entry.transaction.pending? %>
        <%= render DS::Pill.new(
          label: t("transactions.transaction.pending"),
          tone: :neutral,
          marker: false,
          icon: "clock",
          title: t("transactions.transaction.pending_tooltip")
        ) %>
      <% end %>
      <%= render "transactions/reconcile_badge", entry: entry %>
    </div>
  </div>
</div>