mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 19:14:11 +00:00
* Flatten Holding model * Flatten balance model * Entries domain renames * Fix valuations reference * Fix trades stream * Fix brakeman warnings * Fix tests * Replace existing entryable type references in DB
64 lines
3.4 KiB
Plaintext
64 lines
3.4 KiB
Plaintext
<%= turbo_frame_tag "bulk_transaction_edit_drawer" do %>
|
|
<dialog data-controller="modal"
|
|
data-action="mousedown->modal#clickOutside"
|
|
class="bg-container shadow-border-xs rounded-2xl max-h-[calc(100vh-32px)] h-full max-w-[480px] w-full mt-4 mr-4 ml-auto">
|
|
<%= styled_form_with url: transactions_bulk_update_path, scope: "bulk_update", class: "h-full", data: { turbo_frame: "_top" } do |form| %>
|
|
<div class="flex h-full flex-col justify-between p-4 gap-4">
|
|
<div>
|
|
<div class="flex h-9 items-center justify-end">
|
|
<div data-action="mousedown->modal#close" class="cursor-pointer">
|
|
<%= lucide_icon("x", class: "w-5 h-5 shrink-0") %>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex flex-col overflow-scroll">
|
|
<div>
|
|
<header class="mb-4 space-y-1">
|
|
<h3 class="text-2xl font-medium" data-bulk-select-target="bulkEditDrawerTitle">
|
|
Edit transactions
|
|
</h3>
|
|
</header>
|
|
|
|
<div class="space-y-2">
|
|
<details class="group space-y-2" open>
|
|
<summary class="flex list-none items-center justify-between rounded-xl px-3 py-2 text-xs font-medium uppercase text-secondary bg-gray-25 focus-visible:outline-hidden">
|
|
<h4>Overview</h4>
|
|
<%= lucide_icon "chevron-down", class: "group-open:transform group-open:rotate-180 text-secondary w-5" %>
|
|
</summary>
|
|
|
|
<div class="pb-6 space-y-2">
|
|
<%= form.date_field :date, label: "Date", max: Date.current %>
|
|
</div>
|
|
</details>
|
|
|
|
<details class="group space-y-2" open>
|
|
<summary class="flex list-none items-center justify-between rounded-xl px-3 py-2 text-xs font-medium uppercase text-secondary bg-gray-25 focus-visible:outline-hidden">
|
|
<h4>Details</h4>
|
|
<%= lucide_icon "chevron-down", class: "group-open:transform group-open:rotate-180 text-secondary w-5" %>
|
|
</summary>
|
|
|
|
<div class="space-y-2">
|
|
<%= form.collection_select :category_id, Current.family.categories.alphabetically, :id, :name, { prompt: "Select a category", label: "Category", class: "text-subdued" } %>
|
|
<%= form.collection_select :merchant_id, Current.family.merchants.alphabetically, :id, :name, { prompt: "Select a merchant", label: "Merchant", class: "text-subdued" } %>
|
|
<%= form.select :tag_ids, Current.family.tags.alphabetically.pluck(:name, :id), { include_blank: "None", multiple: true, label: "Tags", container_class: "h-40" } %>
|
|
<%= form.text_area :notes, label: "Notes", placeholder: "Enter a note that will be applied to selected transactions", rows: 5 %>
|
|
</div>
|
|
</details>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex justify-end items-center gap-2">
|
|
<%= link_to "Cancel", transactions_path, class: "btn btn--ghost" %>
|
|
|
|
<%= tag.button "Save",
|
|
type: "button",
|
|
data: { "bulk-select-scope-param": "bulk_update", action: "bulk-select#submitBulkRequest" },
|
|
class: "btn btn--primary" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</dialog>
|
|
<% end %>
|