Module: Crm::AccountingDashboardHelper
- Defined in:
- app/helpers/crm/accounting_dashboard_helper.rb
Instance Method Summary collapse
-
#accounting_transmissions_tab_options ⇒ Object
Tab counters are lazy-loaded via individual Turbo Frame requests to avoid blocking the initial page render with 7 expensive COUNT queries on a complex view.
Instance Method Details
#accounting_transmissions_tab_options ⇒ Object
Tab counters are lazy-loaded via individual Turbo Frame requests to avoid
blocking the initial page render with 7 expensive COUNT queries on a complex view.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/helpers/crm/accounting_dashboard_helper.rb', line 4 def params[:q] ||= {} base_q = params[:q].to_h { email_or_fax: { counter_html: lazy_tab_count_frame('email_or_fax', base_q), remote_href: accounting_dashboard_tab_email_or_fax_path(q: base_q.merge(transmission_type_in: ['Email/Fax'])) }, portal: { counter_html: lazy_tab_count_frame('portal', base_q), remote_href: accounting_dashboard_tab_portal_path(q: base_q.merge(transmission_type_in: ['Portal'])) }, mail: { counter_html: lazy_tab_count_frame('mail', base_q), remote_href: accounting_dashboard_tab_mail_path(q: base_q.merge(transmission_type_in: ['Mail'])) }, mixed: { counter_html: lazy_tab_count_frame('mixed', base_q), remote_href: accounting_dashboard_tab_mixed_path(q: base_q.merge(transmission_type_not_in: ['Email/Fax', 'Portal', 'Mail', 'No Channel Set'])) }, no_channel_set: { counter_html: lazy_tab_count_frame('no_channel_set', base_q), remote_href: accounting_dashboard_tab_no_channel_set_path(q: base_q.merge(transmission_type_in: ['No Channel Set'])) }, replacement_invoice: { counter_html: lazy_tab_count_frame('replacement_invoice', base_q), remote_href: accounting_dashboard_tab_replacement_invoice_path(q: base_q.merge(doc_type_in: ['INV'])) }, missing_edi_810: { title: 'EDI 810', counter_html: lazy_tab_count_frame('missing_edi_810', base_q), remote_href: accounting_dashboard_tab_missing_edi_810_path } } end |