import('form.TextField');
import('ttUserHelper');
import('ttTeamHelper');
+import('ttWeekViewHelper');
import('ttClientHelper');
import('ttTimeHelper');
import('DateAndTime');
// Get the data we need to display week view.
// Get column headers, which are day numbers in month.
-$dayHeaders = ttTimeHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT));
-$lockedDays = ttTimeHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT));
+$dayHeaders = ttWeekViewHelper::getDayHeadersForWeek($startDate->toString(DB_DATEFORMAT));
+$lockedDays = ttWeekViewHelper::getLockedDaysForWeek($startDate->toString(DB_DATEFORMAT));
// Build data array for the table. Format is described in the function..
-$dataArray = ttTimeHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders);
+$dataArray = ttWeekViewHelper::getDataForWeekView($user->getActiveUser(), $startDate->toString(DB_DATEFORMAT), $endDate->toString(DB_DATEFORMAT), $dayHeaders);
// Build day totals (total durations for each day in week).
$dayTotals = ttTimeHelper::getDayTotals($dataArray, $dayHeaders);
// Special handling for not billable entries.
if ($row > 0) {
$row_id = $table->getValueAtName($row,'row_id');
- $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl');
+ $billable = ttWeekViewHelper::parseFromWeekViewRow($row_id, 'bl');
if (!$billable) {
$this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS.
}
$record['project_id'] = $cl_project;
$record['task_id'] = $cl_task;
$record['cf_1_value'] = $cl_cf_1;
- $fields['row_id'] = ttTimeHelper::makeRecordIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row...
+ $fields['row_id'] = ttWeekViewHelper::makeRowIdentifier($record).'_0'; // TODO: Handle a possible conflict with already existing row...
// We may have to increment the suffix here.
$fields['note'] = $cl_note;
}