1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00
Maybe/app/views/vehicles/_form.html.erb
Zach Gollwitzer 65db49273c
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions
Account Activity View + Account Forms (#1406)
* Remove balance mode, sketch out refactor

* Activity view checkpoint

* Entry partials, checkpoint

* Finish txn partial

* Give entries context when editing for different turbo responses

* Calculate change of balance for each entry

* Account tabs consolidation

* Translations, linting, brakeman updates

* Account actions concern

* Finalize forms, get account system tests passing

* Get tests passing

* Lint, rubocop, schema updates

* Improve routing and stream responses

* Fix broken routes

* Add import option for adding accounts

* Fix system test

* Fix test specificity

* Fix sparklines

* Improve account redirects
2024-11-04 20:27:31 -05:00

33 lines
1.5 KiB
Text

<%# locals: (account:, url:) %>
<%= render "accounts/form", account: account, url: url do |form| %>
<hr class="my-4">
<div class="space-y-2">
<%= form.fields_for :accountable do |vehicle_form| %>
<div class="flex items-center gap-2">
<%= vehicle_form.text_field :make,
label: t("vehicles.form.make"),
placeholder: t("vehicles.form.make_placeholder") %>
<%= vehicle_form.text_field :model,
label: t("vehicles.form.model"),
placeholder: t("vehicles.form.model_placeholder") %>
</div>
<div class="flex items-center gap-2">
<%= vehicle_form.number_field :year,
label: t("vehicles.form.year"),
placeholder: t("vehicles.form.year_placeholder"),
min: 1900,
max: Time.current.year + 1 %>
<%= vehicle_form.number_field :mileage_value,
label: t("vehicles.form.mileage"),
placeholder: t("vehicles.form.mileage_placeholder"),
min: 0 %>
<%= vehicle_form.select :mileage_unit,
[["Miles", "mi"], ["Kilometers", "km"]],
{ label: t("vehicles.form.mileage_unit") } %>
</div>
<% end %>
</div>
<% end %>