Make it possible to track a chore execution without the time part, only the day

This commit is contained in:
Bernd Bestel
2019-05-04 16:13:05 +02:00
parent 98fcd767b3
commit 9ef55f1f01
10 changed files with 112 additions and 42 deletions

View File

@@ -58,6 +58,12 @@ class ChoresService extends BaseService
{
throw new \Exception('User does not exist');
}
$chore = $this->Database->chores($choreId);
if ($chore->track_date_only == 1)
{
$trackedTime = substr($trackedTime, 0, 10) . ' 00:00:00';
}
$logRow = $this->Database->chores_log()->createRow(array(
'chore_id' => $choreId,