/home/dvjjulio/softtrash/resources/views/movil/route.blade.php
<!DOCTYPE html>
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if IE 9]>         <html class="no-js lt-ie10"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">

        <title>Metropolitana movil</title>

        <meta name="description" content="ProUI is a Responsive Bootstrap Admin Template created by pixelcave and published on Themeforest.">
        <meta name="author" content="pixelcave">
        <meta name="robots" content="noindex, nofollow">

        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0">

        <!-- Icons -->
        <!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
        <link rel="shortcut icon" href="img/favicon.ico">
        <link rel="apple-touch-icon" href="img/icon57.png" sizes="57x57">
        <link rel="apple-touch-icon" href="img/icon72.png" sizes="72x72">
        <link rel="apple-touch-icon" href="img/icon76.png" sizes="76x76">
        <link rel="apple-touch-icon" href="img/icon114.png" sizes="114x114">
        <link rel="apple-touch-icon" href="img/icon120.png" sizes="120x120">
        <link rel="apple-touch-icon" href="img/icon144.png" sizes="144x144">
        <link rel="apple-touch-icon" href="img/icon152.png" sizes="152x152">
        <!-- END Icons -->

        <!-- Stylesheets -->
        <!-- Bootstrap is included in its original form, unaltered -->
        <link rel="stylesheet" href="{!! URL::to('/').'/css/bootstrap.min.css' !!}">

        <!-- Related styles of various icon packs and plugins -->
        <link rel="stylesheet" href="{!! URL::to('/') !!}/css/plugins.css">

        <!-- The main stylesheet of this template. All Bootstrap overwrites are defined in here -->
        <link rel="stylesheet" href="{!! URL::to('/') !!}/css/main.css">

        <!-- Include a specific file here from css/themes/ folder to alter the default theme of the template -->

        <!-- The themes stylesheet of this template (for using specific theme color in individual elements - must included last) -->
        <link rel="stylesheet" href="{!! URL::to('/') !!}/css/themes.css">
        <link rel="stylesheet" href="{!! URL::to('/') !!}/css/themes/night.css">

        <!-- Include Date Range Picker -->
        <link rel="stylesheet" type="text/css" href="{!! URL::to('/') !!}/plugins/daterangepicker/daterangepicker-bs3.css" />

        <!-- END Stylesheets -->

        <!-- JQUERY GOOGLE -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
        <script type="text/javascript">
            main_path = '{!! URL::to('/') !!}';
        </script>
        <!-- Modernizr (browser feature detection library) & Respond.js (Enable responsive CSS code on browsers that don't support it, eg IE8) -->
        <script src="{!! URL::to('/').'/js/vendor/modernizr-2.7.1-respond-1.4.2.min.js' !!}"></script>
    </head>
    <body>
<div id="page-content">
	<div class="content-header">
		<ul class="nav-horizontal text-center">
			<li >
			<a href="{!! URL::To('/').'/movil/index' !!}"><i class="gi gi-shop_window"></i> Inicio</a>
			</li>
			<li class="active">
			<a href="{!! URL::To('/').'/movil/route' !!}"><i class="gi gi-shop_window"></i> Orden</a>
			</li>
		</ul>
	</div>
    @if($orden->getData()->status === true)
	<div class="block">
		<div class="block-title">
		<h2>Bienvenido: <strong>{!! ($_COOKIE['user'] == null ) ? URL::To('/') : $_COOKIE['user'] !!}</strong></h2>
        <div class="block-options pull-right">
            <a href="{!! URL::To('/').'/movil/logout' !!}" class="btn btn-alt btn-sm btn-default" data-toggle="tooltip" title="" data-original-title="Salir"><i class="fa fa-sign-out"></i></a>
            </div>
		</div>
		<form action="page_forms_general.php" method="post" class="form-horizontal form-bordered" onsubmit="return false;">
            <input type="hidden" name="_token" id="csrf-token" value="{{ csrf_token() }}" />
			<div class="form-group">
                <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">Vehículo: <strong>{!! $user[0]->placas !!}</strong></label>
                </div>
            </div>
			<div class="form-group">
				<div class="col-md-12 text-center">
					<label class="control-label" for="example-hf-orden">Orden No.:</label>
				</div>
				<div class="col-md-12">
					<input type="text" id="orden-input" name="example-hf-email" class="form-control" placeholder="---" required="required" value="{!! ($orden_no == '') ? '' : ++$orden_no !!}">
				</div>
			</div>
			<div
             class="form-group">
				<div class="col-md-12 text-center">
					<label class="control-label" for="example-hf-password">Selecciona el Cliente:</label>
				</div>
				<div class="col-md-10">
					<select id="cliente-select" class="form-control" required="required">
                      <!--  <option value="0">Selecciona</option>
                        @foreach($clientes as $key => $cliente)
                            <option value="{{ $cliente->id }}" >{{ $cliente->nombre_comercial }}</option>
                        @endforeach-->
                    </select>
				</div>
        <div class="col-md-1 col-xs-6 text-center">
          <a class="btn btn-sm btn-primary" onclick="Route.clientesNear(this)"> Cerca</a>
        </div>
        <div class="col-md-1 col-xs-6 text-center">
          <a class="btn btn-sm btn-primary" onclick="Route.clientes_all(this)"> Todas</a>
        </div>
			</div>
			<div class="form-group form-actions">
				<div id="orden-btn-div" class="col-md-12 text-center">
					<button type="submit" id="orden-btn" class="btn btn-lg btn-success" data-userid="{!! $user[0]->id !!}" data-camionid="{!! $user[0]->camion_id !!}" data-fecha="{!! $fecha_ !!}" onclick="Route.getInicio(this)"><i class="fa fa-play"></i> Inicio Orden</button>
				</div>
			</div>
		</form>
	</div>
    @endif
    @if($orden->getData()->status === false)
    <div class="block">
        <div class="block-title">
        <h2>Bienvenido: <strong>{!! ($_COOKIE['user'] == null ) ? URL::To('/') : $_COOKIE['user'] !!}</strong></h2>
        <div class="block-options pull-right">
            <a href="{!! URL::To('/').'/movil/logout' !!}" class="btn btn-alt btn-sm btn-default" data-toggle="tooltip" title="" data-original-title="Salir"><i class="fa fa-sign-out"></i></a>
            </div>
        </div>
        <form action="page_forms_general.php" method="post" class="form-horizontal form-bordered" onsubmit="return false;">
            <input type="hidden" name="_token" id="csrf-token" value="{{ csrf_token() }}" />
            <div class="form-group">
                <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">No. Orden: <strong>{!! $orden->getData()->data[0]->orden_no !!}</strong></label>
                </div>
                <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">Vehículo: <strong>{!! $user[0]->placas !!}</strong></label>
                </div>
                 <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">Cliente: {!! $orden->getData()->data[0]->nombre_comercial !!}</label>
                </div>
                <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">Hora: <strong>{!! date('h:i:s a', strtotime($orden->getData()->data[0]->hora_inicio)) !!}</strong></label>
                </div>
                <div class="col-md-12 text-left">
                    <label class="control-label text-left" for="example-hf-email">Unidad del Cliente: <strong>{!! $orden->getData()->data[0]->unidad !!}</strong></label>
                </div>
            </div>
            @if ($orden->getData()->data[0]->giro === 'Combustible')
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Nota:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="nota-input"  class="form-control" placeholder="3412"  required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Hora:</label>
                    </div>
                    <div class="col-md-12">
                      <input type="text" id="hora-input"  class="form-control" placeholder="5:30 PM"  required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Litros:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="litros-input"  class="form-control" placeholder="20" step="0.01" required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Tipo de Combustible:</label>
                    </div>
                    <div class="col-md-12">
                        <select id="tipo-select" class="form-control" required="required">
                            <option value="Magna">Magna</option>
                            <option value="Premium">Premium</option>
                            <option value="Diesel">Diesel</option>
                            <option value="LP">Gas LP</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Precio Litro:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="precio-input"  class="form-control" placeholder="20.20" step="0.01" required="required">
                    </div>
                </div>
            @elseif ($orden->getData()->data[0]->giro === 'Vertedero')
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Nota:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="nota-input"  class="form-control" placeholder="3412"  required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Hora:</label>
                    </div>
                    <div class="col-md-12">
                      <input type="text" id="hora-input"  class="form-control" placeholder="5:30 PM"  required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Peso Neto:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="peso-input"  class="form-control" placeholder="30" step="0.01" required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Precio:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="precio-input"  class="form-control" placeholder="5.20" step="0.01" required="required">
                    </div>
                </div>
            @else
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-orden">Cantidad:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="cantidad-input"  class="form-control" placeholder="3.5" step="0.01" required="required">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-password">Reciclable:</label>
                    </div>
                    <div class="col-md-12 text-center">
                        <input type="checkbox" name="" id="reciclable-check" />
                    </div>
                </div>
                <div id="reciclable-div" class="form-group hide">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-password">Tipo Reciclable:</label>
                    </div>
                    <div class="col-md-12">
                        <select id="reciclable-select" class="form-control" required="required">
                            <option value="0">Selecciona</option>
                            @foreach($reciclables as $key => $reciclable)
                                <option value="{!! $reciclable->id !!}">{!! $reciclable->reciclable !!}</option>
                            @endforeach
                        </select>
                    </div>
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-password">Cantidad Reciclable kg.:</label>
                    </div>
                    <div class="col-md-12">
                        <input type="number" id="cantidad-reciclable-input" name="example-hf-email" class="form-control" placeholder="---" step="0.01" >
                    </div>
                </div>
            @endif
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-password">Kilometraje:</label>
                    </div>
                    <div class="col-md-12">
                        <input class="form-control" type="number" id="km-input" placeholder="{!! $km !!}" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-12 text-center">
                        <label class="control-label" for="example-hf-password">Observaciones:</label>
                    </div>
                    <div class="col-md-12">
                        <textarea class="form-control" id="observaciones-input" placeholder="Ingresa tus observaciones" ></textarea>
                    </div>
                </div>
                <div class="form-group form-actions">
                    <div id="orden2-btn-div" class="col-md-12 text-center">
                        <button type="submit" id="orden2-btn" data-giro="{{ $orden->getData()->data[0]->giro }}" class="btn btn-lg btn-danger" data-km="{!! $km !!}" data-id="{!! $orden->getData()->data[0]->id !!}" onclick="Route.getTermino(this)"><i class="fa fa-stop"></i> Termino Orden</button>
                    </div>
                </div>
        </form>
    </div>
    @endif
</div>


                @yield('content')

                <!-- Footer -->
                <!-- END Footer -->
            </div>
            <!-- END Main Container -->
        </div>
        <!-- END Page Container -->

        <!-- Scroll to top link, initialized in js/app.js - scrollToTop() -->
        <a href="#" id="to-top"><i class="fa fa-angle-double-up"></i></a>


        <!-- Remember to include excanvas for IE8 chart support -->
        <!--[if IE 8]><script src="{!! URL::to('/').'/js/helpers/excanvas.min.js' !!}"></script><![endif]-->
        {!! Html::script("/js/app.js") !!}
        {!! Html::script("/js/movil/route.js") !!}

        <!-- Include Jquery library from Google's CDN but if something goes wrong get Jquery from local file (Remove 'http:' if you have SSL) -->
        <script>!window.jQuery && document.write(decodeURI('%3Cscript src="js/vendor/jquery-1.11.1.min.js"%3E%3C/script%3E'));</script>

        <!-- Bootstrap.js, Jquery plugins and Custom JS code -->
        <script src="{!! URL::to('/').'/js/vendor/bootstrap.min.js' !!}"></script>
        <script src="{!! URL::to('/').'/js/plugins.js' !!} "></script>

        <!-- Google Maps API + Gmaps Plugin, must be loaded in the page you would like to use maps (Remove 'http:' if you have SSL) -->
        <!-- Load and execute javascript code used only in this page -->
        <script src="{!! URL::to('/').'/js/pages/index.js' !!}"></script>
    </body>
</html>