diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index da6df67548b5..acf6e638d34c 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -74,20 +74,9 @@ public function index(Request $request): View ->orderBy('name') ->get();*/ - $predefined_filter_edit_modal_open = $request->input('predefinedFilterEditModalOpen'); + // $predefined_filter_edit_modal_open = $request->input('predefinedFilterEditModalOpen'); $predefined_filter_id = $request->input('predefinedFilterId'); - if ($predefined_filter_edit_modal_open === null) { - $predefined_filter_edit_modal_open = false; - } - - if ($predefined_filter_edit_modal_open !== 'true' && $predefined_filter_edit_modal_open !== 'false' && $predefined_filter_edit_modal_open != null) { - throw new InvalidArgumentException("You provided an invalid parameter for predefinedFilterModalOpen (must be true or false)."); - } else { - // Convert string to boolean - $predefined_filter_edit_modal_open = $predefined_filter_edit_modal_open == 'true' ? true : false; - } - // Validate if it's a valid integer if (filter_var($predefined_filter_id, FILTER_VALIDATE_INT) === false && $predefined_filter_id != null) { throw new InvalidArgumentException('You provided an invalid parameter for predefinedFilterId (must be an integer).'); @@ -101,7 +90,7 @@ public function index(Request $request): View // TODO maybe switch later to user / role based view - return view('hardware/index')->with('company', $company)->with('predefined_filter_edit_modal_open', $predefined_filter_edit_modal_open)->with('predefined_filter_id', $predefined_filter_id); + return view('hardware/index')->with('company', $company)/*->with('predefined_filter_edit_modal_open', $predefined_filter_edit_modal_open)*/->with('predefined_filter_id', $predefined_filter_id); } /** diff --git a/public/css/dist/filterInputs.css b/public/css/dist/filterInputs.css index 54f6f9aff1bc..c402c40a23b0 100644 --- a/public/css/dist/filterInputs.css +++ b/public/css/dist/filterInputs.css @@ -351,6 +351,11 @@ When .hide is applied, the filter section is hidden. box-sizing: border-box; } +.select2-container--open { + width: unset; + box-sizing: border-box; +} + .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { height: 38px; diff --git a/public/css/dist/filterInputs.min.css b/public/css/dist/filterInputs.min.css index db56b8c3f5cd..1e209fd5fff5 100644 --- a/public/css/dist/filterInputs.min.css +++ b/public/css/dist/filterInputs.min.css @@ -1 +1 @@ -.responsive-layout{display:flex;flex-wrap:wrap;width:100%}.filter-section{transition:all .3s ease}.filter-section.hide{display:none!important}.advancedSearchWrapper{width:100%;padding:0 15px}.advancedSearchGridContainer{display:flex;flex-direction:column;gap:20px}.advancedSearchItemContainer{display:flex;flex-direction:column;gap:8px}.filterFieldName{font-weight:600;font-size:14px;margin:0;color:#333}.filter-controls-row{display:flex;gap:0;width:100%}.filter-option{flex:0 0 60px;min-width:35px;max-width:42px;height:38px;padding:0 2px;font-size:13px;border:1px solid #ced4da;border-top-right-radius:0;border-bottom-right-radius:0;background-color:#fff;border-right:none}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField,.select2-container{flex:1;height:38px;font-size:13px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;background-color:#fff}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField{padding:6px 10px}.select2-container{width:auto;max-width:width;box-sizing:border-box}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--single{height:38px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px;padding-left:10px}.advancedSearch_defaultField:focus,.filter-option:focus,.form-control:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.select2-container--default .select2-selection:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.input-daterange{display:flex;align-items:center;flex:1}.input-daterange .form-control{border-radius:0;border-left:none}.input-daterange .form-control:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-daterange .form-control:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.input-group-addon{display:flex;align-items:center;justify-content:center;padding:11px}.filter-option{-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width:768px){.filter-section{flex:0 0 25%;max-width:25%;padding-right:15px}.table-section{flex:0 0 75%;max-width:75%}.filter-section.hide+.table-section{flex:0 0 100%;max-width:100%}}@media (max-width:767px){.filter-section{width:100%;margin-bottom:15px}.table-section{width:100%}.filter-option{flex:0 0 120px;min-width:120px}}.select2-container,.select2-container .select2-selection--multiple,.select2-container .select2-selection--single{transition:height .2s ease,min-height .2s ease,max-height .2s ease}.select2-container--open .select2-selection--multiple{overflow-y:auto!important}.select2-selection--multiple::-webkit-scrollbar{width:8px}.select2-selection--multiple::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb:hover{background:#555}.responsive-layout{display:flex;flex-wrap:wrap;width:100%}.filter-section{transition:all .3s ease}.filter-section.hide{display:none!important}.advancedSearchWrapper{width:100%;padding:0 15px}.advancedSearchGridContainer{display:flex;flex-direction:column;gap:20px}.advancedSearchItemContainer{display:flex;flex-direction:column;gap:8px}.filterFieldName{font-weight:600;font-size:14px;margin:0;color:#333}.filter-controls-row{display:flex;gap:0;width:100%}.filter-option{flex:0 0 60px;min-width:35px;max-width:42px;height:38px;padding:0 2px;font-size:13px;border:1px solid #ced4da;border-top-right-radius:0;border-bottom-right-radius:0;background-color:#fff;border-right:none}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField,.select2-container{flex:1;height:38px;font-size:13px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;background-color:#fff}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField{padding:6px 10px}.select2-container{min-width:0;width:100%;box-sizing:border-box}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--single{height:38px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px;padding-left:10px}.advancedSearch_defaultField:focus,.filter-option:focus,.form-control:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.select2-container--default .select2-selection:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.input-daterange{display:flex;align-items:center;flex:1}.input-daterange .form-control{border-radius:0;border-left:none}.input-daterange .form-control:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-daterange .form-control:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.filter-option{-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width:768px){.filter-section{flex:0 0 25%;max-width:25%;padding-right:15px}.table-section{flex:0 0 75%;max-width:75%}.filter-section.hide+.table-section{flex:0 0 100%;max-width:100%}}@media (max-width:767px){.filter-section{width:100%;margin-bottom:15px}.table-section{width:100%}.filter-option{flex:0 0 120px;min-width:120px}}.select2-container,.select2-container .select2-selection--multiple,.select2-container .select2-selection--single{transition:height .2s ease,min-height .2s ease,max-height .2s ease}.select2-container--open .select2-selection--multiple{overflow-y:auto!important}.select2-selection--multiple::-webkit-scrollbar{width:8px}.select2-selection--multiple::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb:hover{background:#555} +.responsive-layout{display:flex;flex-wrap:wrap;width:100%}.filter-section{transition:all .3s ease}.filter-section.hide{display:none!important}.advancedSearchWrapper{width:100%;padding:0 15px}.advancedSearchGridContainer{display:flex;flex-direction:column;gap:20px}.advancedSearchItemContainer{display:flex;flex-direction:column;gap:8px}.filterFieldName{font-weight:600;font-size:14px;margin:0;color:#333}.filter-controls-row{display:flex;gap:0;width:100%}.filter-option{flex:0 0 60px;min-width:35px;max-width:42px;height:38px;padding:0 2px;font-size:13px;border:1px solid #ced4da;border-top-right-radius:0;border-bottom-right-radius:0;background-color:#fff;border-right:none}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField,.select2-container{flex:1;height:38px;font-size:13px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;background-color:#fff}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField{padding:6px 10px}.select2-container{width:auto;max-width:width;box-sizing:border-box}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--single{height:38px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px;padding-left:10px}.advancedSearch_defaultField:focus,.filter-option:focus,.form-control:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.select2-container--default .select2-selection:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.input-daterange{display:flex;align-items:center;flex:1}.input-daterange .form-control{border-radius:0;border-left:none}.input-daterange .form-control:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-daterange .form-control:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.input-group-addon{display:flex;align-items:center;justify-content:center;padding:11px}.filter-option{-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width:768px){.filter-section{flex:0 0 25%;max-width:25%;padding-right:15px}.table-section{flex:0 0 75%;max-width:75%}.filter-section.hide+.table-section{flex:0 0 100%;max-width:100%}}@media (max-width:767px){.filter-section{width:100%;margin-bottom:15px}.table-section{width:100%}.filter-option{flex:0 0 120px;min-width:120px}}.select2-container,.select2-container .select2-selection--multiple,.select2-container .select2-selection--single{transition:height .2s ease,min-height .2s ease,max-height .2s ease}.select2-container--open .select2-selection--multiple{overflow-y:auto!important}.select2-selection--multiple::-webkit-scrollbar{width:8px}.select2-selection--multiple::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb:hover{background:#555}.responsive-layout{display:flex;flex-wrap:wrap;width:100%}.filter-section{transition:all .3s ease}.filter-section.hide{display:none!important}.advancedSearchWrapper{width:100%;padding:0 15px}.advancedSearchGridContainer{display:flex;flex-direction:column;gap:20px}.advancedSearchItemContainer{display:flex;flex-direction:column;gap:8px}.filterFieldName{font-weight:600;font-size:14px;margin:0;color:#333}.filter-controls-row{display:flex;gap:0;width:100%}.filter-option{flex:0 0 60px;min-width:35px;max-width:42px;height:38px;padding:0 2px;font-size:13px;border:1px solid #ced4da;border-top-right-radius:0;border-bottom-right-radius:0;background-color:#fff;border-right:none}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField,.select2-container{flex:1;height:38px;font-size:13px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;background-color:#fff}.advancedSearchGridContainer .form-control:not(.filter-option),.advancedSearch_defaultField{padding:6px 10px}.select2-container{min-width:0;width:100%;box-sizing:border-box}.select2-container--open{width:unset;box-sizing:border-box}.select2-container--default .select2-selection--multiple,.select2-container--default .select2-selection--single{height:38px;border:1px solid #ced4da;border-top-left-radius:0;border-bottom-left-radius:0;border-left:none}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px;padding-left:10px}.advancedSearch_defaultField:focus,.filter-option:focus,.form-control:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.select2-container--default .select2-selection:focus{border-color:#6c63ff;box-shadow:0 0 0 2px rgba(108,99,255,.08);outline:0}.input-daterange{display:flex;align-items:center;flex:1}.input-daterange .form-control{border-radius:0;border-left:none}.input-daterange .form-control:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-daterange .form-control:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.filter-option{-moz-appearance:none;-webkit-appearance:none;appearance:none}@media (min-width:768px){.filter-section{flex:0 0 25%;max-width:25%;padding-right:15px}.table-section{flex:0 0 75%;max-width:75%}.filter-section.hide+.table-section{flex:0 0 100%;max-width:100%}}@media (max-width:767px){.filter-section{width:100%;margin-bottom:15px}.table-section{width:100%}.filter-option{flex:0 0 120px;min-width:120px}}.select2-container,.select2-container .select2-selection--multiple,.select2-container .select2-selection--single{transition:height .2s ease,min-height .2s ease,max-height .2s ease}.select2-container--open .select2-selection--multiple{overflow-y:auto!important}.select2-selection--multiple::-webkit-scrollbar{width:8px}.select2-selection--multiple::-webkit-scrollbar-track{background:#f1f1f1;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb{background:#888;border-radius:4px}.select2-selection--multiple::-webkit-scrollbar-thumb:hover{background:#555} diff --git a/public/mix-manifest.json b/public/mix-manifest.json index b9d5d6952b81..b5c786e6e09b 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -30,8 +30,8 @@ "/css/dist/advanced-search.min.css": "/css/dist/advanced-search.min.css?id=846d2d828b410c91df95f08ce79a559e", "/css/dist/modal.css": "/css/dist/modal.css?id=045d727d9781c6a4601f8ae42cb9293a", "/css/dist/modal.min.css": "/css/dist/modal.min.css?id=045d727d9781c6a4601f8ae42cb9293a", - "/css/dist/filterInputs.css": "/css/dist/filterInputs.css?id=85d46ad07a9408b1b0a412442381ef06", - "/css/dist/filterInputs.min.css": "/css/dist/filterInputs.min.css?id=85d46ad07a9408b1b0a412442381ef06", + "/css/dist/filterInputs.css": "/css/dist/filterInputs.css?id=77481e21024ee57b4d9f0303209f6bbd", + "/css/dist/filterInputs.min.css": "/css/dist/filterInputs.min.css?id=77481e21024ee57b4d9f0303209f6bbd", "/js/dist/floating-buttons.js": "/js/dist/floating-buttons.js?id=bcf2eb7dff9114ea5a5487b6db001931", "/js/dist/floating-buttons.min.js": "/js/dist/floating-buttons.min.js?id=bcf2eb7dff9114ea5a5487b6db001931", "/js/dist/apiService.js": "/js/dist/apiService.js?id=4e838fdc8aaf6a0de54c69b1b84f9669", diff --git a/resources/assets/css/components/advancedSearch/filterInputs.css b/resources/assets/css/components/advancedSearch/filterInputs.css index 54f6f9aff1bc..c402c40a23b0 100644 --- a/resources/assets/css/components/advancedSearch/filterInputs.css +++ b/resources/assets/css/components/advancedSearch/filterInputs.css @@ -351,6 +351,11 @@ When .hide is applied, the filter section is hidden. box-sizing: border-box; } +.select2-container--open { + width: unset; + box-sizing: border-box; +} + .select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { height: 38px; diff --git a/resources/views/hardware/index.blade.php b/resources/views/hardware/index.blade.php index f23673718f20..3c704e9e970b 100755 --- a/resources/views/hardware/index.blade.php +++ b/resources/views/hardware/index.blade.php @@ -41,7 +41,6 @@
diff --git a/resources/views/partials/advanced-search/advanced-search.blade.php b/resources/views/partials/advanced-search/advanced-search.blade.php index 9e64f6d8b866..cfe840a79e1a 100644 --- a/resources/views/partials/advanced-search/advanced-search.blade.php +++ b/resources/views/partials/advanced-search/advanced-search.blade.php @@ -76,17 +76,6 @@ controller.bindEvents(); - (async () => { - setTimeout(async () => { - const filterSection = document.getElementById('filterSection'); - filterSection.classList.remove('hide'); - container.resolve("filterFormManager").clearAll(); - - await new Promise(resolve => setTimeout(resolve, 0)); - filterSection.classList.add('hide'); - }, 0); - })(); - @if(isset($predefined_filter_id)) controller.updateFilterWithPredefined(null, {{ $predefined_filter_id }}); @@ -103,6 +92,17 @@ }); }); @endif + @else + (async () => { + setTimeout(async () => { + const filterSection = document.getElementById('filterSection'); + filterSection.classList.remove('hide'); + container.resolve("filterFormManager").clearAll(); + + await new Promise(resolve => setTimeout(resolve, 0)); + filterSection.classList.add('hide'); + }, 0); + })(); @endif }); diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index ef514b3b7fd0..35a1801c8ad0 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -1464,7 +1464,7 @@ function assetSerialLinkFormatter(value, row) { // this Links to '/hardware' with the filter id function predefinedFiltersLinkFormatter(value, row){ if (value && row.id){ - return `${value}`; + return `${value}`; } }