<% ' Tile helper values: label, number, link, optional emphasis class Dim tiles, ti, t, pct, pctText, barW, di, dd, barPct, oi, ob, mi, mb, ii, ir, bi_ tiles = Array( _ Array("Prospects", counts("prospects"), "/businesses?show=prospects", ""), _ Array("Previous customers", counts("customers"), "/businesses?show=customers", "text-success"), _ Array("Never contacted", counts("never_contacted"), "/businesses?show=prospects&contacted=never", ""), _ Array("Follow-ups overdue", counts("overdue"), "/", Iif_(counts("overdue") > 0, "text-danger", "")), _ Array("Due today", counts("due_today"), "/", Iif_(counts("due_today") > 0, "text-warning-emphasis", "")), _ Array("Due in the next 7 days", counts("this_week"), "/", ""), _ Array("No phone number", counts("no_phone"), "/businesses?show=prospects", "text-muted"), _ Array("Removed", counts("removed"), "/businesses?status=removed", "text-muted") _ ) %> <% Flash().ShowErrorsIfPresent : Flash().ShowSuccessIfPresent %>

Dashboard

<%= FormatNumber(counts("active"), 0) %> active businesses · <%= FormatNumber(counts("total"), 0) %> including removed
<% For ti = 0 To UBound(tiles) t = tiles(ti) %>
<%= FormatNumber(t(1), 0) %>
<%= t(0) %>
<% Next %>

Where everyone stands

<% Dim stages, si, s, tot stages = Array(Array("New", counts("st_new"), "text-bg-secondary", "new"), Array("Contacted", counts("st_contacted"), "text-bg-info", "contacted"), Array("Follow-up", counts("st_follow_up"), "text-bg-warning", "follow_up")) tot = counts("st_new") + counts("st_contacted") + counts("st_follow_up") If tot = 0 Then tot = 1 %> <% For si = 0 To UBound(stages) s = stages(si) %> <% Next %>
<%= s(0) %> <%= FormatNumber(s(1), 0) %> <%= Round(s(1) * 100 / tot, 0) %>%
Counts include previous customers. Removed businesses are not counted here.

Contact activity

<%= FormatNumber(activity("today"), 0) %>
Today
<%= FormatNumber(activity("week"), 0) %>
Last 7 days
<%= FormatNumber(activity("month"), 0) %>
Last 30 days
Last 14 days
<% For di = 0 To daily.Count - 1 %>
<%= Day(daily(di)(0)) %>
<% Next %>

How you reached out (30 days)

<% If byMethod.Count = 0 Then %>

Nothing logged yet.

<% Else %> <% For mi = 0 To byMethod.Count - 1 mb = byMethod(mi) %> <% Next %>
<%= H(Businesses_Label(Businesses_Methods(), mb(0))) %><%= FormatNumber(mb(1), 0) %>
<% End If %>

Outcomes (30 days)

<% If byOutcome.Count = 0 Then %>

Nothing logged yet.

<% Else %> <% For oi = 0 To byOutcome.Count - 1 ob = byOutcome(oi) %> <% Next %>
<% If Len(ob(0)) = 0 Then Response.Write "(no outcome)" Else Response.Write H(Businesses_Label(Businesses_Outcomes(), ob(0))) %> <%= FormatNumber(ob(1), 0) %>
<% End If %>

Biggest industries (manage)

<% If industries.Count = 0 Then %>

No industries yet.

<% Else %> <% For ii = 0 To industries.Count - 1 ir = industries(ii) If ir(2) > 0 Then pct = Round(ir(3) * 100 / ir(2), 0) Else pct = 0 If ir(3) > 0 And pct = 0 Then pctText = "<1" Else pctText = CStr(pct) If ir(3) > 0 And pct = 0 Then barW = 1 Else barW = pct %> <% Next %>
IndustryBusinessesContacted
<%= H(ir(1)) %> <%= FormatNumber(ir(2), 0) %>
<%= FormatNumber(ir(3), 0) %> · <%= pctText %>%
<% End If %>

Recent imports (import)

<% If imports.Count = 0 Then %>

No imports yet.

<% Else %>
    <% For bi_ = 0 To imports.Count - 1 ir = imports(bi_) %>
  • <%= H(ir(1)) %>
    <%= Date_Fmt(ir(2)) %> · <%= FormatNumber(ir(4), 0) %> added of <%= FormatNumber(ir(3), 0) %> rows
  • <% Next %>
<% End If %>