Skip to content

Commit 19bf549

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 8feb9c4 + 381c6e0 commit 19bf549

File tree

11 files changed

+46
-19
lines changed

11 files changed

+46
-19
lines changed

app/Listeners/CheckoutableListener.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function onCheckedOut($event)
7777
*/
7878

7979
if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
80-
(method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email())) {
80+
$this->checkoutableShouldSendEmail($event)) {
8181
Log::info('Sending checkout email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
8282
if (!empty($notifiable)) {
8383
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
@@ -146,7 +146,6 @@ public function onCheckedIn($event)
146146
$ccEmails = array_filter($adminCcEmailsArray);
147147
$mailable = $this->getCheckinMailType($event);
148148
$notifiable = $this->getNotifiables($event);
149-
150149
if (!$event->checkedOutTo->locale){
151150
$mailable->locale($event->checkedOutTo->locale);
152151
}
@@ -159,7 +158,7 @@ public function onCheckedIn($event)
159158
* 3. The item should send an email at check-in/check-out
160159
*/
161160
if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
162-
(method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email())) {
161+
$this->checkoutableShouldSendEmail($event)) {
163162
Log::info('Sending checkin email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
164163
if (!empty($notifiable)) {
165164
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
@@ -338,4 +337,12 @@ private function shouldSendWebhookNotification(): bool
338337
{
339338
return Setting::getSettings() && Setting::getSettings()->webhook_endpoint;
340339
}
340+
341+
private function checkoutableShouldSendEmail($event): bool
342+
{
343+
if($event->checkoutable instanceof LicenseSeat){
344+
return $event->checkoutable->license->checkin_email();
345+
}
346+
return (method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email());
347+
}
341348
}

resources/assets/less/overrides.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
padding: 10px;
4848
background: #f4f4f4;
4949
margin-bottom: 3px;
50-
border-left: 2px solid #e6e7e8;
50+
border-inline: 2px solid #e6e7e8;
5151
color: #444;
5252
cursor: move;
5353
}

resources/assets/less/skins/skin-black-dark.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ a {
112112
color: #fff;
113113
}
114114

115-
116-
115+
#sort tr.cansort{
116+
background-color:var(--back-main);
117+
color:var(--text-main);
118+
}
117119

118120
:root {
119121
--background: #222;

resources/assets/less/skins/skin-blue-dark.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ a {
107107
.text-primary {
108108
color: #fff;
109109
}
110+
#sort tr.cansort{
111+
background-color:var(--back-main);
112+
color:var(--text-main);
113+
}
110114

111115

112116

resources/assets/less/skins/skin-green-dark.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ a {
107107
color: #fff;
108108
}
109109

110+
#sort tr.cansort{
111+
background-color:var(--back-main);
112+
color:var(--text-main);
113+
}
110114

111115

112116

resources/assets/less/skins/skin-orange-dark.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ li.dropdown-item-marker {
9898
color: #fff;
9999
}
100100

101+
#sort tr.cansort{
102+
background-color:var(--back-main);
103+
color:var(--text-main);
104+
}
105+
101106
:root {
102107
--background: #222;
103108
--back-main: #333;

resources/assets/less/skins/skin-purple-dark.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ a {
108108
color: #fff;
109109
}
110110

111-
112-
111+
#sort tr.cansort{
112+
background-color:var(--back-main);
113+
color:var(--text-main);
114+
}
113115

114116
:root {
115117
--background: #222;

resources/assets/less/skins/skin-red-dark.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ a {
107107
color: #fff;
108108
}
109109

110-
111-
110+
#sort tr.cansort{
111+
background-color:var(--back-main);
112+
color:var(--text-main);
113+
}
112114

113115
:root {
114116
--background: #222;

resources/assets/less/skins/skin-yellow-dark.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ a {
104104
color: #fff;
105105
}
106106

107-
108-
107+
#sort tr.cansort{
108+
background-color:var(--back-main);
109+
color:var(--text-main);
110+
}
109111

110112
:root {
111113
--background: #222;

resources/views/account/view-assets.blade.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,9 @@ class="table table-striped snipe-table"
431431
<th class="col-md-2" data-switchable="true" data-visible="false">
432432
{{ trans('admin/hardware/form.default_location') }}
433433
</th>
434+
<th class="col-md-2" data-switchable="true" data-visible="false">
435+
{{ trans('general.location') }}
436+
</th>
434437

435438
@can('self.view_purchase_cost')
436439
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
@@ -489,6 +492,9 @@ class="table table-striped snipe-table"
489492
<td>
490493
{{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }}
491494
</td>
495+
<td>
496+
{{ ($asset->location) ? $asset->location->name : '' }}
497+
</td>
492498
@can('self.view_purchase_cost')
493499
<td>
494500
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}

0 commit comments

Comments
 (0)