<%= form_with model: @customer, url: step1_submit_agent_portal_customer_onboarding_path, method: :post, local: true, data: { controller: "customer", action: "submit->customer#validateForm" } do |f| %>

Step 1: Personal Details

<%= f.label :customer_type_id, "Customer Type" %> <%= f.collection_select :customer_type_id, current_onboard_client.customer_types, :id, :name, { prompt: "Select Type" }, class: "form-control", data: { customer_target: "customerType", action: "change->customer#toggleSectionsByCustomerType" } %>
Personal Information
<%= f.label :firstname %> <%= f.text_field :firstname, class: "form-control", placeholder: "First Name" %>
<%= f.label :middlename %> <%= f.text_field :middlename, class: "form-control", placeholder: "Middle Name or 'N/A'" %>
<%= f.label :lastname %> <%= f.text_field :lastname, class: "form-control", placeholder: "Last Name" %>
<%= f.label :dob, "Date of Birth" %> <%= f.date_field :dob, class: "form-control" %>
<%= f.label :sex, "Gender" %>
<%= f.radio_button :sex, 'Male', id: 'sex_male', class: "form-check-input" %> <%= f.label :sex, 'Male', for: 'sex_male', class: "form-check-label" %>
<%= f.radio_button :sex, 'Female', id: 'sex_female', class: "form-check-input" %> <%= f.label :sex, 'Female', for: 'sex_female', class: "form-check-label" %>
<%= f.label :referral, "Referral" %> <%= f.text_field :referral, class: "form-control" %>
Contact Information
<%= f.label :mobile_1, "Primary Mobile" %> <%= f.text_field :mobile_1, class: "form-control" %>
<%= f.label :mobile_2, "Alternative Mobile" %> <%= f.text_field :mobile_2, class: "form-control" %>
<%= f.label :email %> <%= f.email_field :email, class: "form-control", placeholder: "you@example.com" %>
Address Information
<%= f.label :address_1, "Street Address" %> <%= f.text_field :address_1, class: "form-control" %>
<%= f.label :address_2, "Location / Suburb" %> <%= f.text_field :address_2, class: "form-control" %>
<%= f.label :city %> <%= f.text_field :city, class: "form-control" %>
<%= f.label :country %> <%= f.text_field :country, class: "form-control" %>
Identification
<%= f.label :id_type, "Select ID Type", class: "form-label" %>
<%= f.radio_button :id_type, 'nationalid', checked: true, class: "form-check-input", data: { action: "change->customer#idTypeChanged" } %> <%= f.label :id_type, "National ID", class: "form-check-label" %>
<%= f.radio_button :id_type, 'passport', class: "form-check-input", data: { action: "change->customer#idTypeChanged" } %> <%= f.label :id_type, "Passport", class: "form-check-label" %>
<%= f.label :idnumber, "National ID", data: { customer_target: "idNumberLabel" }, class: "form-label" %> <%= f.text_field :idnumber, class: "form-control", data: { customer_target: "idNumber" }, placeholder: "Enter ID Number" %> Format: 63-4566467N88
Employment Details
<%= f.label :employment_type, "Employment Type" %> <%= f.text_field :employment_type, class: "form-control" %>
<%= f.label :employer_name, "Employer / Business Name" %> <%= f.text_field :employer_name, class: "form-control" %>
Funds
<%= f.label :source_of_funds, "Source of Funds" %> <%= f.text_area :source_of_funds, rows: 3, class: "form-control", placeholder: "Describe source of funds (formal or informal)" %>
Next of Kin
<%= f.fields_for :next_of_kins do |n| %> <%= render "agent_portal/customers/next_of_kin_fields", f: n %> <% end %>

No Next of Kin required for this customer type.

<%= f.submit "Next", data: { turbo: false }, class: "btn btn-primary btn-lg" %>
<% end %>