mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
no message
This commit is contained in:
1 parent
97db8e29d7
commit
7defabe848
2 files changed
+9
No files matched your search
@@ -10,4 +10,10 @@ class MasterTaskObserver
|
|||||||
{
|
{
|
||||||
$mastertask->color = MasterTask::generateMasterTaskColor();
|
$mastertask->color = MasterTask::generateMasterTaskColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updating(MasterTask $mastertask)
|
||||||
|
{
|
||||||
|
// to prevent updating created_by field. this field cannot be updated once created.
|
||||||
|
$mastertask->created_by = $mastertask->getOriginal('created_by');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,9 @@ class SubTaskObserver
|
|||||||
|
|
||||||
public function updating(SubTask $subTask)
|
public function updating(SubTask $subTask)
|
||||||
{
|
{
|
||||||
|
// to prevent updating created_by field. this field cannot be updated once created.
|
||||||
|
$subTask->created_by = $subTask->getOriginal('created_by');
|
||||||
|
|
||||||
$subTask->tracked_time = $subTask->timesheets->sum('time');
|
$subTask->tracked_time = $subTask->timesheets->sum('time');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user