Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2024-11-13 21:17:40 +00:00
commit 19bf549450
11 changed files with 46 additions and 19 deletions

View file

@ -77,7 +77,7 @@ class CheckoutableListener
*/
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);
@ -146,7 +146,6 @@ class CheckoutableListener
$ccEmails = array_filter($adminCcEmailsArray);
$mailable = $this->getCheckinMailType($event);
$notifiable = $this->getNotifiables($event);
if (!$event->checkedOutTo->locale){
$mailable->locale($event->checkedOutTo->locale);
}
@ -159,7 +158,7 @@ class CheckoutableListener
* 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);
@ -338,4 +337,12 @@ class CheckoutableListener
{
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());
}
}

View file

@ -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;
}

View file

@ -112,8 +112,10 @@ a {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}
:root {
--background: #222;

View file

@ -107,6 +107,10 @@ a {
.text-primary {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

View file

@ -107,6 +107,10 @@ a {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}

View file

@ -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;

View file

@ -108,8 +108,10 @@ a {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}
:root {
--background: #222;

View file

@ -107,8 +107,10 @@ a {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}
:root {
--background: #222;

View file

@ -104,8 +104,10 @@ a {
color: #fff;
}
#sort tr.cansort{
background-color:var(--back-main);
color:var(--text-main);
}
:root {
--background: #222;

View file

@ -431,6 +431,9 @@
<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">
@ -489,6 +492,9 @@
<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) !!}

View file

@ -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