Skip to content

Commit 484d5ba

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 798685d + c5bede8 commit 484d5ba

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

app/Http/Controllers/Api/ProfileController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function requestedAssets() : array
6969
if ($checkoutRequest && $checkoutRequest->itemRequested()) {
7070
$assets = [
7171
'image' => e($checkoutRequest->itemRequested()->present()->getImageUrl()),
72-
'name' => e($checkoutRequest->itemRequested()->present()->name()),
72+
'name' => e($checkoutRequest->itemRequested()->display_name),
7373
'type' => e($checkoutRequest->itemType()),
7474
'qty' => (int) $checkoutRequest->quantity,
7575
'location' => ($checkoutRequest->location()) ? e($checkoutRequest->location()->name) : null,

app/Http/Controllers/ReportsController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function exportDeprecationReport() : Response
159159
$row[] = e($asset->serial);
160160

161161
if ($target = $asset->assignedTo) {
162-
$row[] = e($target->present()->name());
162+
$row[] = e($target->display_name);
163163
} else {
164164
$row[] = ''; // Empty string if unassigned
165165
}
@@ -856,8 +856,8 @@ public function postCustom(CustomAssetReportRequest $request) : StreamedResponse
856856
}
857857

858858
if ($request->filled('assigned_to')) {
859-
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? $asset->assigned->display_name : '';
860-
$row[] = ($asset->checkedOutToUser() && $asset->assigned) ? 'user' : $asset->assignedType();
859+
$row[] = ($asset->assigned) ? $asset->assigned->display_name : '';
860+
$row[] = ($asset->assigned) ? $asset->assignedType() : '';
861861
}
862862

863863
if ($request->filled('username')) {
@@ -1260,7 +1260,7 @@ public function postAssetAcceptanceReport($deleted = false) : Response
12601260
$row[] = str_replace(',', '', e($item['assetItem']->model->name));
12611261
$row[] = str_replace(',', '', e($item['assetItem']->name));
12621262
$row[] = str_replace(',', '', e($item['assetItem']->asset_tag));
1263-
$row[] = str_replace(',', '', e(($item['acceptance']->assignedTo) ? $item['acceptance']->assignedTo->present()->name() : trans('admin/reports/general.deleted_user')));
1263+
$row[] = str_replace(',', '', e(($item['acceptance']->assignedTo) ? $item['acceptance']->assignedTo->display_name : trans('admin/reports/general.deleted_user')));
12641264
$rows[] = implode(',', $row);
12651265
}
12661266
}

app/Models/CheckoutRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function location()
4646
public function name()
4747
{
4848
if ($this->itemType() == 'asset') {
49-
return $this->itemRequested()->present()->name();
49+
return $this->itemRequested()->display_name;
5050
}
5151

5252
return $this->itemRequested()->name;

app/Notifications/ExpectedCheckinNotification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public function toMail()
5050
$message = (new MailMessage)->markdown('notifications.markdown.expected-checkin',
5151
[
5252
'date' => Helper::getFormattedDateObject($this->params->expected_checkin, 'date', false),
53-
'asset' => $this->params->present()->name(),
53+
'asset' => $this->params->display_name,
5454
'serial' => $this->params->serial,
5555
'asset_tag' => $this->params->asset_tag,
5656
])
57-
->subject(trans('mail.Expected_Checkin_Notification', ['name' => $this->params->present()->name()]));
57+
->subject(trans('mail.Expected_Checkin_Notification', ['name' => $this->params->display_name]));
5858

5959
return $message;
6060
}

app/Presenters/ActionlogPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function target()
145145
return $target->present()->nameUrl();
146146
}
147147

148-
return '<del>'.$target->present()->name().'</del>';
148+
return '<del>'.$target->display_name.'</del>';
149149
}
150150

151151
return '';

resources/views/mail/markdown/checkout-acceptance-response.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| | |
1212
| ------------- | ------------- |
1313
| **{{ trans('mail.user') }}** | {{ $assignedTo->display_name }} |
14-
| **{{ trans('mail.name') }}** | {{ $item->present()->name() }} |
14+
| **{{ trans('mail.name') }}** | {{ $item->display_name }} |
1515
@if (isset($item->asset_tag))
1616
| **{{ trans('mail.asset_tag') }}** | {{ $item->asset_tag }} |
1717
@endif

0 commit comments

Comments
 (0)