3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 15:05:42 +00:00

Add created_by on acceptance logging to action_log

This commit is contained in:
snipe
2026-01-14 14:13:43 +00:00
parent 0fb6b02fc4
commit e05ecd0c3e

View File

@ -73,6 +73,8 @@ class LogListener
$logaction->action_type = 'accepted'; $logaction->action_type = 'accepted';
$logaction->action_date = $event->acceptance->accepted_at; $logaction->action_date = $event->acceptance->accepted_at;
$logaction->quantity = $event->acceptance->qty ?? 1; $logaction->quantity = $event->acceptance->qty ?? 1;
$logaction->created_by = auth()->user()->id;
// TODO: log the actual license seat that was checked out // TODO: log the actual license seat that was checked out
if ($event->acceptance->checkoutable instanceof LicenseSeat) { if ($event->acceptance->checkoutable instanceof LicenseSeat) {
@ -92,6 +94,7 @@ class LogListener
$logaction->action_type = 'declined'; $logaction->action_type = 'declined';
$logaction->action_date = $event->acceptance->declined_at; $logaction->action_date = $event->acceptance->declined_at;
$logaction->quantity = $event->acceptance->qty ?? 1; $logaction->quantity = $event->acceptance->qty ?? 1;
$logaction->created_by = auth()->user()->id;
// TODO: log the actual license seat that was checked out // TODO: log the actual license seat that was checked out
if ($event->acceptance->checkoutable instanceof LicenseSeat) { if ($event->acceptance->checkoutable instanceof LicenseSeat) {