<%= form_with(model: income, class: "space-y-8") do |form| %> <% if income.errors.any? %>

<%= pluralize(income.errors.count, "error") %> prohibited this income from being saved:

<% end %>

Basic Information

<%= form.label :description, class: "block text-sm font-medium text-gray-700 mb-2" %> <%= form.text_field :description, class: "block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm", placeholder: "Enter income description..." %>
<%= form.label :amount, class: "block text-sm font-medium text-gray-700 mb-2" %>
$
<%= form.number_field :amount, class: "block w-full pl-7 pr-3 py-2 rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm font-mono", placeholder: "0.00", step: "0.01", min: "0" %>
<%= form.label :member_id, "Member", class: "block text-sm font-medium text-gray-700 mb-2" %> <%= form.select :member_id, options_for_select(members, income.member_id), { prompt: "Select a member..." }, class: "block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm" %>

Budget Settings

<%= form.label :included, "Include in Budget", class: "block text-sm font-medium text-gray-700" %>

Whether this income should be included in budget calculations

<%= form.check_box :included, class: "toggle-checkbox sr-only" %>
<%= link_to incomes_path, class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" do %> Cancel <% end %> <%= form.submit class: "inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 cursor-pointer" %>
<% end %>