|
- <%
- Class TodayController_Class
- Private m_useLayout
- Private m_title
-
- Private Sub Class_Initialize()
- m_useLayout = True
- m_title = "Today"
- End Sub
-
- Public Property Get useLayout
- useLayout = m_useLayout
- End Property
-
- Public Property Let useLayout(v)
- m_useLayout = v
- End Property
-
- Public Property Get Title
- Title = m_title
- End Property
-
- Public Property Let Title(v)
- m_title = v
- End Property
-
- '-------------------------------------------------------------------------------------------------------------------
- ' GET /today : follow-ups that are overdue, due today, and coming up this week
- '-------------------------------------------------------------------------------------------------------------------
- Public Sub index()
- Const LOOKAHEAD_DAYS = 7
- Dim all, i, r, nextDate, overdue, dueToday, upcoming
-
- Set all = BusinessRepository().DueThrough(Date + LOOKAHEAD_DAYS)
- Set overdue = CreateObject("Scripting.Dictionary")
- Set dueToday = CreateObject("Scripting.Dictionary")
- Set upcoming = CreateObject("Scripting.Dictionary")
-
- For i = 0 To all.Count - 1
- Set r = all(i)
- nextDate = CDate(r("next_action_date"))
- If nextDate < Date Then
- overdue.Add overdue.Count, r
- ElseIf nextDate = Date Then
- dueToday.Add dueToday.Count, r
- Else
- upcoming.Add upcoming.Count, r
- End If
- Next
- %>
- <!--#include file="../views/Today/index.asp" -->
- <%
- End Sub
-
- End Class
-
- Dim TodayController_Class__Singleton
- Function TodayController()
- If IsEmpty(TodayController_Class__Singleton) Then
- Set TodayController_Class__Singleton = New TodayController_Class
- End If
- Set TodayController = TodayController_Class__Singleton
- End Function
- %>
|