Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 13, 2024
2 parents 8feb9c4 + 381c6e0 commit 19bf549
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 19 deletions.
13 changes: 10 additions & 3 deletions app/Listeners/CheckoutableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function onCheckedOut($event)
*/

if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
(method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email())) {
$this->checkoutableShouldSendEmail($event)) {
Log::info('Sending checkout email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
if (!empty($notifiable)) {
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
Expand Down Expand Up @@ -146,7 +146,6 @@ public function onCheckedIn($event)
$ccEmails = array_filter($adminCcEmailsArray);
$mailable = $this->getCheckinMailType($event);
$notifiable = $this->getNotifiables($event);

if (!$event->checkedOutTo->locale){
$mailable->locale($event->checkedOutTo->locale);
}
Expand All @@ -159,7 +158,7 @@ public function onCheckedIn($event)
* 3. The item should send an email at check-in/check-out
*/
if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
(method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email())) {
$this->checkoutableShouldSendEmail($event)) {
Log::info('Sending checkin email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
if (!empty($notifiable)) {
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
Expand Down Expand Up @@ -338,4 +337,12 @@ private function shouldSendWebhookNotification(): bool
{
return Setting::getSettings() && Setting::getSettings()->webhook_endpoint;
}

private function checkoutableShouldSendEmail($event): bool
{
if($event->checkoutable instanceof LicenseSeat){
return $event->checkoutable->license->checkin_email();
}
return (method_exists($event->checkoutable, 'checkin_email') && $event->checkoutable->checkin_email());
}
}
2 changes: 1 addition & 1 deletion resources/assets/less/overrides.less
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
padding: 10px;
background: #f4f4f4;
margin-bottom: 3px;
border-left: 2px solid #e6e7e8;
border-inline: 2px solid #e6e7e8;
color: #444;
cursor: move;
}
Expand Down
6 changes: 4 additions & 2 deletions resources/assets/less/skins/skin-black-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ a {
color: #fff;
}



#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

:root {
--background: #222;
Expand Down
4 changes: 4 additions & 0 deletions resources/assets/less/skins/skin-blue-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ a {
.text-primary {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}



Expand Down
4 changes: 4 additions & 0 deletions resources/assets/less/skins/skin-green-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ a {
color: #fff;
}

#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}



Expand Down
5 changes: 5 additions & 0 deletions resources/assets/less/skins/skin-orange-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ li.dropdown-item-marker {
color: #fff;
}

#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

:root {
--background: #222;
--back-main: #333;
Expand Down
6 changes: 4 additions & 2 deletions resources/assets/less/skins/skin-purple-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ a {
color: #fff;
}



#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

:root {
--background: #222;
Expand Down
6 changes: 4 additions & 2 deletions resources/assets/less/skins/skin-red-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ a {
color: #fff;
}



#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

:root {
--background: #222;
Expand Down
6 changes: 4 additions & 2 deletions resources/assets/less/skins/skin-yellow-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ a {
color: #fff;
}



#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

:root {
--background: #222;
Expand Down
6 changes: 6 additions & 0 deletions resources/views/account/view-assets.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ class="table table-striped snipe-table"
<th class="col-md-2" data-switchable="true" data-visible="false">
{{ trans('admin/hardware/form.default_location') }}
</th>
<th class="col-md-2" data-switchable="true" data-visible="false">
{{ trans('general.location') }}
</th>

@can('self.view_purchase_cost')
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
Expand Down Expand Up @@ -489,6 +492,9 @@ class="table table-striped snipe-table"
<td>
{{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }}
</td>
<td>
{{ ($asset->location) ? $asset->location->name : '' }}
</td>
@can('self.view_purchase_cost')
<td>
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}
Expand Down
7 changes: 0 additions & 7 deletions resources/views/layouts/basic.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
border-left-color: {{ $snipeSettings->header_color }};
}
.btn-primary {
background-color: {{ $snipeSettings->header_color }};
border-color: {{ $snipeSettings->header_color }};
}
</style>
@endif

Expand Down

0 comments on commit 19bf549

Please sign in to comment.