From e621eaf456e311087d156bb0d10bb649e1453ea5 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 1 Sep 2021 13:58:17 -0500 Subject: [PATCH] Change date showed in the activity report view, the condition is now on action_date --- app/Http/Transformers/ActionlogsTransformer.php | 4 ++-- resources/views/reports/activity.blade.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Transformers/ActionlogsTransformer.php b/app/Http/Transformers/ActionlogsTransformer.php index e13a1686e5..9618624ae0 100644 --- a/app/Http/Transformers/ActionlogsTransformer.php +++ b/app/Http/Transformers/ActionlogsTransformer.php @@ -95,7 +95,7 @@ class ActionlogsTransformer 'id' => (int) $actionlog->location->id, 'name' => e($actionlog->location->name) ] : null, - 'created_at' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'):Helper::getFormattedDateObject($actionlog->created_at, 'datetime'), + 'created_at' => Helper::getFormattedDateObject($actionlog->created_at, 'datetime'), 'updated_at' => Helper::getFormattedDateObject($actionlog->updated_at, 'datetime'), 'next_audit_date' => ($actionlog->itemType()=='asset') ? Helper::getFormattedDateObject($actionlog->calcNextAuditDate(null, $actionlog->item), 'date'): null, 'days_to_next_audit' => $actionlog->daysUntilNextAudit($settings->audit_interval, $actionlog->item), @@ -115,7 +115,7 @@ class ActionlogsTransformer 'note' => ($actionlog->note) ? e($actionlog->note): null, 'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null, 'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null, - 'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): null, + 'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): Helper::getFormattedDateObject($actionlog->created_at, 'datetime'), ]; diff --git a/resources/views/reports/activity.blade.php b/resources/views/reports/activity.blade.php index f0cc5f25ec..5f9bddfcec 100644 --- a/resources/views/reports/activity.blade.php +++ b/resources/views/reports/activity.blade.php @@ -45,7 +45,7 @@ Icon - {{ trans('general.date') }} + {{ trans('general.date') }} {{ trans('general.admin') }} {{ trans('general.action') }} {{ trans('general.type') }}