{% extends "common/auth_page.twig" %}

{% block contentTitle %}{{'management-menu'|trans}}{% endblock %}

{% block content %}
</div>
      

<input type="hidden" value="{{language}}" id="languageTakeAway" />

<div class="container-fluid">

<div class="container mb-3">
	<div class="row m-auto text-center">
		<div class="col-md-12">
			<h1>{{'menu-of'|trans}} {{user.name}} {{user.surname}} ( <span class="user-balance">{{user.balance}}</span> € ) {% if userCustomId %} <a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\UserRouters::USER_GET'),{id:userCustomId})}}"><button class="btn btn-xs btn-success">{{'user-card'|trans}}</button></a> {% endif %}</h1>
		</div>
	</div>
</div>

<div class="container mb-3">
	<div class="row m-auto text-center">
		<div class="col-md-5"></div>
		<div class="col-md-2">
			<!--
			<a class="btn btn-outline-info" target="_blank" href="https://delicomsl-my.sharepoint.com/:f:/g/personal/susana_egido_delicom_info/EtpDK2kpP0hIoasLkUVg5ncB_YyzmiOqm9EOMjqTOMZyJQ?e=gEzta5">{{'see-menu-month'|trans}}<a>
			-->
			{% if not menuScreen %}
			<a class="btn btn-outline-info" target="_blank" href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_PUBLIC'))}}">{{'see-menu-month'|trans}}<a>
			{% endif %}
		</div>
		<div class="col-md-5"></div>
	</div>
</div>

<div class="container mb-3">
	<div class="row m-auto text-center">
		<div class="col-md-12">
			{% if isVisible %}
				{% if userCustomId %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_WEEK_BY_USER'),{week:prevWeek,year:prevYear,userId:userCustomId})}}"><button class="btn btn-outline-dark">{{'prev-week'|trans}}</button></a>
				{% else %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_WEEK'),{week:prevWeek,year:prevYear})}}"><button class="btn btn-outline-dark">{{'prev-week'|trans}}</button></a>
				{% endif %}
				<span class="font-weight-bold pl-5 pr-5" >{{'week-of'|trans}} {{weekTitle}} </span>
				{% if userCustomId %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_WEEK_BY_USER'),{week:nextWeek,year:nextYear,userId:userCustomId})}}"><button class="btn btn-outline-dark">{{'next-week'|trans}}</button></a>
				{% else %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_WEEK'),{week:nextWeek,year:nextYear})}}"><button class="btn btn-outline-dark">{{'next-week'|trans}}</button></a>
				{% endif %}
			{% else %}
				{% if userCustomId %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_WEEK_BY_USER'),{week:prevWeek,year:prevYear,userId:userCustomId})}}"><button class="btn btn-outline-dark">{{'prev-week'|trans}}</button></a>
				{% else %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_WEEK'),{week:prevWeek,year:prevYear})}}"><button class="btn btn-outline-dark">{{'prev-week'|trans}}</button></a>
				{% endif %}
				<span class="font-weight-bold pl-5 pr-5" >{{'week-of'|trans}} {{weekTitle}} </span>
				{% if userCustomId %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_WEEK_BY_USER'),{week:nextWeek,year:nextYear,userId:userCustomId})}}"><button class="btn btn-outline-dark">{{'next-week'|trans}}</button></a>
				{% else %}
				<a href="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_WEEK'),{week:nextWeek,year:nextYear})}}"><button class="btn btn-outline-dark">{{'next-week'|trans}}</button></a>
				{% endif %}
			{% endif %}


		</div>
	</div>
	<div class="row text-center mt-3">
		<div class="col-md-12">
		{% if isVisible %}
		<form action="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_WEEK_GOTO'))}}" method="POST" >
		{% else %}
		<form action="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_WEEK_GOTO'))}}" method="POST" >
		{% endif %} 
			{% if not menuScreen %}
			<div class="row">
				<div class="col-md-3"></div>
				<div class="col-md-2">
					<label >{{'got-to-week'|trans}}</label>
				</div>
				<div class="col-md-3">
					<input type="hidden" name="userCustomId" value="{{userCustomId}}" />
					<input type="hidden" name="userId" value="{{user.id}}" />
					<input type="date" class="form-control text-center" id="dateFrom" name="dateFrom" {% if dateFrom %}value="{{dateFrom}}"{% endif %} required pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
				</div>
				<div class="col-md-1">
					<input type="submit" class="btn btn-outline-success" value="{{'go'|trans}}" />
				</div>
				</form>
			</div>
			{% endif %}
		</div>
	</div>

	{% if not user.excludeAllergens %}
		{% if user.allergens %}<div class="row mt-3 alert alert-warning" role="alert">{{'allergens-menu-text'|trans|raw}}</div>{% endif %}
	{% endif %}
</div>

	<div class="row">
		<div class="col-md-12">
			<table class="mw-100 table">
				<tr>
					<td>
					</td>
					{% for key,day in daysMenu %}
					<td style="font-size:13px;text-transform:uppercase;text-align:center;">{{day.name}}</td>
					{% endfor %}
				</tr>
				{% for line in lines %}

				<tr>
					<td style="width: 50px;padding-top:100px;">
						<style type="text/css">
						.line{{line.id}}{
							background-color: {{line.color}};
						}
						</style>
						<h5>{{line.name}}</h5>
					</td>


					{% for key,day in daysMenu %}
						<td style="width: 200px;" class="h-100">
							{% if day.iso != "2022-09-27" %}
						{% for menu in day.menus %}
							{% if line.id == menu.line.id %}
								{% if canReserveDepartment or not user.excludeReserved %}
									<div >
				  				<div id="body-menu-{{menu.id}}" class="card-body {% if menu.hasReserved %}bgReserveMenu{% endif %}" >

				  					{% if menu.region%}
				  					<center>
				  					<img src="/static/images/flags/{{menu.region|lower}}_{{menu.region|upper}}.svg" width="15" height="15" class="mb-3">
				  					</center>
				  					{% endif %}
				  					
				  					<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[0].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[0].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[0].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}"> {% if menu.products[0].region%}<img src="/static/images/flags/{{menu.products[0].region|lower}}_{{menu.products[0].region|upper}}.svg" width="15" height="15" class="">{% endif %}{{menu.products[0].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[0].secondaryName}}</span></h6>
					  				

					  				<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[1].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[1].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[1].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}">{% if menu.products[1].region%}<img src="/static/images/flags/{{menu.products[1].region|lower}}_{{menu.products[1].region|upper}}.svg" width="15" height="15" class="">{% endif %}{{menu.products[1].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[1].secondaryName}}</span></h6>
					  				
					  				
					  				<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[2].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[2].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[2].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}">{% if menu.products[2].region%}<img src="/static/images/flags/{{menu.products[2].region|lower}}_{{menu.products[2].region|upper}}.svg" width="15" height="15" class="">{% endif %} {{menu.products[2].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[2].secondaryName}}</span></h6>
					  				
									</div>
								{% else %}
									{% if line.reserveDepartment or isAdmin %}
										<div >
					  				<div id="body-menu-{{menu.id}}" class="card-body {% if menu.hasReserved %}bgReserveMenu{% endif %}" >
					  					
					  					<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[0].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[0].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[0].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}">{{menu.products[0].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[0].secondaryName}}</span></h6>
						  				

						  				<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[1].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[1].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[1].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}">{{menu.products[1].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[1].secondaryName}}</span></h6>
						  				
						  				
						  				<h6 class="card-title" data-toggle="tooltip" data-html="true" title="{% if menu.products[2].allergens %}{{'allergens'|trans}}<br/>{% endif %}{% for allergen in menu.products[2].allergens %}{% if allergen.show == 1 %} {% if allergen.code == 39 %} Preguntar personal Delicom {% else %} {{allergen.code}} {% endif %}{% if loop.index	< menu.products[2].allergens|length %}, {% endif %}{% elseif isadmin %}{{allergen.code}} {{allergen.name}}{% endif %}{% endfor %}">{{menu.products[2].principalName}} <span class="card-subtitle mb-2 text-muted">{{menu.products[2].secondaryName}}</span></h6>
						  				
										</div>
									{% endif %}
								{% endif %}
								{% if not user.excludeReserved or isAdmin %}
								{% if canReserveDepartment or isAdmin %}
									<div class="card-footer">
						  				<button class="btn btn-danger deleteReserveMenu deleteReserveMenu-{{day.iso}} button-delete-reserve-{{menu.id}}"  data-date="{{day.iso}}" data-reservation-id="{{menu.hasReserved.id}}" data-user-id="{{user.id}}" data-menu-id="{{menu.id}}"  {% if not menu.hasReserved %}style="display:none;" {% endif %}>
						  	        	{{'delete-reserve'|trans}} 
							  	      </button>
			  	      				<button class="btn btn-success reserveMenu reserveMenu-{{day.iso}} button-reserve-{{menu.id}}" data-date="{{day.iso}}" data-reservation-id="{{menu.hasReserved.id}}" data-user-id="{{user.id}}" data-menu-id="{{menu.id}}" data-take-away="{{line.takeAway}}" data-line-id="{{line.id}}" data-toggle="tooltip" {% if menu.hasReserved or day.reserved %}style="display:none;" {% endif %}>
			  	      	        	{{'reserve'|trans}} 
			  	      	      </button>
			  	      	      {% if line.takeAway %}
			  	      	      	<button class="btn btn-warning reserveMenuTakeAway reserveMenuTakeAway-{{day.iso}} button-reserve-{{menu.id}}" data-date="{{day.iso}}" data-reservation-id="{{menu.hasReserved.id}}" data-user-id="{{user.id}}" data-menu-id="{{menu.id}}" data-take-away="{{line.takeAway}}" data-take-away-price="{{line.takeAwayPrice}}" data-line-id="{{line.id}}" data-toggle="tooltip" {% if menu.hasReserved or day.reserved %}style="display:none;" {% endif %}>
			  	      	        	{{'take-away'|trans}} 
			  	      	      	</button>
			  	      	      {% endif %}
			  	      	      {% if isVisible %}
							  	      	{% if isAdmin %}
									  	      <button class="btn-sm btn-outline-primary editMenu" data-menu-id="{{menu.id}}">{{'edit'|trans}}</button>
														<button class="btn-sm btn-outline-danger deleteMenu" data-menu-id="{{menu.id}}">{{'delete'|trans}}</button>
													{% endif %}
												{% endif %}
									</div>
								{% endif %}
								{% endif %}
								</div>
							{% endif %}
						{% endfor %}
					{% endif %}
						</td>
					{% endfor %}
				</tr>
				{% endfor %}
			</table>
		</div>
	</div>
	<div class="row">
		<div class="col-md-12">
			<table class="mw-100 table" style="background-color: #fab1a0;">
				<tr>
					<td style="text-align: center;">
						Tenga en cuenta que el pan servido como acompañamiento en nuestro menú escolar contiene gluten y puede contener trazas de mostaza y soja.
					</td>
				</tr>
			</table>
		</div>
	</div>


	{% if user.excludeAllergens or not user.allergens %}
	<div class="row">
		<div class="col-md-12">
			<table class="mw-100 table" style="background-color: #C6E2FF;">
				<tr>
					<td style="width: 50px;padding-top:50px;">
						<h5>{{'sandwiches'|trans}}</h5>
					</td>
					{% for key,day in daysMenu %}
					<td>
						<div class="card-body dropup card-sandwich">
						{% if day.iso != "2022-09-27" %}

							<select class="selectpicker h-100 form-control sandiwchSelector sandwich-selected-{{day.iso}}" id="sandwich-selected-{{day.iso}}" data-date="{{day.iso}}" style="width: 200px;"  {% if day.iso in sandwichesReserved.daysReserved %}disabled{% endif %} data-size="{{sandwiches|length}}+1" data-dropup-auto="false">
								<option value="">--</option>
								{% for sandwich in sandwiches %}
									<option value="{{sandwich.id}}" {% for sandwichReserved in sandwichesReserved.sandwichesReserved %}{% if sandwichReserved.dateSandwich|date("Y-m-d") == day.iso %}{% if sandwich.id == sandwichReserved.sandwichId %}selected{% endif %}{% endif %}{% endfor %}  >{{sandwich.name}} - {{sandwich.price}} € ({{sandwich.description}})</option>
								{% endfor %}
							</select>
						</div>
						<div class="card-footer">
							
								<button class="btn btn-danger deleteReserveSandwich deleteReserveSandwich-{{day.iso}} button-delete-reserve-sandwich-{{menu.id}} {% if day.iso in sandwichesReserved.daysReserved %}{% else %}d-none{% endif %}"  data-date="{{day.iso}}" data-reservation-id="{% if day.iso in sandwichesReserved.daysReserved %}{% for sandwichReserved in sandwichesReserved.sandwichesReserved %}{% if sandwichReserved.dateSandwich|date("Y-m-d") == day.iso %}{{sandwichReserved.id}}{% endif %}{% endfor %}{% endif %}" data-sandwich-id="{{sandwichReserved.sandwichId}}" data-user-id="{{user.id}}"  data-default-text="{{'delete-reserve'|trans}}">
			  	        {{'delete-reserve'|trans}} {% if day.iso in sandwichesReserved.daysReserved %}{% for sandwichReserved in sandwichesReserved.sandwichesReserved %}{% if sandwichReserved.dateSandwich|date("Y-m-d") == day.iso %}{{sandwichReserved.dateReserveHour}}{% endif %}{% endfor %}{% endif %} 
				  	    </button>
				  	  
	      				<button class="btn btn-success reserveSandwich reserveSandwich-{{day.iso}} {% if day.iso in sandwichesReserved.daysReserved %}d-none{% else %}{% endif %}" id="sandwich-{{day.iso}}" data-date="{{day.iso}}" data-user-id="{{user.id}}" data-sandwich-id="{{sandwich.sandwichId}}" data-hour="12:50" data-toggle="tooltip" >
	      	        	12:50 
	      	      </button>

	      	      <button class="btn btn-success reserveSandwich reserveSandwich-{{day.iso}} {% if day.iso in sandwichesReserved.daysReserved %}d-none{% else %}{% endif %}" id="sandwich-{{day.iso}}" data-date="{{day.iso}}" data-user-id="{{user.id}}" data-sandwich-id="{{sandwich.sandwichId}}" data-hour="13:35" data-toggle="tooltip" >
	      	        	13:35 
	      	      </button>

	      	      <button class="btn btn-success reserveSandwich reserveSandwich-{{day.iso}} {% if day.iso in sandwichesReserved.daysReserved %}d-none{% else %}{% endif %}" id="sandwich-{{day.iso}}" data-date="{{day.iso}}" data-user-id="{{user.id}}" data-sandwich-id="{{sandwich.sandwichId}}" data-hour="14:20"data-toggle="tooltip" >
	      	        	14:20 
	      	      </button>
	      	  {% else %}
	      	  <div style="width: 200px;"></div>    
						{% endif %}
							</div>
					</td>
					{% endfor %}
				</tr>

			</table>
		</div>
	</div>
	{% endif %}

	
<!--
{% if not user.excludeAllergens and user.allergens %}
	<div class="row pt-5">
		<div class="col-md-4"></div>
		<div class="col-md-4 text-center">
			<a class="btn btn-info" href="/static/Carta_padre_alérgicos_21_22.pdf" target="_blank">{{'protocol-reserves-allergics'|trans}}</a>
		</div>
		<div class="col-md-4"></div>
	</div>
{% endif %}
-->

{% if user.allergens %}
<div class="container mb-5">
	<div class="row mt-3 m-5 alert alert-warning" role="alert">
		<div class="col-md-6">
			{{'sandwich-advice-other'|trans}}
		</div>
		<div class="col-md-6">
			{{'sandiwch-advice-no-cancel'|trans}}
		</div>
	</div>
</div>
{% endif %}


<div class="{% if menuScreen  %}container-fluid {% else %} container{% endif %} mb-5">
	<div class="row mt-3 m-5 alert alert-info" role="alert">
		<div class="col-md-12">
		<h5>{{'allergens-legend'|trans}}</h5>
		</div>
		{% for allergen in allergens %}
			<div class="{% if menuScreen  %}col{% else %} col-md-1{% endif %} text-center ">
				{% if allergen.image %}
				<img src="/static/images/allergens/{{allergen.image}}" style="max-width:30px;"><br/>
				{% else %}
					<div style="width:50px;height:50px;"></div>
				{% endif %}
				<span style="font-size:8px;">{{allergen.code}} {{allergen.name|trans}}</span>
			</div>
		{% endfor %}
	</div>
</div>

{% if isVisible %}
	{% if isAdmin %}
	<div class="container mbt-3">
		<div class="row">
		  <div class="col-md-12 text-center pb-5">
		    <button type="button" class="btn btn-outline-success" data-toggle="modal" data-target="#menuModal" >{{'add-menu'|trans}}</button>
		  </div>
		</div>
	</div>
	{% endif %}
{% endif %}

{% if isVisible %}

<div class="modal fade" id="menuModal" tabindex="-1" role="dialog" aria-labelledby="addmenuModal" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="addmenuModal">{{'new-menu'|trans}}</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form action="{{path_for(constant('GestionComedor\\Configuration\\Routers\\MenuRouters::MENU_MANAGER_CREATE'))}}" method="POST" >
        	<input type="hidden" name="menuId" id="menuIdModal" value="{{menu.id}}" />
        	<input type="hidden" name="month" value="{{month}}" />
        	<input type="hidden" name="year" value="{{year}}" />

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
				  		<label for="firstPlate" class="font-weight-bold">{{'first-plate'|trans}}</label>
				  		<select name="firstPlate" id="firstPlateModal" class="form-control">
				  			{% for product in productsStarter %}
				  				<option value="{{product.id}}">{{product.principalName}} {{product.secondaryName}} {% if product.allergens %} ({% for allergen in product.allergens %}{{allergen.code}}, {% endfor %}) {% endif %} </option>
					  		{% endfor %}
				  			
				  		</select>
				  	</div>
        	</div>

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
			  		<label for="firstPlateRegion" class="font-weight-bold">Primer Plato Regional</label>
			  		<select name="firstPlateRegion" id="firstPlateRegionModal" class="form-control">
			  			<option value=""> No</option>
			  			<option value="DE" >Alemán</option>
			  			<option value="ES" >Español</option>
			  			<option value="GB" >Inglés</option>
			  			<option value="FR" >Francés</option>
			  			<option value="US" >EEUU</option>
			  			<option value="CAM" >C.A.Madrid</option>
			  			<option value="IN" >India</option>
			  			<option value="TH" >Tailandia</option>
			  			<option value="CN" >China</option>
			  			<option value="IT" >Italia</option>
						<option value="CU">Cuba</option>
						<option value="MX">México</option>
			  		</select>
			  	</div>
        	</div>

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
				  		<label for="secondPlate" class="font-weight-bold">{{'second-plate'|trans}}</label>
				  		<select name="secondPlate" id="secondPlateModal" class="form-control">
				  			{% for product in productsPrincipal %}
				  				<option value="{{product.id}}">{{product.principalName}} {{product.secondaryName}} {% if product.allergens %} ({% for allergen in product.allergens %}{{allergen.code}}, {% endfor %}) {% endif %} </option>
					  		{% endfor %}
				  		</select>
				  	</div>
        	</div>

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
			  		<label for="secondPlateRegion" class="font-weight-bold">Segundo Plato Regional</label>
			  		<select name="secondPlateRegion" id="secondPlateRegionModal" class="form-control">
			  			<option value=""> No</option>
			  			<option value="DE" >Alemán</option>
			  			<option value="ES" >Español</option>
			  			<option value="GB" >Inglés</option>
			  			<option value="FR" >Francés</option>
			  			<option value="US" >EEUU</option>
			  			<option value="CAM" >C.A.Madrid</option>
			  			<option value="IN" >India</option>
			  			<option value="TH" >Tailandia</option>
			  			<option value="CN" >China</option>
			  			<option value="IT" >Italia</option>
						<option value="CU">Cuba</option>
						<option value="MX">México</option>
			  		</select>
			  	</div>
        	</div>

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
				  		<label for="dessertComplements" class="font-weight-bold">{{'dessert-complements'|trans}}</label>
				  		<select name="dessertComplements" id="dessertComplementsModal" class="form-control">
				  			{% for product in productsDessert %}
				  				<option value="{{product.id}}">{{product.principalName}} {{product.secondaryName}} {% if product.allergens %} ({% for allergen in product.allergens %}{{allergen.code}}, {% endfor %}) {% endif %} </option>
					  		{% endfor %}
				  		</select>
				  	</div>
        	</div>

        	<div class="form-row">
        		<div class="from-group col-md-12 pt-3" >
			  		<label for="dessertComplementsRegion" class="font-weight-bold">Postre Regional</label>
			  		<select name="dessertComplementsRegion" id="dessertComplementsRegionModal" class="form-control">
			  			<option value=""> No</option>
			  			<option value="DE" >Alemán</option>
			  			<option value="ES" >Español</option>
			  			<option value="GB" >Inglés</option>
			  			<option value="FR" >Francés</option>
			  			<option value="US" >EEUU</option>
			  			<option value="CAM" >C.A.Madrid</option>
			  			<option value="IN" >India</option>
			  			<option value="TH" >Tailandia</option>
			  			<option value="CN" >China</option>
			  			<option value="IT" >Italia</option>
						<option value="CU">Cuba</option>
						<option value="MX">México</option>
			  		</select>
			  	</div>
        	</div>

					<div class="form-row">
						<div class="from-group col-md-6 pt-3" >
							<label for="dateMenu" class="font-weight-bold">{{'date'|trans}}</label>
				        <input type="date" class="form-control text-center" name="dateMenu" id="dateMenuModal" required pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
						</div>
						<div class="from-group col-md-6 pt-3" >
							<label for="line" class="font-weight-bold">{{'line'|trans}}</label>
				  		<select name="line" id="lineModal" class="form-control">
				  			{% for line in lines %}
				  				<option value="{{line.id}}">{{line.name}}</option>
					  		{% endfor %}
				  		</select>
						</div>								
					</div>

      </div>

      <div class="modal-footer">
      	<div class="col text-left">
        <button type="button" class="btn btn-danger" data-dismiss="modal">{{'cancel'|trans}}</button>
        </div>
        <div class="col text-right">
					<button class="btn btn-success btn-success ">{{'save'|trans}}</button>
				</div>
      </div>
      </form> 
    </div>
  </div>
</div>

{% endif %}



{% endblock %}