feat(hse): tampilkan tombol delete jenis SIMPER dan aktifkan integrasi soft delete ke tong sampah
This commit is contained in:
@@ -378,6 +378,12 @@ class TrashService
|
||||
->where('employee_id', $item->id)
|
||||
->restore();
|
||||
}
|
||||
|
||||
if ($item instanceof SimperType) {
|
||||
EmployeeSimper::onlyTrashed()
|
||||
->where('simper_type_id', $item->id)
|
||||
->restore();
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
@@ -420,6 +426,12 @@ class TrashService
|
||||
->forceDelete();
|
||||
}
|
||||
|
||||
if ($item instanceof SimperType) {
|
||||
EmployeeSimper::withTrashed()
|
||||
->where('simper_type_id', $item->id)
|
||||
->forceDelete();
|
||||
}
|
||||
|
||||
$item->forceDelete();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user