mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-05 19:07:30 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
19bf549450
|
@ -77,7 +77,7 @@ class CheckoutableListener
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
|
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'));
|
Log::info('Sending checkout email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
|
||||||
if (!empty($notifiable)) {
|
if (!empty($notifiable)) {
|
||||||
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
|
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
|
||||||
|
@ -146,7 +146,6 @@ class CheckoutableListener
|
||||||
$ccEmails = array_filter($adminCcEmailsArray);
|
$ccEmails = array_filter($adminCcEmailsArray);
|
||||||
$mailable = $this->getCheckinMailType($event);
|
$mailable = $this->getCheckinMailType($event);
|
||||||
$notifiable = $this->getNotifiables($event);
|
$notifiable = $this->getNotifiables($event);
|
||||||
|
|
||||||
if (!$event->checkedOutTo->locale){
|
if (!$event->checkedOutTo->locale){
|
||||||
$mailable->locale($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
|
* 3. The item should send an email at check-in/check-out
|
||||||
*/
|
*/
|
||||||
if ($event->checkoutable->requireAcceptance() || $event->checkoutable->getEula() ||
|
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'));
|
Log::info('Sending checkin email, Locale: ' . ($event->checkedOutTo->locale ?? 'default'));
|
||||||
if (!empty($notifiable)) {
|
if (!empty($notifiable)) {
|
||||||
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
|
Mail::to($notifiable)->cc($ccEmails)->send($mailable);
|
||||||
|
@ -338,4 +337,12 @@ class CheckoutableListener
|
||||||
{
|
{
|
||||||
return Setting::getSettings() && Setting::getSettings()->webhook_endpoint;
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #f4f4f4;
|
background: #f4f4f4;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
border-left: 2px solid #e6e7e8;
|
border-inline: 2px solid #e6e7e8;
|
||||||
color: #444;
|
color: #444;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,8 +112,10 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: #222;
|
--background: #222;
|
||||||
|
|
|
@ -107,6 +107,10 @@ a {
|
||||||
.text-primary {
|
.text-primary {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,10 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,11 @@ li.dropdown-item-marker {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: #222;
|
--background: #222;
|
||||||
--back-main: #333;
|
--back-main: #333;
|
||||||
|
|
|
@ -108,8 +108,10 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: #222;
|
--background: #222;
|
||||||
|
|
|
@ -107,8 +107,10 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: #222;
|
--background: #222;
|
||||||
|
|
|
@ -104,8 +104,10 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sort tr.cansort{
|
||||||
|
background-color:var(--back-main);
|
||||||
|
color:var(--text-main);
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--background: #222;
|
--background: #222;
|
||||||
|
|
|
@ -431,6 +431,9 @@
|
||||||
<th class="col-md-2" data-switchable="true" data-visible="false">
|
<th class="col-md-2" data-switchable="true" data-visible="false">
|
||||||
{{ trans('admin/hardware/form.default_location') }}
|
{{ trans('admin/hardware/form.default_location') }}
|
||||||
</th>
|
</th>
|
||||||
|
<th class="col-md-2" data-switchable="true" data-visible="false">
|
||||||
|
{{ trans('general.location') }}
|
||||||
|
</th>
|
||||||
|
|
||||||
@can('self.view_purchase_cost')
|
@can('self.view_purchase_cost')
|
||||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
|
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">
|
||||||
|
@ -489,6 +492,9 @@
|
||||||
<td>
|
<td>
|
||||||
{{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }}
|
{{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ ($asset->location) ? $asset->location->name : '' }}
|
||||||
|
</td>
|
||||||
@can('self.view_purchase_cost')
|
@can('self.view_purchase_cost')
|
||||||
<td>
|
<td>
|
||||||
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}
|
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}
|
||||||
|
|
|
@ -32,13 +32,6 @@
|
||||||
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
|
.skin-blue .sidebar-menu > li:hover > a, .skin-blue .sidebar-menu > li.active > a {
|
||||||
border-left-color: {{ $snipeSettings->header_color }};
|
border-left-color: {{ $snipeSettings->header_color }};
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: {{ $snipeSettings->header_color }};
|
|
||||||
border-color: {{ $snipeSettings->header_color }};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue