summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Action.php2
-rw-r--r--app/Model/Base.php4
-rw-r--r--app/Model/SubtaskForecast.php8
-rw-r--r--app/Model/Timetable.php6
4 files changed, 14 insertions, 6 deletions
diff --git a/app/Model/Action.php b/app/Model/Action.php
index b30d89fa..91bd9608 100644
--- a/app/Model/Action.php
+++ b/app/Model/Action.php
@@ -214,7 +214,7 @@ class Action extends Base
*
* @access public
* @param array $values Required parameters to save an action
- * @return integer
+ * @return boolean|integer
*/
public function create(array $values)
{
diff --git a/app/Model/Base.php b/app/Model/Base.php
index 0217aae3..b0d82401 100644
--- a/app/Model/Base.php
+++ b/app/Model/Base.php
@@ -44,6 +44,10 @@ use Pimple\Container;
* @property \Model\TaskPosition $taskPosition
* @property \Model\TaskValidator $taskValidator
* @property \Model\Timetable $timetable
+ * @property \Model\TimetableDay $timetableDay
+ * @property \Model\TimetableExtra $timetableExtra
+ * @property \Model\TimetableOff $timetableOfff
+ * @property \Model\TimetableWeek $timetableWeek
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
* @property \Model\User $user
* @property \Model\UserSession $userSession
diff --git a/app/Model/SubtaskForecast.php b/app/Model/SubtaskForecast.php
index cb86f6d7..0cb3175d 100644
--- a/app/Model/SubtaskForecast.php
+++ b/app/Model/SubtaskForecast.php
@@ -81,7 +81,13 @@ class SubtaskForecast extends Base
$start = $slot[0]->getTimestamp();
if ($slot[0] < $start_date) {
- continue;
+
+ if (! $this->dateParser->withinDateRange($start_date, $slot[0], $slot[1])) {
+ continue;
+ }
+
+ $interval = $this->dateParser->getHours(new DateTime, $slot[1]);
+ $start = time();
}
while ($offset < $total) {
diff --git a/app/Model/Timetable.php b/app/Model/Timetable.php
index da2ec10c..6ddf826b 100644
--- a/app/Model/Timetable.php
+++ b/app/Model/Timetable.php
@@ -62,10 +62,8 @@ class Timetable extends Base
* Get a serie of events based on the timetable and the provided event
*
* @access public
- * @param integer $user_id
- * @param array $events Time tracking data
- * @param string $start ISO8601 date
- * @param string $end ISO8601 date
+ * @param array $event
+ * @param array $timetable
* @return array
*/
public function calculateEventIntersect(array $event, array $timetable)