<div *ngIf="quote">
	<div style="margin-bottom: 20px;">
		<button class="btn btn-primary btn-xs" [routerLink]="['/admin/cotizaciones']"><span class="fa fa-arrow-circle-left "></span> Volver</button>
		<h3 *ngIf="quote.created_at">Cotización del {{ quote.created_at | date: 'dd/MM/yyyy hh:mm:ss'}}</h3>
	</div>

	<div class="row">
		<div class="col-6" *ngIf="quote">
			<div style="margin-top: 30px;" class="col-12">
				Datos
				<table class="table">
					<tr>
						<td><strong>ID</strong></td>
						<td>{{ quote.id }}</td>
					</tr>
					<tr>
						<td><strong>Cliente</strong></td>
						<td>{{ quote.firstName }} {{ quote.lastName }}</td>
					</tr>
					<tr>
						<td><strong>Email</strong></td>
						<td>{{ quote.email }}</td>
					</tr>
					<tr>
						<td><strong>Teléfono</strong></td>
						<td>{{ quote.phone }}</td>
					</tr>
					<tr>
						<td><strong>Marca</strong></td>
						<td>{{ quote.carBrand }}</td>
					</tr>
					<tr>
						<td><strong>Modelo</strong></td>
						<td>{{ quote.carModel }}</td>
					</tr>
					<tr>
						<td><strong>Año</strong></td>
						<td>{{ quote.carYear }}</td>
					</tr>
					<tr>
						<td><strong>Tipo de servicio</strong></td>
						<td>{{ quote.quoteType}} {{ quote.type }}</td>
					</tr>
					<tr *ngIf="quote.fixSize">
						<td><strong>Tipo de daño</strong></td>
						<td>{{ quote.fixSize }}</td>
					</tr>
					<tr *ngIf="quote.installOnSite == 1">
						<td><strong>En terreno</strong></td>
						<td>Si</td>
					</tr>
					<tr *ngIf="quote.installOnStore == 1">
						<td><strong>En tienda</strong></td>
						<td>Si</td>
					</tr>
					<tr>
						<td><strong>Dirección</strong></td>
						<td>{{ quote.quoteAddress }}</td>
					</tr>
					<tr *ngIf="quote.userId && seller">
						<td><strong>Vendedor</strong></td>
						<td>{{ seller.name }} - {{ seller.email }}</td>
					</tr>
					<tr>
						<td><strong>Cotizado</strong></td>
						<td>{{ quote.updated_at | date: 'dd/MM/yyyy hh:mm:ss' }}</td>
					</tr>
					<tr *ngIf="quote.price != ''">
						<td><strong>Precio</strong></td>
						<td>${{ quote.price }}</td>
					</tr>
				</table>
			</div>
		</div>

		<div class="col-6">

			<h5>Informacion extra</h5>
			<br/>
			<strong>Boleta o factura N:</strong>
			<p>{{ quote.billNumber }}</p>
			<br/>
			<strong>Estado</strong>
			<p *ngIf="quote.status==0">Sin cotizar</p>
			<p *ngIf="quote.status==1">Guardada</p>
			<p *ngIf="quote.status==2">Enviada</p>
			<p *ngIf="quote.status==3">Pagada</p>
			<p *ngIf="quote.status==4">Pago rechazado</p>
			<p *ngIf="quote.status==99">Oculta</p>
			
			<div style="margin-top: 20px;" *ngIf="quote.notes">
				<strong>Respuesta</strong><br/>
				<p>{{ quote.notes }}</p>
			</div>

		    <div style="margin-top: 20px;">
			    <div *ngIf="quote.windscreenPrice != null">
			    	<label class="control-label">Valor de las plumillas: ${{ quote.windscreenPrice }}</label>
			    </div>

			    <div *ngIf="quote.securityPrice != null">
			    	<label class="control-label">Valor de la lamina: ${{ quote.securityPrice }}</label>
			    </div>
			</div>

			<div *ngIf="quote.sideGlass != ''">
		    	<div *ngFor="let side of sideGlass; let i = index">
		        	<label class="control-label">Valor {{ side.describe }} - Lado {{ side.lado }}: ${{ side.price }}</label>
		      	</div>
		    </div>

		    <div *ngIf="quote && quote.rearGlass != ''">
			    <div *ngIf="rearGlass.type.unique == 'true' || rearGlass.price[0] > 0">				    	
			        <label class="control-label">Valor luneta: ${{ rearGlass.price[0] }}</label>
			    </div>

			    <div *ngIf="rearGlass.type.left == 'true'">				    	
			    	<label class="control-label">Valor Luneta Izquierda: ${{ rearGlass.price[1] }}</label>
			    </div>

			    <div *ngIf="rearGlass.type.right == 'true'">				    	
			    	<label class="control-label">Valor Luneta Derecha: ${{ rearGlass.price[2] }}</label>
			    </div>
			</div>

		</div>
	</div>
</div>