Skip to content

A free open source IT asset/license management system

Added component to blades

snipefd7216eecc9f
diff --git a/resources/views/accessories/index.blade.php b/resources/views/accessories/index.blade.php
index 79a05a35f8..e5fa02801e 100755
--- a/resources/views/accessories/index.blade.php
+++ b/resources/views/accessories/index.blade.php
@@ -23,7 +23,11 @@
name="accessories"
:route="route('api.accessories.index', ['status' => e(request('status'))])"
fixed_right_number="3"
- :presenter="\App\Presenters\AccessoryPresenter::dataTableLayout(request('status') === 'Deleted')"
+ :presenter="\App\Presenters\AccessoryPresenter::dataTableLayout(match (request('status')) {
+ 'Deleted' => ['archived'],
+ 'Archived' => ['deleted_at'],
+ default => ['archived', 'deleted_at'],
+ })"
/>
</x-box>
<x-shiftclick/>
@@ -39,5 +43,10 @@
@section('moar_scripts')
-@include ('partials.bootstrap-table')
+ @include ('partials.bootstrap-table')
+
+ <x-table.advanced-search
+ tableId="accessoriesListingTable"
+ :model="\App\Models\Accessory::class"
+ />
@stop
diff --git a/resources/views/blade/table/accessories.blade.php b/resources/views/blade/table/accessories.blade.php
index e4af6c0a25..fc0d7d9c72 100644
--- a/resources/views/blade/table/accessories.blade.php
+++ b/resources/views/blade/table/accessories.blade.php
@@ -1,7 +1,7 @@
@props([
'route' => route('api.accessories.index'),
'name' => 'default',
- 'presenter' => \App\Presenters\AccessoryPresenter::dataTableLayout(),
+ 'presenter' => \App\Presenters\AccessoryPresenter::dataTableLayout(['deleted_at']),
'fixed_right_number' => 2,
'fixed_number' => 2,
'table_header' => trans('general.accessories'),
diff --git a/resources/views/blade/table/locations.blade.php b/resources/views/blade/table/locations.blade.php
index 6a8caf1d56..14c5e6afc5 100644
--- a/resources/views/blade/table/locations.blade.php
+++ b/resources/views/blade/table/locations.blade.php
@@ -24,7 +24,7 @@
:$presenter
:$fixed_right_number
show_column_search="true"
- show_advanced_search="false"
+ show_advanced_search="true"
buttons="locationButtons"
api_url="{{ $route }}"
export_filename="export-{{ $export_name ? str_slug($export_name).'-' : '' }}locations-{{ date('Y-m-d') }}"
diff --git a/resources/views/blade/table/maintenances.blade.php b/resources/views/blade/table/maintenances.blade.php
index d801bf16b0..3ab39a0fba 100644
--- a/resources/views/blade/table/maintenances.blade.php
+++ b/resources/views/blade/table/maintenances.blade.php
@@ -19,6 +19,7 @@
<x-table
:fixed_right_number="$fixed_right_number"
:fixed_number="$fixed_number"
+ show_advanced_search="true"
buttons="maintenanceButtons"
api_url="{{ $route ?? route('api.maintenances.index') }}"
:presenter="\App\Presenters\MaintenancesPresenter::dataTableLayout($hide_fields)"
diff --git a/resources/views/categories/index.blade.php b/resources/views/categories/index.blade.php
index a216dfb74b..002aa5d821 100755
--- a/resources/views/categories/index.blade.php
+++ b/resources/views/categories/index.blade.php
@@ -40,5 +40,10 @@
'search' => true,
'columns' => \App\Presenters\CategoryPresenter::dataTableLayout()
])
+
+<x-table.advanced-search
+ tableId="categoryListingTable"
+ :model="\App\Models\Category::class"
+/>
@stop
diff --git a/resources/views/companies/index.blade.php b/resources/views/companies/index.blade.php
index 006d098aac..de4da3e0c4 100644
--- a/resources/views/companies/index.blade.php
+++ b/resources/views/companies/index.blade.php
@@ -22,6 +22,7 @@
buttons="companyButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.companies.index') }}"
:presenter="\App\Presenters\CompanyPresenter::dataTableLayout()"
export_filename="export-companies-{{ date('Y-m-d') }}"
@@ -33,4 +34,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table')
+
+<x-table.advanced-search
+ tableId="companyListingTable"
+ :model="\App\Models\Company::class"
+/>
@stop
diff --git a/resources/views/components/index.blade.php b/resources/views/components/index.blade.php
index ef3c01e055..470c27feef 100644
--- a/resources/views/components/index.blade.php
+++ b/resources/views/components/index.blade.php
@@ -20,6 +20,7 @@
<x-container>
<x-box name="components" sr_only_title>
<x-table.components
+ name="components"
:route="route('api.components.index', ['status' => e(request('status'))])"
:presenter="\App\Presenters\ComponentPresenter::dataTableLayout(request('status') === 'Deleted')"
/>
@@ -33,6 +34,8 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'components-export', 'search' => true, 'showFooter' => true, 'columns' => \App\Presenters\ComponentPresenter::dataTableLayout()])
-
-
+<x-table.advanced-search
+ tableId="componentsListingTable"
+ :model="\App\Models\Component::class"
+/>
@stop
diff --git a/resources/views/consumables/index.blade.php b/resources/views/consumables/index.blade.php
index ccd4ff9ec9..3b51e8e448 100644
--- a/resources/views/consumables/index.blade.php
+++ b/resources/views/consumables/index.blade.php
@@ -39,4 +39,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'consumables-export', 'search' => true,'showFooter' => true, 'columns' => \App\Presenters\ConsumablePresenter::dataTableLayout()])
+
+<x-table.advanced-search
+ tableId="consumablesListingTable"
+ :model="\App\Models\Consumable::class"
+/>
@stop
diff --git a/resources/views/departments/index.blade.php b/resources/views/departments/index.blade.php
index 6c0bf28ee0..e890444301 100644
--- a/resources/views/departments/index.blade.php
+++ b/resources/views/departments/index.blade.php
@@ -20,6 +20,7 @@
<x-table
name="department"
show_column_search="false"
+ show_advanced_search="true"
buttons="departmentButtons"
fixed_right_number="1"
fixed_number="1"
@@ -35,4 +36,8 @@
@section('moar_scripts')
@include ('partials.bootstrap-table')
+ <x-table.advanced-search
+ tableId="departmentListingTable"
+ :model="\App\Models\Department::class"
+ />
@stop
diff --git a/resources/views/depreciations/index.blade.php b/resources/views/depreciations/index.blade.php
index 002b511c1a..58a57b6b80 100755
--- a/resources/views/depreciations/index.blade.php
+++ b/resources/views/depreciations/index.blade.php
@@ -21,6 +21,7 @@
<x-table
name="depreciation"
show_column_search="false"
+ show_advanced_search="true"
buttons="depreciationButtons"
fixed_right_number="1"
fixed_number="1"
@@ -34,4 +35,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'depreciations-export', 'search' => true])
+
+<x-table.advanced-search
+ tableId="depreciationListingTable"
+ :model="\App\Models\Depreciation::class"
+/>
@stop
diff --git a/resources/views/groups/index.blade.php b/resources/views/groups/index.blade.php
index 94abe90933..ac6c59fa09 100755
--- a/resources/views/groups/index.blade.php
+++ b/resources/views/groups/index.blade.php
@@ -21,6 +21,7 @@
buttons="groupButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.groups.index') }}"
:presenter="\App\Presenters\GroupPresenter::dataTableLayout()"
export_filename="export-groups-{{ date('Y-m-d') }}"
@@ -31,4 +32,9 @@
@stop
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'groups-export', 'search' => true])
+
+<x-table.advanced-search
+ tableId="groupsListingTable"
+ :model="\App\Models\Group::class"
+/>
@stop
diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php
index b2b75484b9..4332060c26 100755
--- a/resources/views/hardware/index.blade.php
+++ b/resources/views/hardware/index.blade.php
@@ -57,6 +57,7 @@
<x-container>
<x-box name="assets" sr_only_title>
<x-table.assets
+ name="assets"
:route="route('api.assets.index', array(
'status_type' => is_scalar($requestStatusType) ? $requestStatusType : null,
'order_number' => is_scalar($requestOrderNumber) ? strval($requestOrderNumber) : null,
@@ -74,4 +75,8 @@
@section('moar_scripts')
@include('partials.bootstrap-table')
+<x-table.advanced-search
+ tableId="assetsListingTable"
+ :model="\App\Models\Asset::class"
+/>
@stop
diff --git a/resources/views/licenses/index.blade.php b/resources/views/licenses/index.blade.php
index 205cc45768..73d7a7078e 100755
--- a/resources/views/licenses/index.blade.php
+++ b/resources/views/licenses/index.blade.php
@@ -32,4 +32,8 @@
@section('moar_scripts')
@include ('partials.bootstrap-table')
+<x-table.advanced-search
+ tableId="licensesListingTable"
+ :model="\App\Models\License::class"
+/>
@stop
diff --git a/resources/views/locations/index.blade.php b/resources/views/locations/index.blade.php
index 0c094abe75..2631febef6 100755
--- a/resources/views/locations/index.blade.php
+++ b/resources/views/locations/index.blade.php
@@ -24,4 +24,8 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
+<x-table.advanced-search
+ tableId="locationsListingTable"
+ :model="\App\Models\Location::class"
+/>
@stop
diff --git a/resources/views/maintenance-types/index.blade.php b/resources/views/maintenance-types/index.blade.php
index 98344f0567..0b086fe33a 100644
--- a/resources/views/maintenance-types/index.blade.php
+++ b/resources/views/maintenance-types/index.blade.php
@@ -22,6 +22,7 @@
buttons="maintenanceTypeButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.maintenance-types.index') }}"
:presenter="\App\Presenters\MaintenanceTypePresenter::dataTableLayout()"
export_filename="export-maintenance-types-{{ date('Y-m-d') }}"
@@ -32,4 +33,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table')
+
+ <x-table.advanced-search
+ tableId="maintenancetypeListingTable"
+ :model="\App\Models\MaintenanceType::class"
+ />
@stop
diff --git a/resources/views/maintenances/index.blade.php b/resources/views/maintenances/index.blade.php
index 6053713ce2..57db9242ed 100644
--- a/resources/views/maintenances/index.blade.php
+++ b/resources/views/maintenances/index.blade.php
@@ -33,4 +33,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'maintenances-export', 'search' => true])
<x-modals.maintenance-complete />
+
+ <x-table.advanced-search
+ tableId="maintenanceListingTable"
+ :model="\App\Models\Maintenance::class"
+ />
@stop
diff --git a/resources/views/manufacturers/index.blade.php b/resources/views/manufacturers/index.blade.php
index 975b04d059..a31f7423ed 100755
--- a/resources/views/manufacturers/index.blade.php
+++ b/resources/views/manufacturers/index.blade.php
@@ -36,6 +36,7 @@
buttons="manufacturerButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.manufacturers.index') }}"
:presenter="\App\Presenters\ManufacturerPresenter::dataTableLayout()"
export_filename="export-manufacturers-{{ date('Y-m-d') }}"
@@ -54,4 +55,9 @@
@include ('partials.bootstrap-table')
+
+<x-table.advanced-search
+ tableId="manufacturerListingTable"
+ :model="\App\Models\Manufacturer::class"
+/>
@stop
diff --git a/resources/views/models/index.blade.php b/resources/views/models/index.blade.php
index 4041ea71ce..24223ca83e 100755
--- a/resources/views/models/index.blade.php
+++ b/resources/views/models/index.blade.php
@@ -45,4 +45,8 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'models-export', 'search' => true])
+<x-table.advanced-search
+ tableId="modelsListingTable"
+ :model="\App\Models\AssetModel::class"
+/>
@stop
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php
index 5280745b83..4a0a07ff60 100644
--- a/resources/views/partials/bootstrap-table.blade.php
+++ b/resources/views/partials/bootstrap-table.blade.php
@@ -56,6 +56,8 @@
var advancedSearchAndText = @json(trans('general.and'));
var advancedSearchOrText = @json(trans('general.or'));
var advancedSearchClearAllText = @json(trans('general.clear_all_filters'));
+ var advancedSearchYesText = @json(trans('general.yes'));
+ var advancedSearchNoText = @json(trans('general.no'));
var advancedSearchOperatorStorageKey = 'snipeit.bs.table.advancedSearchOperator';
var normalizeAdvancedSearchOperator = function (operator) {
@@ -299,6 +301,27 @@
var html = '<span class="label label-warning" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;">' +
advancedSearchOperatorLabel + ': ' + (op === 'or' ? advancedSearchOrText : advancedSearchAndText) + '</span>';
+ // Advanced-filter widget registry. The per-table JS that
+ // injects compact multi-select widgets into the modal
+ // (see accessories/index.blade.php for the first user)
+ // writes an {id: name} map to
+ // window.snipeAdvancedFilterLabels[idTable][field] on
+ // every widget change. The pill renderer resolves each
+ // CSV of ids back to names via this registry so the
+ // operator sees "Supplier: Batz LLC, Thompson Group"
+ // instead of "Supplier: 10, 42". Unknown ids fall back
+ // to their raw value.
+ var labelRegistry = (window.snipeAdvancedFilterLabels || {})[this.options.idTable] || {};
+ var resolveFilterLabel = function (field, value) {
+ var map = labelRegistry[field];
+ if (!map || typeof value !== 'string' || value === '') { return value; }
+ var parts = value.split(',').map(function (v) { return v.trim(); }).filter(Boolean);
+ if (parts.length === 0) { return value; }
+ return parts.map(function (id) {
+ return (map && map[id]) ? map[id] : id;
+ }).join(', ');
+ };
+
Object.keys(filters).forEach(f => {
// The filter name comes from the URL (deeplink hydration in
// the block below), so it is attacker-controllable. Both
@@ -310,10 +333,85 @@
// jQuery.html() would then parse and execute).
var safeLabel = escapeAdvancedSearchValue(colMap[f] || f);
var safeField = escapeAdvancedSearchAttr(f);
- html += '<span class="label label-primary" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;"><b>' +
- safeLabel + ':</b> ' + escapeAdvancedSearchValue(filters[f]) +
- ' <a href="javascript:void(0)" class="snipe-advanced-search-tag-remove" data-field="' + safeField +
- '" style="font-size: 12px; margin-right:6px;display:inline-block;color:#fff;text-decoration:none;">&times;</a></span>';
+ var rawValue = (filters[f] || '').toString();
+ var map = labelRegistry[f] || null;
+ // A CSV of ids coming from the compact multi-select
+ // widget is split into one chip per term so the admin
+ // can remove individual selections without clearing
+ // the whole column filter. Plain-text filters
+ // (free-text, prefix-syntax, single values) stay in
+ // the single-chip shape with one × on the whole pill.
+ var parts = rawValue.split(',').map(function (v) { return v.trim(); }).filter(Boolean);
+ var isMultiTerm = parts.length > 1;
+ // Date-range shape: `start..end` (either side may
+ // be empty). Rendered as one chip "Field: start – end"
+ // with a single × on the whole pill, matching the
+ // single-term shape rather than the per-term
+ // multi-chip shape used for id CSVs.
+ var dateRangeMatch = rawValue.match(/^(\d{4}-\d{2}-\d{2})?\.\.(\d{4}-\d{2}-\d{2})?$/);
+ // Numeric-range shape: `gt:X`, `lt:Y`, or
+ // `gt:X,lt:Y`. Parsed with the same intent as the
+ // backend matcher, rendered as "Field: > X, < Y"
+ // (comma-separated when both halves present).
+ var numericGt = null;
+ var numericLt = null;
+ rawValue.split(',').forEach(function (p) {
+ var gm = p.trim().match(/^gt:(-?\d+(\.\d+)?)$/);
+ var lm = p.trim().match(/^lt:(-?\d+(\.\d+)?)$/);
+ if (gm) { numericGt = gm[1]; }
+ else if (lm) { numericLt = lm[1]; }
+ });
+ var isNumericRange = numericGt !== null || numericLt !== null;
+ // Boolean shape: field is declared as a boolean
+ // in the per-table field-type registry populated
+ // by the advanced-filters component. The raw
+ // value is normalized to a yes/no display label
+ // instead of the "1"/"0" that gets sent on the
+ // wire.
+ var fieldTypes = (window.snipeAdvancedFilterFieldTypes || {})[this.options.idTable] || {};
+ var isBoolean = fieldTypes[f] === 'boolean';
+
+ if (isBoolean) {
+ var boolDisplay = /^(1|true|yes)$/i.test(rawValue) ? advancedSearchYesText : advancedSearchNoText;
+ html += '<span class="label label-primary" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;"><b>' +
+ safeLabel + ':</b> ' + escapeAdvancedSearchValue(boolDisplay) +
+ ' <a href="javascript:void(0)" class="snipe-advanced-search-tag-remove" data-field="' + safeField +
+ '" style="font-size: 12px; margin-right:6px;display:inline-block;color:#fff;text-decoration:none;">&times;</a></span>';
+ } else if (isNumericRange) {
+ var numericBits = [];
+ if (numericGt !== null) { numericBits.push('> ' + numericGt); }
+ if (numericLt !== null) { numericBits.push('< ' + numericLt); }
+ html += '<span class="label label-primary" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;"><b>' +
+ safeLabel + ':</b> ' + escapeAdvancedSearchValue(numericBits.join(', ')) +
+ ' <a href="javascript:void(0)" class="snipe-advanced-search-tag-remove" data-field="' + safeField +
+ '" style="font-size: 12px; margin-right:6px;display:inline-block;color:#fff;text-decoration:none;">&times;</a></span>';
+ } else if (dateRangeMatch) {
+ var startDate = dateRangeMatch[1] || '…';
+ var endDate = dateRangeMatch[2] || '…';
+ var dateRangeDisplay = startDate + ' – ' + endDate;
+ html += '<span class="label label-primary" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;"><b>' +
+ safeLabel + ':</b> ' + escapeAdvancedSearchValue(dateRangeDisplay) +
+ ' <a href="javascript:void(0)" class="snipe-advanced-search-tag-remove" data-field="' + safeField +
+ '" style="font-size: 12px; margin-right:6px;display:inline-block;color:#fff;text-decoration:none;">&times;</a></span>';
+ } else if (isMultiTerm) {
+ var inner = '<span style="font-size:12px;font-weight:bold;margin-right:4px;align-self:center;">' + safeLabel + ':</span>';
+ parts.forEach(function (id) {
+ var termLabel = (map && map[id]) ? map[id] : id;
+ var safeTermText = escapeAdvancedSearchValue(termLabel);
+ var safeTermIdAttr = escapeAdvancedSearchAttr(id);
+ inner += '<span class="label label-primary" style="font-size:12px;font-weight:normal;margin:2px;padding:3px 6px;display:inline-flex;align-items:center;">' +
+ safeTermText +
+ ' <a href="javascript:void(0)" class="snipe-advanced-search-term-remove" data-field="' + safeField + '" data-term-id="' + safeTermIdAttr + '" style="color:#fff;text-decoration:none;margin-left:6px;">&times;</a>' +
+ '</span>';
+ });
+ html += '<span style="display:inline-flex;flex-wrap:wrap;align-items:center;max-width:90vw;margin-right:12px;margin-bottom:6px;">' + inner + '</span>';
+ } else {
+ var displayValue = resolveFilterLabel(f, filters[f]);
+ html += '<span class="label label-primary" style="font-size: 12px; margin-right:6px;display:inline-block;margin-bottom:6px; padding: 4px;"><b>' +
+ safeLabel + ':</b> ' + escapeAdvancedSearchValue(displayValue) +
+ ' <a href="javascript:void(0)" class="snipe-advanced-search-tag-remove" data-field="' + safeField +
+ '" style="font-size: 12px; margin-right:6px;display:inline-block;color:#fff;text-decoration:none;">&times;</a></span>';
+ }
});
// "Clear all" pill: same shortcut as opening the modal and hitting
@@ -343,6 +441,33 @@
_this.renderAdvancedSearchTags();
}
})
+ .on('click.snipeAdvancedSearchTags', '.snipe-advanced-search-term-remove', function (e) {
+ // Per-term × on multi-id filters. Removes the one
+ // clicked id from the CSV, leaves the rest of the
+ // column's filter intact. When the removal
+ // empties the column, the whole key is dropped
+ // from filterColumnsPartial so the pill goes
+ // away cleanly rather than lingering as an empty
+ // filter.
+ e.preventDefault();
+ var field = $(this).data('field');
+ var termId = String($(this).data('term-id'));
+ if (!field || !_this.filterColumnsPartial) { return; }
+ var currentCsv = (_this.filterColumnsPartial[field] || '').toString();
+ var remaining = currentCsv.split(',')
+ .map(function (v) { return v.trim(); })
+ .filter(function (v) { return v !== '' && v !== termId; });
+ if (remaining.length === 0) {
+ delete _this.filterColumnsPartial[field];
+ } else {
+ _this.filterColumnsPartial[field] = remaining.join(',');
+ }
+ _this.options.pageNumber = 1;
+ _this.initSearch();
+ _this.updatePagination();
+ _this.trigger('column-advanced-search', _this.filterColumnsPartial, _this.getAdvancedSearchOperator());
+ _this.renderAdvancedSearchTags();
+ })
.on('click.snipeAdvancedSearchTags', '.snipe-advanced-search-tags-clear-all', function (e) {
e.preventDefault();
// Reuse cancelAdvancedSearch: it already wipes filterColumnsPartial,
@@ -411,11 +536,13 @@
html.push(`
<div class="form-group row">
<label class="col-sm-4 control-label">${this.options.formatAdvancedSearchOperator()}</label>
- <div class="col-sm-6">
- <select class="form-control ${this.constants.classes.input}" name="__advanced_search_operator">
- <option value="and"${operator === 'and' ? ' selected' : ''}>${advancedSearchAndText}</option>
- <option value="or"${operator === 'or' ? ' selected' : ''}>${advancedSearchOrText}</option>
- </select>
+ <div class="col-sm-6" style="padding-top:7px;">
+ <label class="radio-inline" style="margin-right:16px;vertical-align:middle;">
+ <input type="radio" name="__advanced_search_operator" value="and" style="vertical-align:middle;"${operator === 'and' ? ' checked' : ''}>&nbsp;&nbsp;<span style="vertical-align:middle;">${advancedSearchAndText}</span>
+ </label>
+ <label class="radio-inline" style="vertical-align:middle;">
+ <input type="radio" name="__advanced_search_operator" value="or" style="vertical-align:middle;"${operator === 'or' ? ' checked' : ''}>&nbsp;&nbsp;<span style="vertical-align:middle;">${advancedSearchOrText}</span>
+ </label>
</div>
</div>
`);
diff --git a/resources/views/statuslabels/index.blade.php b/resources/views/statuslabels/index.blade.php
index fb0835bf93..53db16b3b5 100755
--- a/resources/views/statuslabels/index.blade.php
+++ b/resources/views/statuslabels/index.blade.php
@@ -24,6 +24,7 @@
buttons="statuslabelButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.statuslabels.index') }}"
:presenter="\App\Presenters\StatusLabelPresenter::dataTableLayout()"
export_filename="export-statuslabels-{{ date('Y-m-d') }}"
@@ -62,6 +63,11 @@
@section('moar_scripts')
@include ('partials.bootstrap-table')
+<x-table.advanced-search
+ tableId="statuslabelListingTable"
+ :model="\App\Models\Statuslabel::class"
+/>
+
<script nonce="{{ csrf_token() }}">
diff --git a/resources/views/suppliers/index.blade.php b/resources/views/suppliers/index.blade.php
index 5734a53c63..212480561a 100755
--- a/resources/views/suppliers/index.blade.php
+++ b/resources/views/suppliers/index.blade.php
@@ -23,6 +23,7 @@
buttons="supplierButtons"
fixed_right_number="1"
fixed_number="1"
+ show_advanced_search="true"
api_url="{{ route('api.suppliers.index') }}"
:presenter="\App\Presenters\SupplierPresenter::dataTableLayout()"
export_filename="export-suppliers-{{ date('Y-m-d') }}"
@@ -35,4 +36,9 @@
@section('moar_scripts')
@include ('partials.bootstrap-table', ['exportFile' => 'suppliers-export', 'search' => true])
+
+<x-table.advanced-search
+ tableId="supplierListingTable"
+ :model="\App\Models\Supplier::class"
+/>
@stop
diff --git a/resources/views/users/index.blade.php b/resources/views/users/index.blade.php
index 6f21047ef3..bd53449489 100755
--- a/resources/views/users/index.blade.php
+++ b/resources/views/users/index.blade.php
@@ -30,7 +30,7 @@
@section('content')
<x-container>
<x-box name="users" sr_only_title>
- <x-table.users :route="route('api.users.index',
+ <x-table.users name="users" :route="route('api.users.index',
[
'status' => is_scalar(request('status')) ? request('status') : null,
'deleted'=> (request('status')=='deleted') ? 'true' : 'false',
@@ -53,4 +53,9 @@
@include ('partials.bootstrap-table')
+ <x-table.advanced-search
+ tableId="usersListingTable"
+ :model="\App\Models\User::class"
+ />
+
@stop