tests passing, CheckoutAcceptance Factory needs eyes though

This commit is contained in:
Godfrey M
2025-09-24 13:41:04 -07:00
parent 9ac2ea2a52
commit bf6964ee62

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),
// ]);
// }
});
}