mirror of
https://github.com/we-promise/sure.git
synced 2026-04-09 07:14:47 +00:00
59 lines
3.7 KiB
Plaintext
59 lines
3.7 KiB
Plaintext
<%= sidebar_modal do %>
|
|
<h3 class="font-medium mb-1">
|
|
<span class="text-2xl"><%=format_money @transaction.amount_money %></span>
|
|
<span class="text-lg text-gray-500"><%= @transaction.currency %></span>
|
|
</h3>
|
|
<span class="text-sm text-gray-500"><%= @transaction.date.strftime("%A %d %B") %></span>
|
|
<%= form_with model: @transaction, html: {data: {controller: "auto-submit-form"}} do |f| %>
|
|
<details class="group" open>
|
|
<summary class="list-none bg-gray-25 rounded-xl py-1 mt-4 group-open:mb-2">
|
|
<div class="py-2 px-[11px] flex items-center justify-between font-medium text-xs text-gray-500">
|
|
Overview
|
|
<%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %>
|
|
<%= lucide_icon("chevron-right", class: "group-open:hidden text-gray-500 w-5 h-5") %>
|
|
</div>
|
|
</summary>
|
|
<%= f.date_field :date, label: "Date" %>
|
|
<div class="h-2"></div>
|
|
<%= f.collection_select :account_id, Current.family.accounts, :id, :name, { prompt: "Select an Account", label: "Account", class: "text-gray-400" }, {class: "form-field__input cursor-not-allowed text-gray-400", disabled: "disabled"} %>
|
|
</details>
|
|
<details class="group" open>
|
|
<summary class="list-none bg-gray-25 rounded-xl py-1 mt-6 group-open:mb-2">
|
|
<div class="py-2 px-[11px] flex items-center justify-between font-medium text-xs text-gray-500">
|
|
Description
|
|
<%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %>
|
|
<%= lucide_icon("chevron-right", class: "group-open:hidden text-gray-500 w-5 h-5") %>
|
|
</div>
|
|
</summary>
|
|
<%= f.text_field :name, label: "Name" %>
|
|
</details>
|
|
<details class="group" open>
|
|
<summary class="list-none bg-gray-25 rounded-xl py-1 mt-6 group-open:mb-2">
|
|
<div class="py-2 px-[11px] flex items-center justify-between font-medium text-xs text-gray-500">
|
|
<span>Settings</span>
|
|
<%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %>
|
|
<%= lucide_icon("chevron-right", class: "group-open:hidden text-gray-500 w-5 h-5") %>
|
|
</div>
|
|
</summary>
|
|
<label class="flex items-center cursor-pointer justify-between mx-3">
|
|
<%= f.check_box :excluded, class: "sr-only peer" %>
|
|
<div class="flex flex-col justify-center text-sm w-[340px] py-3">
|
|
<span class="text-gray-900 mb-1">Exclude from analytics</span>
|
|
<span class="text-gray-500">This excludes the transaction from any in-app features or analytics.</span>
|
|
</div>
|
|
<div class="relative w-9 h-5 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-100 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div>
|
|
</label>
|
|
</details>
|
|
<details class="group" open>
|
|
<summary class="list-none bg-gray-25 rounded-xl py-1 mt-6 mb-2">
|
|
<div class="py-2 px-[11px] flex items-center justify-between font-medium text-xs text-gray-500">
|
|
<span>Additional</span>
|
|
<%= lucide_icon("chevron-down", class: "hidden group-open:block text-gray-500 w-5 h-5") %>
|
|
<%= lucide_icon("chevron-right", class: "group-open:hidden text-gray-500 w-5 h-5") %>
|
|
</div>
|
|
</summary>
|
|
<%= f.text_area :notes, label: "Notes", placeholder: "Enter a note" %>
|
|
</details>
|
|
<% end %>
|
|
<% end %>
|