From 4e52aa7e12d77d8a0ba55176cd5bad5c3a74e8da Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 18 Apr 2025 04:15:40 +0100 Subject: [PATCH] Removed the wrong method lol Signed-off-by: snipe --- app/Models/Actionlog.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/Models/Actionlog.php b/app/Models/Actionlog.php index ed32a31ead..dd86ae25c6 100755 --- a/app/Models/Actionlog.php +++ b/app/Models/Actionlog.php @@ -398,6 +398,21 @@ class Actionlog extends SnipeModel return \Carbon::parse($last_audit_date)->addMonths($monthInterval)->toDateString(); } + /** + * Gets action logs in chronological order, excluding uploads + * + * @author Vincent Sposato + * @since v1.0 + * @return \Illuminate\Database\Eloquent\Collection + */ + public function getListingOfActionLogsChronologicalOrder() + { + return $this->all() + ->where('action_type', '!=', 'uploaded') + ->orderBy('item_id', 'asc') + ->orderBy('created_at', 'asc') + ->get(); + } /** * Determines what the type of request is so we can log it to the action_log @@ -439,5 +454,4 @@ class Actionlog extends SnipeModel { return $query->leftJoin('users as admin_sort', 'action_logs.created_by', '=', 'admin_sort.id')->select('action_logs.*')->orderBy('admin_sort.first_name', $order)->orderBy('admin_sort.last_name', $order); } - }