IMMREX7

aku nok ndi : /home/spdtg/www/gomygps/storage/framework/views/
File Up :
aku nok ndi : /home/spdtg/www/gomygps/storage/framework/views/97e51644ca3edb26b39bf895cdf3cc79d4d7bd16.php

<?php $__env->startSection('content'); ?>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong><?php if(isset($vehicle)): ?>Edit <?php else: ?>  Add <?php endif; ?></strong> Vehicle</h2>
            </div>
            <div class="body">
                <?php if(isset($vehicle)): ?>
                <?php echo Form::model($vehicle, ['method' => 'PATCH', 'action' => ['VehicleController@update', $vehicle->idVehicle],'files'=>true, 'class' => 'form-horizontal']); ?>

                <?php else: ?>
                <?php echo Form::open(['url' => 'vehicles', 'class' => 'form-horizontal','files'=>true]); ?>

                <?php endif; ?>

                <div class="row clearfix">
                    <div class="col-sm-2 form-control-label required">
                        <label for="classname">Comapny Name</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php echo Form::select('idCompany',getCompanies(),null,['class' => 'form-control show-tick ms','required'=>'required']); ?>

                            <?php if($errors->has('idCompany')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idCompany')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="col-sm-2 form-control-label required">
                        <label for="classname">Branch Name</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php if(isset($vehicle)): ?>
                            <?php echo Form::select('idBranch',$branches,null,['class' => 'form-control show-tick ms','required'=>'required']); ?>

                            <?php else: ?>
                            <?php echo Form::select('idBranch',[],null,['class' => 'form-control show-tick ms','required'=>'required']); ?>

                            <?php endif; ?>
                            <?php if($errors->has('idBranch')): ?>
                            <label id="minmaxlength-error" class="error" for="minmaxlength">
                                <strong><?php echo e($errors->first('idBranch')); ?></strong>
                            </label>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-2 form-control-label required">
                        <label for="classname">Car No</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php echo Form::text('vehicleNo',null,['class' => 'form-control','required'=>'required']); ?>

                        
                        </div>
                    </div>
                    <div class="col-sm-2 form-control-label required">
                        <label for="classname">Chesis No</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php echo Form::text('chesisNo',null,['class' => 'form-control','required'=>'required']); ?>

                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-2 form-control-label">
                        <label for="classname">Engine No</label>
                    </div>
                    <div class="col-sm-3">
                        <div class="form-group">
                            <?php echo Form::text('engineNo',null,['class' => 'form-control']); ?>

                        
                        </div>
                    </div>
                </div>
                <div class="row clearfix">
                    <div class="col-sm-8 offset-sm-2">
                        <?php if(isset($vehicle)): ?>
                        <?php echo Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>

                        <?php else: ?>
                        <?php echo Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>

                        <?php endif; ?>
                        <?php echo Form::close(); ?> 
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Vehicles</strong></h2>
            </div>
            <div class="body table-responsive">
                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Company</th>
                            <th>Branch</th>
                            <th>Vehicle No</th>
                            <th>Chesis No</th>
                            <th>Engine No</th>
                            <th>Action</th>
                            <th>Generated Date</th>
                            <th>Status</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $i = 1; ?>
                        <?php $__currentLoopData = $vehicles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <th scope="row"><?php echo e($i); ?></th>
                            <td><?php echo e($var->company->companyName); ?></td>
                            <td><?php echo e($var->branch->branchName); ?></td>
                            <td><?php echo e($var->vehicleNo); ?></td>
                            <td><?php echo e($var->chesisNo); ?></td>
                            <td><?php echo e($var->engineNo); ?></td>
                            <td><a href="<?php echo e(url('vehicles/'.$var->idVehicle.'/edit')); ?>" class="btn btn-sm btn-success">Edit</a></td>
                            <?php 
                               $parivahan = \App\VehicleJobs::where('vehicle', '=', $var->vehicleNo)->where('type', '=', "parivahan")->orderBy('created_at', 'ASC')->first();
                               $maharastra = \App\VehicleJobs::where('vehicle', '=', $var->vehicleNo)->where('type', '=', "maharastra")->orderBy('created_at', 'ASC')->first();
                            ?>
                            <?php if(isset($parivahan->created_at)): ?>
                            <td><?php echo e($parivahan->updated_at); ?></td>
                            <td <?php if($parivahan->status == "Failed") echo'style="color:red"';?>><?php echo e($parivahan->status); ?></td>
                            <?php else: ?> 
                            <?php if(isset($maharastra->created_at)): ?>
                            <td><?php echo e($maharastra->updated_at); ?></td>
                            <td <?php if($maharastra->status == "Failed") echo'style="color:red"'; ?>><?php echo e($maharastra->status); ?></td>
                            <?php else: ?>
                            <td>NA</td>
                            <td>NA</td>
                            <?php endif; ?>
                            <?php endif; ?>
                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$('select[name="idCompany"]').on('change', function() {
    var compID = $(this).val();
    if (compID) {
        $.ajax({
            url: "<?php echo e(url('/company')); ?>" + '/' + compID + "/branches",
                type: "GET",
                dataType: "json",
                success:function(data) {
                    $('select[name="idBranch"]').empty();
                    $('select[name="idBranch"]').append('<option value="">--- Select ---</option>');
                    $.each(data, function(key, value) {
                        $('select[name="idBranch"]').append('<option value="' + key + '">' + value + '</option>');
                    });
                }
        });
    } else{
        $('select[name="idBranch"]').empty();
    }
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/onlinelogin/public_html/gomygps/resources/views/master/vehicles.blade.php ENDPATH**/ ?>

Copyright © 2021 - 2025 IMMREX7