選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

78 行
4.1KB

  1. <% Flash().ShowErrorsIfPresent : Flash().ShowSuccessIfPresent %>
  2. <div class="d-flex justify-content-between align-items-center mb-3">
  3. <div>
  4. <h1 class="h3 mb-0">Today</h1>
  5. <div class="text-muted small"><%= WeekdayName(Weekday(Date)) %>, <%= Date_Fmt(Date) %></div>
  6. </div>
  7. <a href="/businesses?contacted=never&amp;show=prospects" class="btn btn-outline-primary btn-sm"><i class="bi bi-telephone-plus"></i> Find someone new to contact</a>
  8. </div>
  9. <% If overdue.Count = 0 And dueToday.Count = 0 Then %>
  10. <div class="alert alert-success">
  11. <i class="bi bi-check-circle"></i> You're all caught up &mdash; nothing is due.
  12. <% If upcoming.Count > 0 Then %>There <% If upcoming.Count = 1 Then Response.Write "is 1 follow-up" Else Response.Write "are " & upcoming.Count & " follow-ups" %> coming up this week.<% End If %>
  13. </div>
  14. <% End If %>
  15. <%
  16. Dim groups(2), gi, g, gname, gclass, items, ri, rr, daysLate, lastLine
  17. Set groups(0) = overdue : Set groups(1) = dueToday : Set groups(2) = upcoming
  18. For gi = 0 To 2
  19. Set items = groups(gi)
  20. If items.Count > 0 Then
  21. Select Case gi
  22. Case 0: gname = "Overdue" : gclass = "text-danger"
  23. Case 1: gname = "Due today" : gclass = "text-warning-emphasis"
  24. Case 2: gname = "Coming up (next 7 days)" : gclass = "text-secondary"
  25. End Select
  26. %>
  27. <h2 class="h5 mt-4 <%= gclass %>"><%= gname %> <span class="badge text-bg-light border"><%= items.Count %></span></h2>
  28. <div class="card shadow-sm mb-3">
  29. <div class="list-group list-group-flush">
  30. <% For ri = 0 To items.Count - 1
  31. Set rr = items(ri)
  32. daysLate = DateDiff("d", CDate(rr("next_action_date")), Date)
  33. %>
  34. <div class="list-group-item">
  35. <div class="row g-2 align-items-center">
  36. <div class="col-md-5">
  37. <a class="fw-semibold text-decoration-none" href="/businesses/<%= rr("id") %>"><%= H(rr("name")) %></a>
  38. <% If rr("is_customer") = 1 Then %><span class="badge text-bg-success ms-1">Customer</span><% End If %>
  39. <div class="small text-muted">
  40. <%= H(rr("industry_name")) %>
  41. <% If Len(rr("city") & "") > 0 Then %><% If Len(rr("industry_name") & "") > 0 Then Response.Write " &middot; " %><%= H(rr("city")) %><% End If %>
  42. <% If Len(rr("contact_name") & "") > 0 Then %> &middot; <%= H(rr("contact_name")) %><% End If %>
  43. </div>
  44. </div>
  45. <div class="col-md-3 small">
  46. <% If Len(rr("phone") & "") > 0 Then %><div><i class="bi bi-telephone"></i> <a href="tel:<%= H(rr("phone")) %>" class="text-decoration-none"><%= H(rr("phone")) %></a></div><% End If %>
  47. <% If Len(rr("email") & "") > 0 Then %><div class="text-truncate"><i class="bi bi-envelope"></i> <a href="mailto:<%= H(rr("email")) %>" class="text-decoration-none"><%= H(rr("email")) %></a></div><% End If %>
  48. </div>
  49. <div class="col-md-2 small">
  50. <span class="<%= gclass %> fw-semibold"><%= Date_Fmt(rr("next_action_date")) %></span>
  51. <% If daysLate > 0 Then %><div class="text-danger"><%= daysLate %> day<% If daysLate <> 1 Then Response.Write "s" %> late</div>
  52. <% ElseIf daysLate < 0 Then %><div class="text-muted">in <%= -daysLate %> day<% If daysLate <> -1 Then Response.Write "s" %></div><% End If %>
  53. </div>
  54. <div class="col-md-2 text-md-end">
  55. <a href="/businesses/<%= rr("id") %>" class="btn btn-primary btn-sm">Open</a>
  56. </div>
  57. </div>
  58. <% If Len(rr("last_method") & "") > 0 Then
  59. lastLine = Businesses_Label(Businesses_Methods(), rr("last_method"))
  60. If Len(rr("last_outcome") & "") > 0 Then lastLine = lastLine & " &ndash; " & H(Businesses_Label(Businesses_Outcomes(), rr("last_outcome")))
  61. %>
  62. <div class="small text-muted mt-1">
  63. Last: <%= Date_Fmt(rr("last_contacted_at")) %> &middot; <%= lastLine %>
  64. <% If Len(rr("last_notes") & "") > 0 Then %>&nbsp;&mdash; <em><%= H(Left(Replace(Replace(rr("last_notes"), vbCr, " "), vbLf, " "), 140)) %><% If Len(rr("last_notes")) > 140 Then Response.Write "&hellip;" %></em><% End If %>
  65. </div>
  66. <% End If %>
  67. </div>
  68. <% Next %>
  69. </div>
  70. </div>
  71. <%
  72. End If
  73. Next
  74. %>

Powered by TurnKey Linux.