Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@@ -722,8 +722,8 @@ class Helper
|
||||
// The check and message that the user is still using the deprecated version
|
||||
$deprecations = [
|
||||
'ms_teams_deprecated' => array(
|
||||
'check' => !Str::contains(Setting::getSettings()->webhook_endpoint, 'workflows'),
|
||||
'message' => 'The Microsoft Teams webhook URL being used will be deprecated Jan 31st, 2025. <a class="btn btn-primary" href="' . route('settings.slack.index') . '">Change webhook endpoint</a>'),
|
||||
'check' => !Str::contains(Setting::getSettings()->webhook_endpoint, 'workflows') && (Setting::getSettings()->webhook_selected === 'microsoft'),
|
||||
'message' => 'The Microsoft Teams webhook URL being used will be deprecated Dec 31st, 2025. <a class="btn btn-primary" href="' . route('settings.slack.index') . '">Change webhook endpoint</a>'),
|
||||
];
|
||||
|
||||
// if item of concern is being used and its being used with the deprecated values return the notification array.
|
||||
|
||||
@@ -71,12 +71,12 @@ class SlackSettingsForm extends Component
|
||||
|
||||
$this->setting = Setting::getSettings();
|
||||
$this->save_button = trans('general.save');
|
||||
$this->webhook_selected = $this->setting->webhook_selected;
|
||||
$this->webhook_name = $this->webhook_text[$this->setting->webhook_selected]["name"];
|
||||
$this->webhook_icon = $this->webhook_text[$this->setting->webhook_selected]["icon"];
|
||||
$this->webhook_placeholder = $this->webhook_text[$this->setting->webhook_selected]["placeholder"];
|
||||
$this->webhook_link = $this->webhook_text[$this->setting->webhook_selected]["link"];
|
||||
$this->webhook_test = $this->webhook_text[$this->setting->webhook_selected]["test"];
|
||||
$this->webhook_selected = $this->setting->webhook_selected ?? 'slack';
|
||||
$this->webhook_name = $this->webhook_text[$this->setting->webhook_selected]["name"] ?? $this->webhook_text['slack']["name"];
|
||||
$this->webhook_icon = $this->webhook_text[$this->setting->webhook_selected]["icon"] ?? $this->webhook_text['slack']["icon"];
|
||||
$this->webhook_placeholder = $this->webhook_text[$this->setting->webhook_selected]["placeholder"] ?? $this->webhook_text['slack']["placeholder"];
|
||||
$this->webhook_link = $this->webhook_text[$this->setting->webhook_selected]["link"] ?? $this->webhook_text['slack']["link"];
|
||||
$this->webhook_test = $this->webhook_text[$this->setting->webhook_selected]["test"] ?? $this->webhook_text['slack']["test"];
|
||||
$this->webhook_endpoint = $this->setting->webhook_endpoint;
|
||||
$this->webhook_channel = $this->setting->webhook_channel;
|
||||
$this->webhook_botname = $this->setting->webhook_botname;
|
||||
@@ -90,7 +90,7 @@ class SlackSettingsForm extends Component
|
||||
$this->isDisabled= '';
|
||||
}
|
||||
if($this->webhook_selected === 'microsoft' && $this->teams_webhook_deprecated) {
|
||||
session()->flash('warning', 'The selected Microsoft Teams webhook URL will be deprecated Jan 31st, 2025. Please use a workflow URL. Microsofts Documentation on creating a workflow can be found <a href="https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498" target="_blank"> here.</a>');
|
||||
session()->flash('warning', trans('admin/settings/message.webhook.ms_teams_deprecation'));
|
||||
}
|
||||
}
|
||||
public function updated($field) {
|
||||
@@ -191,6 +191,7 @@ class SlackSettingsForm extends Component
|
||||
$this->setting->webhook_endpoint = '';
|
||||
$this->setting->webhook_channel = '';
|
||||
$this->setting->webhook_botname = '';
|
||||
$this->setting->webhook_selected = '';
|
||||
|
||||
$this->setting->save();
|
||||
|
||||
|
||||
@@ -298,6 +298,7 @@ class AssetPresenter extends Presenter
|
||||
'sortable' => true,
|
||||
'visible' => false,
|
||||
'title' => trans('general.byod'),
|
||||
'class' => 'byod',
|
||||
'formatter' => 'trueFalseFormatter',
|
||||
|
||||
],
|
||||
|
||||
@@ -49,12 +49,11 @@ return [
|
||||
'error_redirect' => 'ERROR: 301/302 :endpoint returns a redirect. For security reasons, we don’t follow redirects. Please use the actual endpoint.',
|
||||
'error_misc' => 'Something went wrong. :( ',
|
||||
'webhook_fail' => ' webhook notification failed: Check to make sure the URL is still valid.',
|
||||
'webhook_channel_not_found' => ' webhook channel not found.'
|
||||
'webhook_channel_not_found' => ' webhook channel not found.',
|
||||
'ms_teams_deprecation' => 'The selected Microsoft Teams webhook URL will be deprecated Dec 31st, 2025. Please use a workflow URL. Microsoft\'s documentation on creating a workflow can be found <a href="https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498" target="_blank"> here.</a>',
|
||||
],
|
||||
|
||||
'location_scoping' => [
|
||||
'not_saved' => 'Your settings were not saved.',
|
||||
'mismatch' => 'There is 1 item in the database that need your attention before you can enable location scoping.|There are :count items in the database that need your attention before you can enable location scoping.',
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
|
||||
<!-- byod checkbox -->
|
||||
<div class="form-group">
|
||||
<div class="form-group byod">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
<label class="form-control">
|
||||
<input type="checkbox" value="1" name="byod" {{ (old('remote', $item->byod)) == '1' ? ' checked="checked"' : '' }} aria-label="byod">
|
||||
|
||||
@@ -699,7 +699,7 @@
|
||||
</div>
|
||||
|
||||
<!-- byod -->
|
||||
<div class="row">
|
||||
<div class="row byod">
|
||||
<div class="col-md-3">
|
||||
<strong>{{ trans('general.byod') }}</strong>
|
||||
</div>
|
||||
|
||||
@@ -266,19 +266,21 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endcan
|
||||
|
||||
@can('admin')
|
||||
@if ($snipeSettings->show_alerts_in_menu=='1')
|
||||
<!-- Tasks: style can be found in dropdown.less -->
|
||||
<?php $alert_items = Helper::checkLowInventory(); $deprecations = Helper::deprecationCheck()?>
|
||||
<!-- Tasks: style can be found in dropdown.less -->
|
||||
<?php $alert_items = ($snipeSettings->show_alerts_in_menu=='1') ? Helper::checkLowInventory() : [];
|
||||
$deprecations = Helper::deprecationCheck()
|
||||
?>
|
||||
|
||||
<li class="dropdown tasks-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<x-icon type="alerts" />
|
||||
<span class="sr-only">{{ trans('general.alerts') }}</span>
|
||||
@if (count($alert_items) || count($deprecations))
|
||||
<span class="label label-danger">{{ count($alert_items) + count($deprecations) }}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown tasks-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<x-icon type="alerts" />
|
||||
<span class="sr-only">{{ trans('general.alerts') }}</span>
|
||||
@if(count($alert_items) + count($deprecations))
|
||||
<span class="label label-danger">{{ count($alert_items) + count($deprecations)}}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
@can('superadmin')
|
||||
@if($deprecations)
|
||||
@foreach ($deprecations as $key => $deprecation)
|
||||
@if ($deprecation['check'])
|
||||
@@ -286,11 +288,12 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
<li class="header">{{ trans_choice('general.quantity_minimum', count($alert_items)) }}</li>
|
||||
@endcan
|
||||
@if($alert_items)
|
||||
<li class="header">{{ trans_choice('general.quantity_minimum', count($alert_items)) }}</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
|
||||
@for($i = 0; count($alert_items) > $i; $i++)
|
||||
|
||||
<li><!-- Task item -->
|
||||
@@ -315,13 +318,13 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endfor
|
||||
</ul>
|
||||
</li>
|
||||
{{-- <li class="footer">
|
||||
<a href="#">{{ trans('general.tasks_view_all') }}</a>
|
||||
</li> --}}
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
{{-- <li class="footer">
|
||||
<a href="#">{{ trans('general.tasks_view_all') }}</a>
|
||||
</li> --}}
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
|
||||
|
||||
|
||||
@@ -475,48 +478,48 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endif
|
||||
|
||||
|
||||
<li{!! (Request::query('status') == 'Deployed' ? ' class="active"' : '') !!}>
|
||||
<li id="deployed-sidenav-option" {!! (Request::query('status') == 'Deployed' ? ' class="active"' : '') !!}>
|
||||
<a href="{{ url('hardware?status=Deployed') }}">
|
||||
<x-icon type="circle" class="text-blue fa-fw" />
|
||||
{{ trans('general.deployed') }}
|
||||
<span class="badge">{{ (isset($total_deployed_sidebar)) ? $total_deployed_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'RTD' ? ' class="active"' : '') !!}>
|
||||
<li id="rtd-sidenav-option"{!! (Request::query('status') == 'RTD' ? ' class="active"' : '') !!}>
|
||||
<a href="{{ url('hardware?status=RTD') }}">
|
||||
<x-icon type="circle" class="text-green fa-fw" />
|
||||
{{ trans('general.ready_to_deploy') }}
|
||||
<span class="badge">{{ (isset($total_rtd_sidebar)) ? $total_rtd_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'Pending' ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Pending') }}">
|
||||
<li id="pending-sidenav-option"{!! (Request::query('status') == 'Pending' ? ' class="active"' : '') !!}><a href="{{ url('hardware?status=Pending') }}">
|
||||
<x-icon type="circle" class="text-orange fa-fw" />
|
||||
{{ trans('general.pending') }}
|
||||
<span class="badge">{{ (isset($total_pending_sidebar)) ? $total_pending_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'Undeployable' ? ' class="active"' : '') !!} ><a
|
||||
<li id="undeployable-sidenav-option"{!! (Request::query('status') == 'Undeployable' ? ' class="active"' : '') !!} ><a
|
||||
href="{{ url('hardware?status=Undeployable') }}">
|
||||
<x-icon type="x" class="text-red fa-fw" />
|
||||
{{ trans('general.undeployable') }}
|
||||
<span class="badge">{{ (isset($total_undeployable_sidebar)) ? $total_undeployable_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'byod' ? ' class="active"' : '') !!}><a
|
||||
<li id="byod-sidenav-option"{!! (Request::query('status') == 'byod' ? ' class="active"' : '') !!}><a
|
||||
href="{{ url('hardware?status=byod') }}">
|
||||
<x-icon type="x" class="text-red fa-fw" />
|
||||
{{ trans('general.byod') }}
|
||||
<span class="badge">{{ (isset($total_byod_sidebar)) ? $total_byod_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'Archived' ? ' class="active"' : '') !!}><a
|
||||
<li id="archived-sidenav-option"{!! (Request::query('status') == 'Archived' ? ' class="active"' : '') !!}><a
|
||||
href="{{ url('hardware?status=Archived') }}">
|
||||
<x-icon type="x" class="text-red fa-fw" />
|
||||
{{ trans('admin/hardware/general.archived') }}
|
||||
<span class="badge">{{ (isset($total_archived_sidebar)) ? $total_archived_sidebar : '' }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{!! (Request::query('status') == 'Requestable' ? ' class="active"' : '') !!}><a
|
||||
<li id="requestable-sidenav-option"{!! (Request::query('status') == 'Requestable' ? ' class="active"' : '') !!}><a
|
||||
href="{{ url('hardware?status=Requestable') }}">
|
||||
<x-icon type="checkmark" class="text-blue fa-fw" />
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
@@ -524,7 +527,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
|
||||
@can('audit', \App\Models\Asset::class)
|
||||
<li{!! (Request::is('hardware/audit/due') ? ' class="active"' : '') !!}>
|
||||
<li id="audit-due-sidenav-option"{!! (Request::is('hardware/audit/due') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('assets.audit.due') }}">
|
||||
<x-icon type="audit" class="text-yellow fa-fw"/>
|
||||
{{ trans('general.audit_due') }}
|
||||
@@ -534,7 +537,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endcan
|
||||
|
||||
@can('checkin', \App\Models\Asset::class)
|
||||
<li{!! (Request::is('hardware/checkins/due') ? ' class="active"' : '') !!}>
|
||||
<li id="checkin-due-sidenav-option"{!! (Request::is('hardware/checkins/due') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('assets.checkins.due') }}">
|
||||
<x-icon type="due" class="text-orange fa-fw"/>
|
||||
{{ trans('general.checkin_due') }}
|
||||
@@ -577,14 +580,14 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('admin')
|
||||
<li>
|
||||
<li id="import-history-sidenav-option">
|
||||
<a href="{{ url('hardware/history') }}">
|
||||
{{ trans('general.import-history') }}
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('audit', \App\Models\Asset::class)
|
||||
<li>
|
||||
<li id="bulk-audit-sidenav-option">
|
||||
<a href="{{ route('assets.bulkaudit') }}">
|
||||
{{ trans('general.bulkaudit') }}
|
||||
</a>
|
||||
@@ -602,7 +605,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('index', \App\Models\Accessory::class)
|
||||
<li{!! (Request::is('accessories*') ? ' class="active"' : '') !!}>
|
||||
<li id="accessories-sidenav-option"{!! (Request::is('accessories*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('accessories.index') }}">
|
||||
<x-icon type="accessories" class="fa-fw" />
|
||||
<span>{{ trans('general.accessories') }}</span>
|
||||
@@ -610,7 +613,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('view', \App\Models\Consumable::class)
|
||||
<li{!! (Request::is('consumables*') ? ' class="active"' : '') !!}>
|
||||
<li id="consumables-sidenav-option"{!! (Request::is('consumables*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ url('consumables') }}">
|
||||
<x-icon type="consumables" class="fa-fw" />
|
||||
<span>{{ trans('general.consumables') }}</span>
|
||||
@@ -618,7 +621,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('view', \App\Models\Component::class)
|
||||
<li{!! (Request::is('components*') ? ' class="active"' : '') !!}>
|
||||
<li id="components-sidenav-option"{!! (Request::is('components*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('components.index') }}">
|
||||
<x-icon type="components" class="fa-fw" />
|
||||
<span>{{ trans('general.components') }}</span>
|
||||
@@ -626,7 +629,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('view', \App\Models\PredefinedKit::class)
|
||||
<li{!! (Request::is('kits') ? ' class="active"' : '') !!}>
|
||||
<li id="kits-sidenav-option"{!! (Request::is('kits') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('kits.index') }}">
|
||||
<x-icon type="kits" class="fa-fw" />
|
||||
<span>{{ trans('general.kits') }}</span>
|
||||
@@ -635,7 +638,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endcan
|
||||
|
||||
@can('view', \App\Models\User::class)
|
||||
<li{!! (Request::is('users*') ? ' class="active"' : '') !!}>
|
||||
<li id="users-sidenav-option"{!! (Request::is('users*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('users.index') }}" {{$snipeSettings->shortcuts_enabled == 1 ? "accesskey=6" : ''}}>
|
||||
<x-icon type="users" class="fa-fw" />
|
||||
<span>{{ trans('general.people') }}</span>
|
||||
@@ -643,7 +646,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
</li>
|
||||
@endcan
|
||||
@can('import')
|
||||
<li{!! (Request::is('import/*') ? ' class="active"' : '') !!}>
|
||||
<li id="import-sidenav-option"{!! (Request::is('import/*') ? ' class="active"' : '') !!}>
|
||||
<a href="{{ route('imports.index') }}">
|
||||
<x-icon type="import" class="fa-fw" />
|
||||
<span>{{ trans('general.import') }}</span>
|
||||
@@ -652,7 +655,7 @@ dir="{{ Helper::determineLanguageDirection() }}">
|
||||
@endcan
|
||||
|
||||
@can('backend.interact')
|
||||
<li class="treeview {!! in_array(Request::route()->getName(),App\Helpers\Helper::SettingUrls()) ? ' active': '' !!}">
|
||||
<li id="settings-sidenav-option" class="treeview {!! in_array(Request::route()->getName(),App\Helpers\Helper::SettingUrls()) ? ' active': '' !!}">
|
||||
<a href="#" id="settings">
|
||||
<x-icon type="settings" class="fa-fw" />
|
||||
<span>{{ trans('general.settings') }}</span>
|
||||
|
||||
Reference in New Issue
Block a user