Skip to content

Commit 6f97a40

Browse files
committed
Merge remote-tracking branch 'origin/develop'
# Conflicts: # public/css/build/app.css # public/css/build/app.css.map # public/css/build/overrides.css # public/css/build/overrides.css.map # public/css/dist/all.css # public/js/dist/all.js # public/js/dist/all.js.map # public/mix-manifest.json
2 parents 6077813 + c56c7dd commit 6f97a40

File tree

88 files changed

+888
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+888
-240
lines changed

app/Http/Controllers/Api/CategoriesController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function index(Request $request) : array
4343
'created_at',
4444
'updated_at',
4545
'image',
46+
'tag_color',
4647
'notes',
4748
];
4849

@@ -57,6 +58,7 @@ public function index(Request $request) : array
5758
'require_acceptance',
5859
'checkin_email',
5960
'image',
61+
'tag_color',
6062
'notes',
6163
])
6264
->with('adminuser')

app/Http/Controllers/Api/CompaniesController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function index(Request $request) : JsonResponse | array
3838
'accessories_count',
3939
'consumables_count',
4040
'components_count',
41+
'tag_color',
4142
'notes',
4243
];
4344

@@ -64,6 +65,11 @@ public function index(Request $request) : JsonResponse | array
6465
$companies->where('created_by', '=', $request->input('created_by'));
6566
}
6667

68+
if ($request->filled('tag_color')) {
69+
$companies->where('tag_color', '=', $request->input('tag_color'));
70+
}
71+
72+
6773

6874
// Make sure the offset and limit are actually integers and do not exceed system limits
6975
$offset = ($request->input('offset') > $companies->count()) ? $companies->count() : app('api_offset_value');
@@ -191,6 +197,7 @@ public function selectlist(Request $request) : array
191197
'companies.name',
192198
'companies.email',
193199
'companies.image',
200+
'companies.tag_color',
194201
]);
195202

196203

app/Http/Controllers/Api/DepartmentsController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DepartmentsController extends Controller
2424
public function index(Request $request) : JsonResponse | array
2525
{
2626
$this->authorize('view', Department::class);
27-
$allowed_columns = ['id', 'name', 'image', 'users_count', 'notes'];
27+
$allowed_columns = ['id', 'name', 'image', 'users_count', 'notes', 'tag_color'];
2828

2929
$departments = Department::select(
3030
[
@@ -38,6 +38,7 @@ public function index(Request $request) : JsonResponse | array
3838
'departments.created_at',
3939
'departments.updated_at',
4040
'departments.image',
41+
'departments.tag_color',
4142
'departments.notes'
4243
])->with('users')->with('location')->with('manager')->with('company')->withCount('users as users_count');
4344

@@ -61,6 +62,10 @@ public function index(Request $request) : JsonResponse | array
6162
$departments->where('location_id', '=', $request->input('location_id'));
6263
}
6364

65+
if ($request->filled('tag_color')) {
66+
$departments->where('tag_color', '=', $request->input('departments.tag_color'));
67+
}
68+
6469
// Make sure the offset and limit are actually integers and do not exceed system limits
6570
$offset = ($request->input('offset') > $departments->count()) ? $departments->count() : app('api_offset_value');
6671
$limit = app('api_limit_value');
@@ -186,6 +191,7 @@ public function selectlist(Request $request) : array
186191
'id',
187192
'name',
188193
'image',
194+
'tag_color',
189195
]);
190196

191197
if ($request->filled('search')) {

app/Http/Controllers/Api/LocationsController.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function index(Request $request) : JsonResponse | array
5959
'state',
6060
'updated_at',
6161
'zip',
62+
'tag_color',
6263
'notes',
6364
];
6465

@@ -81,6 +82,8 @@ public function index(Request $request) : JsonResponse | array
8182
'locations.ldap_ou',
8283
'locations.currency',
8384
'locations.company_id',
85+
'locations.tag_color',
86+
'locations.tag_color',
8487
'locations.notes',
8588
'locations.created_by',
8689
'locations.deleted_at',
@@ -145,6 +148,10 @@ public function index(Request $request) : JsonResponse | array
145148
$locations->onlyTrashed();
146149
}
147150

151+
if ($request->filled('tag_color')) {
152+
$locations->where('tag_color', '=', $request->input('locations.tag_color'));
153+
}
154+
148155
// Make sure the offset and limit are actually integers and do not exceed system limits
149156
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : app('api_offset_value');
150157
$limit = app('api_limit_value');
@@ -402,6 +409,7 @@ public function selectlist(Request $request) : array
402409
'locations.name',
403410
'locations.parent_id',
404411
'locations.image',
412+
'locations.tag_color',
405413
]);
406414

407415
// Only scope locations if the setting is enabled

app/Http/Controllers/Api/ManufacturersController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function index(Request $request) : JsonResponse | array
4747
'consumables_count',
4848
'components_count',
4949
'licenses_count',
50+
'tag_color',
5051
'notes',
5152
];
5253

@@ -63,6 +64,7 @@ public function index(Request $request) : JsonResponse | array
6364
'updated_at',
6465
'image',
6566
'deleted_at',
67+
'tag_color',
6668
'notes',
6769
])
6870
->with('adminuser')
@@ -104,6 +106,10 @@ public function index(Request $request) : JsonResponse | array
104106
$manufacturers->where('support_email', '=', $request->input('support_email'));
105107
}
106108

109+
if ($request->filled('tag_color')) {
110+
$manufacturers->where('tag_color', '=', $request->input('manufacturers.tag_color'));
111+
}
112+
107113
// Make sure the offset and limit are actually integers and do not exceed system limits
108114
$offset = ($request->input('offset') > $manufacturers->count()) ? $manufacturers->count() : app('api_offset_value');
109115
$limit = app('api_limit_value');
@@ -258,6 +264,7 @@ public function selectlist(Request $request) : array
258264
'id',
259265
'name',
260266
'image',
267+
'tag_color',
261268
]);
262269

263270
if ($request->filled('search')) {

app/Http/Controllers/Api/SuppliersController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ public function index(Request $request): array
5050
'accessories_count',
5151
'components_count',
5252
'consumables_count',
53+
'tag_color',
5354
'url',
5455
'notes',
5556
];
5657

5758
$suppliers = Supplier::select(
58-
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'created_by', 'updated_at', 'deleted_at', 'image', 'notes', 'url', 'zip'])
59+
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'created_by', 'updated_at', 'deleted_at', 'image', 'notes', 'url', 'zip', 'tag_color'])
5960
->withCount('assets as assets_count')
6061
->withCount('licenses as licenses_count')
6162
->withCount('accessories as accessories_count')
@@ -251,6 +252,7 @@ public function selectlist(Request $request) : array
251252
'id',
252253
'name',
253254
'image',
255+
'tag_color',
254256
]);
255257

256258
if ($request->filled('search')) {

app/Http/Controllers/CategoriesController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public function store(ImageUploadRequest $request) : RedirectResponse
7878
$category->require_acceptance = $request->input('require_acceptance', '0');
7979
$category->alert_on_response = $request->input('alert_on_response', '0');
8080
$category->checkin_email = $request->input('checkin_email', '0');
81+
$category->tag_color = $request->input('tag_color');
8182
$category->notes = $request->input('notes');
8283
$category->created_by = auth()->id();
8384

@@ -132,6 +133,7 @@ public function update(ImageUploadRequest $request, Category $category) : Redire
132133
$category->require_acceptance = $request->input('require_acceptance', '0');
133134
$category->alert_on_response = $request->input('alert_on_response', '0');
134135
$category->checkin_email = $request->input('checkin_email', '0');
136+
$category->tag_color = $request->input('tag_color');
135137
$category->notes = $request->input('notes');
136138

137139
$category = $request->handleImages($category);

app/Http/Controllers/CompaniesController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function store(ImageUploadRequest $request) : RedirectResponse
6060
$company->phone = $request->input('phone');
6161
$company->fax = $request->input('fax');
6262
$company->email = $request->input('email');
63+
$company->tag_color = $request->input('tag_color');
6364
$company->notes = $request->input('notes');
6465
$company->created_by = auth()->id();
6566

@@ -102,6 +103,7 @@ public function update(ImageUploadRequest $request, Company $company) : Redirect
102103
$company->phone = $request->input('phone');
103104
$company->fax = $request->input('fax');
104105
$company->email = $request->input('email');
106+
$company->tag_color = $request->input('tag_color');
105107
$company->notes = $request->input('notes');
106108

107109
$company = $request->handleImages($company);

app/Http/Controllers/DepartmentsController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function store(ImageUploadRequest $request) : RedirectResponse
5555
$department->manager_id = ($request->filled('manager_id') ? $request->input('manager_id') : null);
5656
$department->location_id = ($request->filled('location_id') ? $request->input('location_id') : null);
5757
$department->company_id = ($request->filled('company_id') ? $request->input('company_id') : null);
58+
$department->tag_color = $request->input('tag_color');
5859
$department->notes = $request->input('notes');
5960
$department = $request->handleImages($department);
6061

@@ -157,6 +158,7 @@ public function update(ImageUploadRequest $request, Department $department) : Re
157158
$department->company_id = ($request->filled('company_id') ? $request->input('company_id') : null);
158159
$department->phone = $request->input('phone');
159160
$department->fax = $request->input('fax');
161+
$department->tag_color = $request->input('tag_color');
160162
$department->notes = $request->input('notes');
161163
$department = $request->handleImages($department);
162164

app/Http/Controllers/LocationsController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function store(ImageUploadRequest $request) : RedirectResponse
8282
$location->created_by = auth()->id();
8383
$location->phone = request('phone');
8484
$location->fax = request('fax');
85+
$location->tag_color = $request->input('tag_color');
8586
$location->notes = $request->input('notes');
8687
$location->company_id = Company::getIdForCurrentUser($request->input('company_id'));
8788

@@ -156,6 +157,7 @@ public function update(ImageUploadRequest $request, Location $location) : Redire
156157
$location->fax = request('fax');
157158
$location->ldap_ou = $request->input('ldap_ou');
158159
$location->manager_id = $request->input('manager_id');
160+
$location->tag_color = $request->input('tag_color');
159161
$location->notes = $request->input('notes');
160162

161163
// Only scope the location if the setting is enabled

0 commit comments

Comments
 (0)