update history corporate
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Models\CorporatePlan;
|
||||
use App\Models\CorporateBenefit;
|
||||
use App\Models\Member;
|
||||
use App\Models\ExclusionRules;
|
||||
use App\Models\ExclusionImport;
|
||||
use App\Models\Icd;
|
||||
use App\Models\IcdTemplate;
|
||||
use App\Models\AuditTrail;
|
||||
@@ -108,6 +109,15 @@ class AppServiceProvider extends ServiceProvider
|
||||
$this->logAuditTrailExclusion($model, 'deleted');
|
||||
});
|
||||
|
||||
ExclusionImport::updated(function ($model) {
|
||||
|
||||
$this->logAuditTrailExclusion($model, 'updated');
|
||||
});
|
||||
|
||||
ExclusionImport::deleted(function ($model) {
|
||||
$this->logAuditTrailExclusion($model, 'deleted');
|
||||
});
|
||||
|
||||
// ICD or exlusion
|
||||
Icd::updated(function ($model) {
|
||||
$this->logAuditTrail($model, 'updated');
|
||||
@@ -149,7 +159,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
// Membuat jejak audit baru
|
||||
$auditTrail = new AuditTrail([
|
||||
'model' => get_class($model),
|
||||
'model_id' => $model->exclusion_id,
|
||||
'model_id' => $model->corporate_id,
|
||||
'action' => $action,
|
||||
'old_values' => json_encode($model->getOriginal()),
|
||||
'new_values' => json_encode($model->getAttributes()),
|
||||
|
||||
Reference in New Issue
Block a user