From 08f9aae8ae8e2423ec81c7af549fadc30ee6f522 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 3 Apr 2024 11:59:47 -0700 Subject: [PATCH] adds note to log listener and checkout accept notif --- app/Http/Controllers/Account/AcceptanceController.php | 1 + app/Listeners/LogListener.php | 1 + app/Notifications/AcceptanceAssetAcceptedNotification.php | 2 ++ 3 files changed, 4 insertions(+) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 4080480293f9..b33d83cdd0b0 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -223,6 +223,7 @@ public function store(Request $request, $id) 'item_model' => $display_model, 'item_serial' => $item->serial, 'eula' => $item->getEula(), + 'note' => $request->input('note'), 'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'), 'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d'), 'assigned_to' => $assigned_to, diff --git a/app/Listeners/LogListener.php b/app/Listeners/LogListener.php index 96b2607d896e..0345ac13413e 100644 --- a/app/Listeners/LogListener.php +++ b/app/Listeners/LogListener.php @@ -62,6 +62,7 @@ public function onCheckoutAccepted(CheckoutAccepted $event) $logaction->target()->associate($event->acceptance->assignedTo); $logaction->accept_signature = $event->acceptance->signature_filename; $logaction->filename = $event->acceptance->stored_eula_file; + $logaction->note = $event->acceptance->note; $logaction->action_type = 'accepted'; // TODO: log the actual license seat that was checked out diff --git a/app/Notifications/AcceptanceAssetAcceptedNotification.php b/app/Notifications/AcceptanceAssetAcceptedNotification.php index ca016acd346d..db1555b57426 100644 --- a/app/Notifications/AcceptanceAssetAcceptedNotification.php +++ b/app/Notifications/AcceptanceAssetAcceptedNotification.php @@ -26,6 +26,7 @@ public function __construct($params) $this->item_serial = $params['item_serial']; $this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false); $this->assigned_to = $params['assigned_to']; + $this->note = $params['note']; $this->company_name = $params['company_name']; $this->settings = Setting::getSettings(); @@ -64,6 +65,7 @@ public function toMail() 'item_tag' => $this->item_tag, 'item_model' => $this->item_model, 'item_serial' => $this->item_serial, + 'note' => $this->note, 'accepted_date' => $this->accepted_date, 'assigned_to' => $this->assigned_to, 'company_name' => $this->company_name,