Skip to content

Commit 29586c9

Browse files
authored
Merge pull request #100 from imbus/refactor-js-build
Refactor js build - part 1
2 parents 43117af + fcd6380 commit 29586c9

26 files changed

+617
-407
lines changed

app/Http/Controllers/Assets/AssetsController.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ public function index(Request $request): View
6868
{
6969
$this->authorize('index', Asset::class);
7070
$company = Company::find($request->input('company_id'));
71-
// $predefined_filters = PredefinedFilter::Auth();
72-
// $predefined_filters = PredefinedFilter::orderBy('name')->get();
73-
/*$predefined_filters = PredefinedFilter::where('created_by', auth()->user()->id)
74-
->orderBy('name')
75-
->get();*/
7671

77-
// $predefined_filter_edit_modal_open = $request->input('predefinedFilterEditModalOpen');
7872
$predefined_filter_id = $request->input('predefinedFilterId');
7973

8074
// Validate if it's a valid integer
@@ -93,8 +87,7 @@ public function index(Request $request): View
9387
}
9488
}
9589

96-
// TODO maybe switch later to user / role based view
97-
return view('hardware/index')->with('company', $company)/*->with('predefined_filter_edit_modal_open', $predefined_filter_edit_modal_open)*/
90+
return view('hardware/index')->with('company', $company)
9891
->with('predefined_filter_id', $predefined_filter_id)
9992
->with('predefined_filter_name', $predefined_filter_name);
10093
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
Layout container for the whole page.
3+
Uses flexbox so the filter and table sections can sit side by side on desktop, and stack on mobile.
4+
*/
5+
.responsive-layout {
6+
display: flex;
7+
flex-wrap: wrap;
8+
width: 100%;
9+
}
10+
11+
/*
12+
The filter (sidebar) section.
13+
Transition allows smooth showing/hiding.
14+
*/
15+
.filter-section {
16+
transition: all 0.3s ease;
17+
}
18+
19+
/*
20+
When .hide is applied, the filter section is hidden.
21+
!important ensures it's forced, even if overridden by other classes.
22+
*/
23+
.filter-section.hide {
24+
display: none !important;
25+
}
26+
27+
/* ---------- DESKTOP Styles (screen ≥ 768px) ---------- */
28+
@media (min-width: 768px) {
29+
30+
/*
31+
Filter sidebar gets 25% width, and some space on the right.
32+
*/
33+
.filter-section {
34+
flex: 0 0 25%;
35+
max-width: 25%;
36+
padding-right: 15px;
37+
}
38+
39+
/*
40+
Main table takes the remaining 75%.
41+
*/
42+
.table-section {
43+
flex: 0 0 75%;
44+
max-width: 75%;
45+
}
46+
47+
/*
48+
If filter is hidden, the table takes full width.
49+
*/
50+
.filter-section.hide+.table-section {
51+
flex: 0 0 100%;
52+
max-width: 100%;
53+
}
54+
}
55+
56+
/* ---------- MOBILE Styles (screen < 768px) ---------- */
57+
@media (max-width: 767px) {
58+
59+
/*
60+
Filter takes full width, and sits above the table section.
61+
*/
62+
.filter-section {
63+
width: 100%;
64+
margin-bottom: 15px;
65+
}
66+
67+
.table-section {
68+
width: 100%;
69+
}
70+
}

public/css/dist/advanced-search-index.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/dist/advanced-search-index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/dist/advanced-search-index.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/js/dist/advanced-search.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)