summaryrefslogtreecommitdiff
path: root/demos/time-tracker
diff options
context:
space:
mode:
Diffstat (limited to 'demos/time-tracker')
-rw-r--r--demos/time-tracker/protected/App_Code/UserReport.php6
-rw-r--r--demos/time-tracker/protected/App_Code/UserReportsDao.php5
-rw-r--r--demos/time-tracker/protected/application.xml3
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php4
-rw-r--r--demos/time-tracker/protected/pages/TimeTracker/ReportProject.page6
5 files changed, 14 insertions, 10 deletions
diff --git a/demos/time-tracker/protected/App_Code/UserReport.php b/demos/time-tracker/protected/App_Code/UserReport.php
index e7529120..d37de934 100644
--- a/demos/time-tracker/protected/App_Code/UserReport.php
+++ b/demos/time-tracker/protected/App_Code/UserReport.php
@@ -2,9 +2,9 @@
class UserReport
{
- public $Username = '';
- public $CategoryID = 0;
- public $ActualDuration = 0.0;
+ public $CategoryName = '';
+ public $users = array();
+ public $ProjectName = '';
}
?> \ No newline at end of file
diff --git a/demos/time-tracker/protected/App_Code/UserReportsDao.php b/demos/time-tracker/protected/App_Code/UserReportsDao.php
index 3cf943af..c6eab660 100644
--- a/demos/time-tracker/protected/App_Code/UserReportsDao.php
+++ b/demos/time-tracker/protected/App_Code/UserReportsDao.php
@@ -14,10 +14,11 @@ class UserReportsDao extends BaseDao
return $sqlmap->queryForList('GetTimeReportByCategoryID', $categoryID);
}
- public function getTimeReportsByProjectID($projectID)
+ public function getTimeReportsByProjectIDs($projects)
{
+ $ids = implode(',', array_map('intval', $projects));
$sqlmap = $this->getConnection();
- return $sqlmap->queryForList('GetTimeReportByProjectID', $projectID);
+ return $sqlmap->queryForList('GetTimeReportByProjectIDs', $ids);
}
}
diff --git a/demos/time-tracker/protected/application.xml b/demos/time-tracker/protected/application.xml
index 02be327b..97e26ae8 100644
--- a/demos/time-tracker/protected/application.xml
+++ b/demos/time-tracker/protected/application.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<application id="Database" Mode="Debug">
+<application id="Database" Mode="Performance">
<!-- configure to use Quickstart theme directory -->
<paths>
@@ -10,6 +10,7 @@
<using namespace="Application.App_Code.*" />
</paths>
<modules>
+ <module id="cache" class="System.Caching.TMemCache" />
<module id="sqlmap" class="TSQLMap"
configFile="Application.App_Data.mysql-sqlmap" />
<module id="daos" class="DaoManager" Connection="sqlmap">
diff --git a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php
index cc27c93c..a134289c 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php
+++ b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php
@@ -50,8 +50,10 @@ class LogTimeEntry extends TPage
$this->projectMembers->DataSource = $users;
$this->projectMembers->dataBind();
if(is_int($index = array_search($this->User->Name, $users)))
+ {
$this->projectMembers->SelectedIndex = $index;
- $this->showTimeSheet();
+ $this->showTimeSheet();
+ }
}
public function showTimeSheet()
diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
index 065b6b17..50345afa 100644
--- a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
+++ b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page
@@ -5,10 +5,10 @@
<legend>Project Report</legend>
<com:TMultiView ID="views" ActiveViewIndex="0">
<com:TView>
- <com:TLabel ForControl="projects"
+ <com:TLabel ForControl="projectList"
Text="Select a project. Use ctrl+click to select multiple resources at once: "/>
- <com:TListBox ID="projects" CssClass="projects" />
- <com:TButton Text="Generate Report" />
+ <com:TListBox ID="projectList" CssClass="projects" SelectionMode="Multiple" />
+ <com:TButton Text="Generate Report" OnClick="generateReport_Clicked"/>
</com:TView>
</com:TMultiView>