added checkoutable class

This commit is contained in:
Godfrey M
2025-09-16 15:59:53 -07:00
parent 58eac619ea
commit dcbb09bbd7
2 changed files with 73 additions and 11 deletions
@@ -1133,19 +1133,8 @@ class ReportsController extends Controller
$query->withTrashed();
}
// $assetsForReport = $query->get()
// ->map(function ($acceptance) {
// return [
// 'assetItem' => $acceptance->checkoutable,
// 'acceptance' => $acceptance,
// ];
// });
// dd($assetsForReport);
// $assetsForReport = $query->get()->map(function ($unaccepted) {})
$itemsForReport = $query->get()->map(fn ($unaccepted) => Checkoutable::fromAcceptance($unaccepted));
return view('reports/unaccepted_assets', compact('itemsForReport','showDeleted' ));
}