uncomment code

This commit is contained in:
Godfrey M
2025-09-24 13:50:41 -07:00
parent bf6964ee62
commit 6ca0e19819

View File

@@ -27,16 +27,16 @@ class CheckoutAcceptanceFactory extends Factory
public function configure(): static
{
return $this->afterCreating(function (CheckoutAcceptance $acceptance) {
// if ($acceptance->checkoutable instanceof Asset) {
// $this->createdAssociatedActionLogEntry($acceptance);
// }
//
// if ($acceptance->checkoutable instanceof Asset && $acceptance->assignedTo instanceof User) {
// $acceptance->checkoutable->update([
// 'assigned_to' => $acceptance->assigned_to_id,
// 'assigned_type' => get_class($acceptance->assignedTo),
// ]);
// }
if ($acceptance->checkoutable instanceof Asset) {
$this->createdAssociatedActionLogEntry($acceptance);
}
if ($acceptance->checkoutable instanceof Asset && $acceptance->assignedTo instanceof User) {
$acceptance->checkoutable->update([
'assigned_to' => $acceptance->assigned_to_id,
'assigned_type' => get_class($acceptance->assignedTo),
]);
}
});
}