mirror of
https://github.com/we-promise/sure.git
synced 2026-04-11 16:24:51 +00:00
feat: Add mobile layout for transaction categories
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
<span id="category_name_mobile_<%= transaction.id %>" class="text-secondary lg:hidden">
|
||||
<%= transaction.category&.name %>
|
||||
<% if transaction.transfer&.categorizable? || transaction.transfer.nil? %>
|
||||
<%= transaction.category.name %>
|
||||
<% else %>
|
||||
<%= transaction.transfer&.payment? ? payment_category.name : transfer_category.name %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
<% if transaction.transfer&.categorizable? || transaction.transfer.nil? %>
|
||||
<%= render "categories/menu", transaction: transaction %>
|
||||
<% else %>
|
||||
<%= render "categories/badge", category: transaction.transfer&.payment? ? payment_category : transfer_category %>
|
||||
<div class="hidden lg:flex">
|
||||
<%= render "categories/badge", category: transaction.transfer&.payment? ? payment_category : transfer_category %>
|
||||
</div>
|
||||
<div class="flex lg:hidden">
|
||||
<%= render "categories/badge_mobile", category: transaction.transfer&.payment? ? payment_category : transfer_category %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
<%= icon "link-2", size: "sm", class: "text-secondary" %>
|
||||
</span>
|
||||
<% elsif transaction.transfer.pending? %>
|
||||
<span class="inline-flex items-center rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-secondary">
|
||||
<span class="hidden lg:inline-flex items-center rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-secondary">
|
||||
Auto-matched
|
||||
</span>
|
||||
<span class="inline-flex lg:hidden items-center rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-secondary">
|
||||
A/M
|
||||
</span>
|
||||
|
||||
<%= button_to transfer_path(transaction.transfer, transfer: { status: "confirmed" }),
|
||||
method: :patch,
|
||||
|
||||
Reference in New Issue
Block a user