diff --git a/app/Presenters/AssetPresenter.php b/app/Presenters/AssetPresenter.php index b011ee15f1..f87819a0cb 100644 --- a/app/Presenters/AssetPresenter.php +++ b/app/Presenters/AssetPresenter.php @@ -180,6 +180,7 @@ class AssetPresenter extends Presenter "sortable" => true, "visible" => false, "title" => trans('general.notes'), + ], [ "field" => "created_at", "searchable" => false, diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index 0cdff34f92..249170379d 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -117,6 +117,7 @@ class LicensePresenter extends Presenter "sortable" => true, "visible" => false, "title" => trans('general.notes'), + "formatter" => "notesFormatter" ] ]; diff --git a/resources/views/asset_maintenances/index.blade.php b/resources/views/asset_maintenances/index.blade.php index 2b926cef58..d80e267229 100644 --- a/resources/views/asset_maintenances/index.blade.php +++ b/resources/views/asset_maintenances/index.blade.php @@ -51,7 +51,7 @@ {{ trans('admin/asset_maintenances/form.asset_maintenance_time') }} {{ trans('admin/asset_maintenances/form.cost') }} {{ trans('general.admin') }} - {{ trans('admin/asset_maintenances/form.notes') }} + {{ trans('admin/asset_maintenances/form.notes') }} @can('update', \App\Models\Asset::class) {{ trans('table.actions') }} @endcan diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index a446bded38..aea5f9490f 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -252,6 +252,14 @@ } + // Convert line breaks to
+ function notesFormatter(value) { + if (value) { + return value.replace(/(?:\r\n|\r|\n)/g, '
');; + } + } + + // We need a special formatter for license seats, since they don't work exactly the same // Checkouts need the license ID, checkins need the specific seat ID