2025-02-21 11:57:59 -05:00
|
|
|
<%# locals: (transaction:) %>
|
2025-01-07 09:41:24 -05:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<div id="<%= dom_id(transaction, "transfer_match") %>" class="flex items-center gap-1">
|
|
|
|
<% if transaction.transfer.confirmed? %>
|
|
|
|
<span title="<%= transaction.transfer.payment? ? "Payment" : "Transfer" %> is confirmed">
|
2025-01-07 09:41:24 -05:00
|
|
|
<%= lucide_icon "link-2", class: "w-4 h-4 text-indigo-600" %>
|
|
|
|
</span>
|
2025-02-21 11:57:59 -05:00
|
|
|
<% elsif transaction.transfer.pending? %>
|
2025-01-07 09:41:24 -05:00
|
|
|
<span class="inline-flex items-center rounded-full bg-indigo-50 px-2 py-0.5 text-xs font-medium text-indigo-700">
|
|
|
|
Auto-matched
|
|
|
|
</span>
|
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= button_to transfer_path(transaction.transfer, transfer: { status: "confirmed" }),
|
2025-01-07 09:41:24 -05:00
|
|
|
method: :patch,
|
2025-02-21 11:57:59 -05:00
|
|
|
class: "text-secondary hover:text-gray-800 flex items-center justify-center cursor-pointer",
|
2025-01-07 09:41:24 -05:00
|
|
|
title: "Confirm match" do %>
|
|
|
|
<%= lucide_icon "check", class: "w-4 h-4 text-indigo-400 hover:text-indigo-600" %>
|
|
|
|
<% end %>
|
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
<%= button_to transfer_path(transaction.transfer, transfer: { status: "rejected" }),
|
2025-01-07 09:41:24 -05:00
|
|
|
method: :patch,
|
2025-01-27 16:56:46 -05:00
|
|
|
data: { turbo: false },
|
2025-02-21 11:57:59 -05:00
|
|
|
class: "text-secondary hover:text-gray-800 flex items-center justify-center cursor-pointer",
|
2025-01-07 09:41:24 -05:00
|
|
|
title: "Reject match" do %>
|
2025-02-13 11:31:07 -05:00
|
|
|
<%= lucide_icon "x", class: "w-4 h-4 text-subdued hover:text-gray-600" %>
|
2025-01-07 09:41:24 -05:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|