% html_title l(:label_customers) %> <% phone = ->(digits) { digits.present? ? number_to_phone(digits.gsub(/\D/, '').to_i, area_code: true) : '' } %>
<%= text_field_tag :search, @search, class: 'customer-name', size: 40, placeholder: t(:label_search_customers), autocomplete: 'off', data: { autocomplete_url: '/customers/autocomplete' } %> <%= submit_tag l(:label_search), name: nil %> <% if @search.present? %> <%= link_to sprite_icon('reload', l(:button_clear)), customers_path, class: 'icon icon-reload' %> <% end %>
<% end %> <% if @customers.empty? %><%= @search.present? ? l(:label_no_customers, search: @search) : l(:label_no_data) %>
<% else %> <% if @best_first %><%= l(:text_customers_best_match, count: @customer_count) %>
<% end %>| <%= l(:label_issue_plural) %> | <%= sort_header_tag('updated', caption: l(:field_updated_on), default_order: 'desc') %>||||
|---|---|---|---|---|
| <%= link_to customer.name, customer_path(customer.id) %> | <%= phone.call(customer.phone_number) %> | <%= phone.call(customer.mobile_phone_number) %> | <%= @issue_counts[customer.id] || 0 %> | <%= format_time(customer.updated_at) if customer.updated_at %> |
<%= render partial: 'qbo/stats' %>