@extends('template.app')

@section('meta')
@endsection

@section('title')
    Extended Warranty View
@endsection

@section('styles')
@endsection

@section('content')
<div class="page-breadcrumb">
    <div class="row">
        <div class="col-7 align-self-center">
            <h4 class="page-title text-truncate text-dark font-weight-medium mb-1">Extended Warranty Master</h4>
            <div class="d-flex align-items-center">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb m-0 p-0">
                        <li class="breadcrumb-item"><a href="{{ route('dashboard') }}" class="text-muted">Dashboard</a></li>
                        <li class="breadcrumb-item"><a href="{{ route('extand_warranties') }}" class="text-muted">Extended Warranty Master</a></li>
                        <li class="breadcrumb-item text-muted active" aria-current="page">View</li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <form action="{{ route('extand_warranties.view') }}" name="form" id="form" method="post" enctype="multipart/form-data">
                        @csrf
                        @method('POST')

                        <div class="row">
                            <div class="form-group col-sm-3">
                                <label for="car_model">Car Model</label>
                                <select class="form-control" name="car_model" id="car_model" disabled>
                                    <option value="">Select Car Model</option>
                                    @if(isset($Carmodel) && $Carmodel->isNotEmpty())
                                        @foreach($Carmodel as $car_model)
                                            <option value="{{ $car_model->id }}" @if($data->car_model == $car_model->id) selected @endif >{{ ucfirst(str_replace('_', ' ', $car_model->name)) }}</option>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error car_model"></span>
                            </div>  

                            <div class="form-group col-sm-3">
                                <label for="fule_type">Fuel Type</label>
                                <select class="form-control" name="fule_type" id="fule_type" disabled>
                                    <option value="">Select Fuel Type</option>
                                    @if(isset($Fuletype) && $Fuletype->isNotEmpty())
                                        @foreach($Fuletype as $fule_type)
                                            <option value="{{ $fule_type->id }}" @if($data->fule_type == $fule_type->id) selected @endif>{{ ucfirst(str_replace('_', ' ', $fule_type->title)) }}</option>
                                        @endforeach
                                    @endif
                                </select>
                                <span class="kt-form__help error fule_type"></span>
                            </div> 
                            <div class="form-group col-sm-3">
                                <label for="years">Plan Name</label>
                                <input type="text" name="years" id="years" class="form-control" placeholder="Enter Plan Name" value="{{ $data->years ??'' }}" disabled>
                                <span class="kt-form__help error years"></span>
                            </div>
                            <div class="form-group col-sm-3">
                                <label for="amount">Amount</label>
                                <input type="text" name="amount" id="amount" class="form-control" placeholder="Enter Amount" value="{{ $data->amount ??'' }}" disabled>
                                <span class="kt-form__help error amount"></span>
                            </div>
                            <div class="form-group col-sm-3">
                                <label for="profit">Profit</label>
                                <input type="number" name="profit" id="profit" class="form-control" placeholder="Enter Profit Amount" value="{{ $data->profit ??'' }}" disabled>
                                <span class="kt-form__help error profit"></span>
                            </div>
                            <div class="form-group col-sm-3">
                                <label for="gst_percentage">GST %</label>
                                <input type="number" name="gst_percentage" id="gst_percentage" class="form-control" placeholder="Enter GST Percentage" value="{{ $data->gst_percentage ??'' }}" disabled>
                                <span class="kt-form__help error gst_percentage"></span>
                            </div>
                            <div class="form-group col-sm-3">
                                <label for="gst">GST</label>
                                <input type="number" name="gst" id="gst" class="form-control" placeholder="Enter GST" value="{{ $data->gst ??'' }}" disabled>
                                <span class="kt-form__help error gst"></span>
                            </div>
                            <div class="form-group col-sm-3">
                                <label for="total_profit">Total Profit</label>
                                <input type="number" name="total_profit" id="total_profit" class="form-control" placeholder="Enter Total Profit" value="{{ $data->total_profit ??'' }}" disabled>
                                <span class="kt-form__help error total_profit"></span>
                            </div>
                        </div>
                        <div class="form-group">
                  
                            <a href="{{ route('extand_warranties') }}" class="btn waves-effect waves-light btn-rounded btn-outline-secondary">Back</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

@section('scripts')
@endsection