<commit_before><div class="page-header">
  <h1>Submitted Applications &rarr; Application</h1>
</div>

<!-- APPLICANT -->
<dl>
  <dt>Applicant Name</dt>
  <!-- the applicant name is the  -->
  <dd><%= user_answer_value(@user, "applicant_first_name") -%> <%= user_answer_value(@user, "applicant_last_name") -%></dd>
</dl>

<dl>
  <dt>Applicant Email</dt>
  <dd><%= user_answer_value(@user, "applicant_email") -%></dd>
</dl>

<dl>
  <dt>Applicant Phone</dt>
  <dd><%= user_answer_value(@user, "applicant_phone") -%></dd>
</dl>

<!-- OWNER -->
<% if user_answer_value(@user, "is_owner") == 'no' %>
  <dl>
    <dt>Owner Name</dt>
    <dd><%= user_answer_value(@user, "owner_first_name") -%> <%= user_answer_value(@user, "owner_last_name") -%></dd>
  </dl>

  <dl>
    <dt>Owner Email</dt>
    <dd><%= user_answer_value(@user, "owner_email") -%></dd>
  </dl>

  <dl>
    <dt>Owner Phone</dt>
    <dd><%= user_answer_value(@user, "owner_phone") -%></dd>
  </dl>
  <br />
<% end %>

<h3 class="h3">Business</h3>

<dl>
  <dt>Business Name</dt>
  <dd><%= user_answer_value(@user, "business_name") -%></dd>
</dl>

<dl>
  <dt>Business Type</dt>
  <dd><%= user_answer_value(@user, "CIC_code") -%></dd>
  <dd><%= user_answer_value(@user, "CIC_industry") -%></dd>
  <dd><%= user_answer_value(@user, "CIC_subindustry") -%></dd>
  <!-- <dd> user_answer_value(@user, "type_1|type_2|type_3") </dd> -->
</dl>

<dl>
  <dt>Business Structure</dt>
  <dd><%= user_answer_value(@user, "business_structure") -%></dd>
</dl>

<br><h3 class="h3">Location</h3>

<dl>
  <dt>Home Occ?</dt>
  <dd><%= user_answer_value(@user, "location_type") == "home" ? "yes" : "no"  -%></dd>
</dl>

<dl>
  <dt>Business Physical Address</dt>
  <dd>
    <%= user_answer_value(@user, "business_physical_address_street") -%><br>
    <%= user_answer_value(@user, "business_physical_address_detail") -%><br>
    <%= user_answer_value(@user, "business_physical_address_city") -%>, 
    <%= user_answer_value(@user, "business_physical_address_state") -%>
    <%= user_answer_value(@user, "business_physical_address_zip") -%>
  </dd>
</dl>

<dl>
  <dt>Business Mailing Address</dt>
  <dd>
    <%= user_answer_value(@user, "business_mailing_address_street") -%><br>
    <%= user_answer_value(@user, "business_mailing_address_detail") -%><br>
    <%= user_answer_value(@user, "business_mailing_address_city") -%>, <%= user_answer_value(@user, "business_mailing_address_state") -%> <%= user_answer_value(@user, "business_mailing_address_zip") -%>
  </dd>
</dl>

<dl>
  <dt>Zoning District</dt>
  <dd><%= user_answer_value(@user, "CIC_code") -%></dd>
</dl>

<dl>
  <dt>Prior Use</dt>
  <dd><%= user_answer_value(@user, "prioruse") -%></dd>
</dl>

<hr />

<% unless @user.blank? || @user.answers.blank? %>
  <br>
  <h3 class='h3'>List of all answers:</h3>
  <table class="table table-striped">
    <thead>
      <th>No.</th>
      <th>field_name</th>
      <th>value</th>
    </thead>
    <tbody>
    <% @user.answers.each_with_index do |answer,i| %>
      <tr class="<%= cycle("odd", "even") -%>">
        <td><%= i+1 %></td>
        <td><%= answer.field_name %></td>
        <td><%= answer.value %></td>
      </tr>
    <% end -%>
    </tbody>
  </table>
<% end %><commit_msg>Refactor application details page<commit_after><div class="page-header">
  <h1>Submitted Applications &rarr; Application</h1>
</div>

<!-- APPLICANT -->
<dl>
  <dt>Applicant Name</dt>
  <!-- the applicant name is the  -->
  <dd><%= user_answer_value(@user, "applicant_first_name") -%> <%= user_answer_value(@user, "applicant_last_name") -%></dd>
</dl>

<dl>
  <dt>Applicant Email</dt>
  <dd><%= user_answer_value(@user, "applicant_email") -%></dd>
</dl>

<dl>
  <dt>Applicant Phone</dt>
  <dd><%= user_answer_value(@user, "applicant_phone") -%></dd>
</dl>

<!-- OWNER -->
<% if user_answer_value(@user, "is_owner") == 'no' %>
  <dl>
    <dt>Owner Name</dt>
    <dd><%= user_answer_value(@user, "owner_first_name") -%> <%= user_answer_value(@user, "owner_last_name") -%></dd>
  </dl>

  <dl>
    <dt>Owner Email</dt>
    <dd><%= user_answer_value(@user, "owner_email") -%></dd>
  </dl>

  <dl>
    <dt>Owner Phone</dt>
    <dd><%= user_answer_value(@user, "owner_phone") -%></dd>
  </dl>
  <br />
<% end %>

<h3 class="h3">Business</h3>

<dl>
  <dt>Business Name</dt>
  <dd><%= user_answer_value(@user, "business_name") -%></dd>
</dl>

<dl>
  <dt>Business Type</dt>
  <dd><%= user_answer_value(@user, "CIC_code") -%></dd>
  <dd><%= user_answer_value(@user, "CIC_industry") -%></dd>
  <dd><%= user_answer_value(@user, "CIC_subindustry") -%></dd>
  <!-- <dd> user_answer_value(@user, "type_1|type_2|type_3") </dd> -->
</dl>

<dl>
  <dt>Business Structure</dt>
  <dd><%= user_answer_value(@user, "business_structure") -%></dd>
</dl>

<br><h3 class="h3">Location</h3>

<dl>
  <dt>Home Occ?</dt>
  <dd><%= user_answer_value(@user, "location_type") == "home" ? "yes" : "no"  -%></dd>
</dl>

<dl>
  <dt>Business Physical Address</dt>
  <dd>
    <%= user_answer_value(@user, "business_physical_address_street") -%><br>
    <%= user_answer_value(@user, "business_physical_address_detail") -%><br>
    <%= user_answer_value(@user, "business_physical_address_city") -%>, 
    <%= user_answer_value(@user, "business_physical_address_state") -%>
    <%= user_answer_value(@user, "business_physical_address_zip") -%>
  </dd>
</dl>

<dl>
  <dt>Business Mailing Address</dt>
  <dd>
    <%= user_answer_value(@user, "business_mailing_address_street") -%><br>
    <%= user_answer_value(@user, "business_mailing_address_detail") -%><br>
    <%= user_answer_value(@user, "business_mailing_address_city") -%>, <%= user_answer_value(@user, "business_mailing_address_state") -%> <%= user_answer_value(@user, "business_mailing_address_zip") -%>
  </dd>
</dl>

<dl>
  <dt>Zoning District</dt>
  <dd><%= user_answer_value(@user, "CIC_code") -%></dd>
</dl>

<dl>
  <dt>Prior Use</dt>
  <dd><%= user_answer_value(@user, "prioruse") -%></dd>
</dl>

<hr />

<% if @user.try(:current_business).try(:answers).present? %>
  <br>
  <h3 class='h3'>List of all answers:</h3>
  <table class="table table-striped">
    <thead>
      <th>No.</th>
      <th>field_name</th>
      <th>value</th>
    </thead>
    <tbody>
    <% @user.current_business.answers.each_with_index do |answer,i| %>
      <tr class="<%= cycle("odd", "even") -%>">
        <td><%= i+1 %></td>
        <td><%= answer.field_name %></td>
        <td><%= answer.value %></td>
      </tr>
    <% end -%>
    </tbody>
  </table>
<% end %>
{'fraction_non_alphanumeric': 0.24328910829990744, 'fraction_numerical': 0.0046282011724776305, 'mean_word_length': 4.257907542579075, 'pattern_counts': {'":': 0, '<': 339, '<?xml version=': 0, '>': 339, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2967335', 'n_tokens_mistral': 2782, 'n_tokens_neox': 2628, 'n_words': 436}