From 2410b1a14627c0fd5f97dd62242bce4826228443 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 8 Mar 2022 18:25:15 -0600 Subject: [PATCH] Add a condition to show customfields as the user wants in localization settings --- resources/views/hardware/view.blade.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 468b8eeeb1..3e25f1bdff 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -437,6 +437,8 @@ @can('superuser') @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} + @elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!='')) + {{ \App\Helpers\Helper::gracefulDecrypt($field, \App\Helpers\Helper::getFormattedDateObject($asset->{$field->db_column_name()}, 'date', false)) }} @else {{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} @endif @@ -447,9 +449,12 @@ @else @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!='')) {{ $asset->{$field->db_column_name()} }} + @elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!='')) + {{ \App\Helpers\Helper::getFormattedDateObject($asset->{$field->db_column_name()}, 'date', false) }} @else {!! nl2br(e($asset->{$field->db_column_name()})) !!} @endif + @endif