| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | @extends('layout.default') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('title', $__t('Meal plan')) | 
					
						
							|  |  |  | @section('activeNav', 'mealplan') | 
					
						
							|  |  |  | @section('viewJsName', 'mealplan') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @push('pageScripts') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <script src="{{ $U('/node_modules/fullcalendar/dist/fullcalendar.min.js?v=', true) }}{{ $version }}"></script> | 
					
						
							|  |  |  | @if(!empty($__t('fullcalendar_locale') && $__t('fullcalendar_locale') != 'x'))<script src="{{ $U('/node_modules', true) }}/fullcalendar/dist/locale/{{ $__t('fullcalendar_locale') }}.js?v={{ $version }}"></script>@endif | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | @endpush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @push('pageStyles') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <link href="{{ $U('/node_modules/fullcalendar/dist/fullcalendar.min.css?v=', true) }}{{ $version }}" | 
					
						
							|  |  |  | 	rel="stylesheet"> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | @endpush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('content') | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  | 	var fullcalendarEventSources = {!! json_encode(array($fullcalendarEventSources)) !!} | 
					
						
							| 
									
										
										
										
											2019-05-07 19:48:14 +02:00
										 |  |  | 	var internalRecipes = {!! json_encode($internalRecipes) !!} | 
					
						
							|  |  |  | 	var recipesResolved = {!! json_encode($recipesResolved) !!} | 
					
						
							| 
									
										
										
										
											2020-08-29 16:41:27 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 	Grocy.QuantityUnits = {!! json_encode($quantityUnits) !!}; | 
					
						
							|  |  |  | 	Grocy.QuantityUnitConversionsResolved = {!! json_encode($quantityUnitConversionsResolved) !!}; | 
					
						
							| 
									
										
										
										
											2020-01-25 20:01:40 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	Grocy.MealPlanFirstDayOfWeek = '{{ GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK }}'; | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | 		<h2 class="title">@yield('title')</h2> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-08 15:09:10 +01:00
										 |  |  | <hr class="my-2"> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							|  |  |  | 		<div id="calendar"></div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <div class="modal fade" | 
					
						
							|  |  |  | 	id="add-recipe-modal" | 
					
						
							|  |  |  | 	tabindex="-1"> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 	<div class="modal-dialog"> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 		<div class="modal-content"> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 			<div class="modal-header"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<h4 id="add-recipe-modal-title" | 
					
						
							|  |  |  | 					class="modal-title w-100"></h4> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-body"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<form id="add-recipe-form" | 
					
						
							|  |  |  | 					novalidate> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.recipepicker', array( | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'recipes' => $recipes, | 
					
						
							|  |  |  | 					'isRequired' => true, | 
					
						
							|  |  |  | 					'nextInputSelector' => '#recipe_servings' | 
					
						
							| 
									
										
										
										
											2019-05-07 19:48:14 +02:00
										 |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.numberpicker', array( | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'id' => 'recipe_servings', | 
					
						
							|  |  |  | 					'label' => 'Servings', | 
					
						
							| 
									
										
										
										
											2020-10-20 13:08:54 -05:00
										 |  |  | 					'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts'] - 1) . '1', | 
					
						
							|  |  |  | 					'decimals' => $userSettings['stock_decimal_places_amounts'], | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'value' => '1', | 
					
						
							| 
									
										
										
										
											2020-11-15 14:15:09 +01:00
										 |  |  | 					'additionalCssClasses' => 'locale-number-input locale-number-quantity-amount' | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					<input type="hidden" | 
					
						
							|  |  |  | 						id="day" | 
					
						
							|  |  |  | 						name="day" | 
					
						
							|  |  |  | 						value=""> | 
					
						
							|  |  |  | 					<input type="hidden" | 
					
						
							|  |  |  | 						name="type" | 
					
						
							|  |  |  | 						value="recipe"> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				</form> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-footer"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<button type="button" | 
					
						
							|  |  |  | 					class="btn btn-secondary" | 
					
						
							|  |  |  | 					data-dismiss="modal">{{ $__t('Cancel') }}</button> | 
					
						
							|  |  |  | 				<button id="save-add-recipe-button" | 
					
						
							|  |  |  | 					data-dismiss="modal" | 
					
						
							|  |  |  | 					class="btn btn-success">{{ $__t('Save') }}</button> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <div class="modal fade" | 
					
						
							|  |  |  | 	id="add-note-modal" | 
					
						
							|  |  |  | 	tabindex="-1"> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 	<div class="modal-dialog"> | 
					
						
							|  |  |  | 		<div class="modal-content"> | 
					
						
							|  |  |  | 			<div class="modal-header"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<h4 id="add-note-modal-title" | 
					
						
							|  |  |  | 					class="modal-title w-100"></h4> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-body"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<form id="add-note-form" | 
					
						
							|  |  |  | 					novalidate> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					<div class="form-group"> | 
					
						
							|  |  |  | 						<label for="note">{{ $__t('Note') }}</label> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						<textarea class="form-control" | 
					
						
							|  |  |  | 							rows="2" | 
					
						
							|  |  |  | 							id="note" | 
					
						
							|  |  |  | 							name="note"></textarea> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 					</div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					<input type="hidden" | 
					
						
							|  |  |  | 						name="type" | 
					
						
							|  |  |  | 						value="note"> | 
					
						
							| 
									
										
										
										
											2020-01-23 21:57:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 				</form> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-footer"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<button type="button" | 
					
						
							|  |  |  | 					class="btn btn-secondary" | 
					
						
							|  |  |  | 					data-dismiss="modal">{{ $__t('Cancel') }}</button> | 
					
						
							|  |  |  | 				<button id="save-add-note-button" | 
					
						
							|  |  |  | 					data-dismiss="modal" | 
					
						
							|  |  |  | 					class="btn btn-success">{{ $__t('Save') }}</button> | 
					
						
							| 
									
										
										
										
											2020-01-23 20:59:19 +01:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | <div class="modal fade" | 
					
						
							|  |  |  | 	id="add-product-modal" | 
					
						
							|  |  |  | 	tabindex="-1"> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 	<div class="modal-dialog"> | 
					
						
							|  |  |  | 		<div class="modal-content"> | 
					
						
							|  |  |  | 			<div class="modal-header"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<h4 id="add-product-modal-title" | 
					
						
							|  |  |  | 					class="modal-title w-100"></h4> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-body"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<form id="add-product-form" | 
					
						
							|  |  |  | 					novalidate> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.productpicker', array( | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'products' => $products, | 
					
						
							|  |  |  | 					'nextInputSelector' => '#amount' | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 					@include('components.productamountpicker', array( | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					'value' => 1, | 
					
						
							|  |  |  | 					'additionalGroupCssClasses' => 'mb-0' | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 					)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					<input type="hidden" | 
					
						
							|  |  |  | 						name="type" | 
					
						
							|  |  |  | 						value="product"> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 				</form> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 			<div class="modal-footer"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<button type="button" | 
					
						
							|  |  |  | 					class="btn btn-secondary" | 
					
						
							|  |  |  | 					data-dismiss="modal">{{ $__t('Cancel') }}</button> | 
					
						
							|  |  |  | 				<button id="save-add-product-button" | 
					
						
							|  |  |  | 					data-dismiss="modal" | 
					
						
							|  |  |  | 					class="btn btn-success">{{ $__t('Save') }}</button> | 
					
						
							| 
									
										
										
										
											2020-01-25 11:51:00 +01:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 		</div> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2019-05-06 19:38:47 +02:00
										 |  |  | @stop |