| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | @extends('layout.default') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | @section('title', $__t('Products')) | 
					
						
							| 
									
										
										
										
											2018-04-12 21:13:38 +02:00
										 |  |  | @section('activeNav', 'products') | 
					
						
							|  |  |  | @section('viewJsName', 'products') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | @section('content') | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							|  |  |  | 		<h1> | 
					
						
							|  |  |  | 			@yield('title') | 
					
						
							|  |  |  | 			<a class="btn btn-outline-dark" href="{{ $U('/product/new') }}"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 				<i class="fas fa-plus"></i> {{ $__t('Add') }} | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 			</a> | 
					
						
							| 
									
										
										
										
											2019-04-22 22:16:35 +02:00
										 |  |  | 			<a class="btn btn-outline-secondary" href="{{ $U('/userfields?entity=products') }}"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 				<i class="fas fa-sliders-h"></i> {{ $__t('Configure userfields') }} | 
					
						
							| 
									
										
										
										
											2019-04-22 22:16:35 +02:00
										 |  |  | 			</a> | 
					
						
							| 
									
										
										
										
											2018-11-21 19:08:36 +01:00
										 |  |  | 			<a class="btn btn-outline-secondary" href="{{ $U('/stocksettings#productpresets') }}"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 				<i class="fas fa-sliders-h"></i> {{ $__t('Presets for new products') }} | 
					
						
							| 
									
										
										
										
											2018-10-20 14:55:49 +02:00
										 |  |  | 			</a> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 		</h1> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | <div class="row mt-3"> | 
					
						
							| 
									
										
										
										
											2018-07-11 19:43:05 +02:00
										 |  |  | 	<div class="col-xs-12 col-md-6 col-xl-3"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 		<label for="search">{{ $__t('Search') }}</label> <i class="fas fa-search"></i> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 		<input type="text" class="form-control" id="search"> | 
					
						
							| 
									
										
										
										
											2018-07-09 19:27:22 +02:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2019-04-05 21:08:30 +02:00
										 |  |  | 	<div class="col-xs-12 col-md-6 col-xl-3"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 		<label for="location-filter">{{ $__t('Filter by product group') }}</label> <i class="fas fa-filter"></i> | 
					
						
							| 
									
										
										
										
											2019-04-05 21:08:30 +02:00
										 |  |  | 		<select class="form-control" id="product-group-filter"> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 			<option value="all">{{ $__t('All') }}</option> | 
					
						
							| 
									
										
										
										
											2019-04-05 21:08:30 +02:00
										 |  |  | 			@foreach($productGroups as $productGroup) | 
					
						
							|  |  |  | 				<option value="{{ $productGroup->id }}">{{ $productGroup->name }}</option> | 
					
						
							|  |  |  | 			@endforeach | 
					
						
							|  |  |  | 		</select> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2018-07-09 19:27:22 +02:00
										 |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							|  |  |  | 		<table id="products-table" class="table table-sm table-striped dt-responsive"> | 
					
						
							|  |  |  | 			<thead> | 
					
						
							|  |  |  | 				<tr> | 
					
						
							| 
									
										
										
										
											2019-03-09 10:49:26 +01:00
										 |  |  | 					<th class="border-right"></th> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Name') }}</th> | 
					
						
							| 
									
										
										
										
											2019-09-19 17:46:52 +02:00
										 |  |  | 					<th class="@if(!GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif">{{ $__t('Location') }}</th> | 
					
						
							| 
									
										
										
										
											2019-05-01 20:19:18 +02:00
										 |  |  | 					<th>{{ $__t('Min. stock amount') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('QU purchase') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('QU stock') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('QU factor') }}</th> | 
					
						
							|  |  |  | 					<th>{{ $__t('Product group') }}</th> | 
					
						
							| 
									
										
										
										
											2019-05-03 21:41:31 +02:00
										 |  |  | 					<th>{{ $__t('Barcode(s)') }}</th> | 
					
						
							| 
									
										
										
										
											2019-04-22 22:16:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.userfields_thead', array( | 
					
						
							|  |  |  | 						'userfields' => $userfields | 
					
						
							|  |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 			</thead> | 
					
						
							| 
									
										
										
										
											2019-01-05 20:06:35 +01:00
										 |  |  | 			<tbody class="d-none"> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 				@foreach($products as $product) | 
					
						
							|  |  |  | 				<tr> | 
					
						
							| 
									
										
										
										
											2019-03-09 10:49:26 +01:00
										 |  |  | 					<td class="fit-content border-right"> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 						<a class="btn btn-info btn-sm" href="{{ $U('/product/') }}{{ $product->id }}"> | 
					
						
							| 
									
										
										
										
											2018-07-11 19:43:05 +02:00
										 |  |  | 							<i class="fas fa-edit"></i> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 						</a> | 
					
						
							|  |  |  | 						<a class="btn btn-danger btn-sm product-delete-button" href="#" data-product-id="{{ $product->id }}" data-product-name="{{ $product->name }}"> | 
					
						
							| 
									
										
										
										
											2018-07-11 19:43:05 +02:00
										 |  |  | 							<i class="fas fa-trash"></i> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 						</a> | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2018-10-06 18:08:25 +02:00
										 |  |  | 						{{ $product->name }}@if(!empty($product->picture_file_name)) <i class="fas fa-image text-muted"></i>@endif | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-09-19 17:46:52 +02:00
										 |  |  | 					<td class="@if(!GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING) d-none @endif"> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 						{{ FindObjectInArrayByPropertyValue($locations, 'id', $product->location_id)->name }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							|  |  |  | 						{{ $product->min_stock_amount }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							|  |  |  | 						{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $product->qu_id_purchase)->name }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							|  |  |  | 						{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $product->qu_id_stock)->name }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							|  |  |  | 						{{ $product->qu_factor_purchase_to_stock }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							|  |  |  | 					<td> | 
					
						
							| 
									
										
										
										
											2018-09-24 13:02:52 +02:00
										 |  |  | 						@if(!empty($product->product_group_id)) {{ FindObjectInArrayByPropertyValue($productGroups, 'id', $product->product_group_id)->name }} @endif | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-05-03 21:41:31 +02:00
										 |  |  | 					<td> | 
					
						
							|  |  |  | 						{{ $product->barcode }} | 
					
						
							|  |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-04-22 22:16:35 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.userfields_tbody', array( | 
					
						
							|  |  |  | 						'userfields' => $userfields, | 
					
						
							|  |  |  | 						'userfieldValues' => FindAllObjectsInArrayByPropertyValue($userfieldValues, 'object_id', $product->id) | 
					
						
							|  |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 				@endforeach | 
					
						
							|  |  |  | 			</tbody> | 
					
						
							|  |  |  | 		</table> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | @stop |