add history of changes to all entitys

This commit is contained in:
vladrigos committed 2020-08-06 13:19:20 +03:00
1 parent 812bb2b23a
commit 6aff5567c4
16 files changed
+174 -19

No files matched your search

+10
View File
@@ -25,4 +25,14 @@ class ChangeHistory extends \yii\db\ActiveRecord
{
}
public function afterFind()
{
parent::afterFind(); // TODO: Change the autogenerated stub
//milliseconds to date
if ($this->field_name == 'dt_start' || $this->field_name == 'dt_end' || $this->field_name == 'dt_add') {
$this->old_value = date('d-m-Y', $this->old_value);
$this->new_value = date('d-m-Y', $this->new_value);
}
}
}