feat(hse): tampilkan tombol delete jenis SIMPER dan aktifkan integrasi soft delete ke tong sampah

This commit is contained in:
Ray1111-aa
2026-10-28 09:59:08 +07:00
parent 539cdbce86
commit 5536480f52
4 changed files with 134 additions and 15 deletions
+12
View File
@@ -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();
});