@extends('backend.header')
@section('index-content')
<style>
  .add-btn{
    width: auto !important;
    height: 31px !important;
    border-radius: 3px !important;
    line-height: 16px !important;
  }
  .table-bordered>tbody>tr>td{
        vertical-align: middle !important;
    }
  .table-responsive:nth-child(2) {
      width: 100%;
      height: 75vh;
  }
  .table-responsive:first-child{
      overflow-x: hidden;
  }
  th,
  td {
      white-space: nowrap;
  }
  /*table tr td:first-child {
      position: sticky;
      width: 50px;
      left: 0;
      background: #fff;
      color: #000;
      z-index: 9;
  }
  table tr td:nth-child(2) {
      position: sticky;
      left: 65px;
      background: #fff;
      color: #000;
      z-index: 9;
  }*/
  table tr th:first-child {
      position: sticky;
      width: 50px;
      left: 0;
      background: #c3e6cb !important;
      color: #000;
      z-index: 10;
  }
  table tr th:nth-child(2) {
      position: sticky;
      left: 65px;
      background: #c3e6cb !important;
      color: #000;
      z-index: 10 !important;
  }
  tr.table-success {
      position: sticky;
      left: 0;
      z-index: 10;
/*        background: #fff !important;*/
  }
  tr.table-success {
      top: 0px !important;
      position: sticky !important;
  }
  .table-success,
    .table-success > td,
    .table-success > th {
        background-color: #c3e6cb;
    }
</style>
<?php
function convertToUnicodeNumber($input) {
    
    $standard_numsets = array("0","1","2","3","4","5","6","7","8","9");
    $devanagari_numsets = array("०","१","२","३","४","५","६","७","८","९");
    
    return str_replace($standard_numsets, $devanagari_numsets, $input);
  }
?>
                <section role="main" class="content-body">
                    <header class="page-header">
                        <div class="row px-4">
                            <div class="col-lg-5 pl-0">
                                <h2>Make  Form</h2> 
                            </div>
                        
                            <div class="col-lg-5">
                                <ol class="breadcrumbs">
                                    <li>
                                        <a href="{{url('index')}}">
                                            <i class="fa fa-home"></i>
                                        </a>
                                    </li>
                                    <li><span>Make Form</span></li>
                                </ol>
                            </div>
                        </div>
                    </header>
                    <!-- <header class="page-header">
                        <h2>Make  Form</h2>
                    </header>
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="right-wrapper">
                                <ol class="breadcrumbs">
                                    <li>
                                        <a href="{{url('index')}}">
                                            <i class="fa fa-home"></i>
                                        </a>
                                    </li>
                                    <li><span>Make Form</span></li>
                                </ol>
                            </div>
                        </div>
                    </div> -->

                    <!-- start: page -->
                    <div class="row" id="useraddform">
                        <div class="col-md-12 mt-2">
                            <form id="form" action="{{route('make_view.store')}}" class="form-horizontal" method="post">
                            @csrf
                                <section class="panel">
                                    <header class="panel-heading">
                                        <h4 class="my-0">Make Create Form</h4>
                                        <div class="panel-actions">
                                            <a href="#" class="fa fa-caret-down"></a>
                                            <a href="#" class="fa fa-times"></a>
                                        </div>
                                       
                                    </header>
                                    <div class="panel-body">
                                        <div class="row">
                                            <div class="col-md-9">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label"> Make Name <span class="required">*</span></label>
                                            <div class="col-sm-9">
                                                <input type="text" name="name" class="form-control" required pattern="[A-Za-z ]{0,100}" title="Enter Valid Name">
                                                @error('name')
                                                <font size="3" color="red">{{$message}}</font>
                                                @enderror   
                                            </div>
                                        </div>

                                    <!-- 
                                        <div class="col-12">
                                            <div class="text-right">
                                                <button class="btn btn-success" type="submit">Submit</button>
                                            </div>
                                        </div> -->
                                    </div>
                                    <div class="col-md-3"> 
                                         <div class="text-left">
                                                <button class="btn btn-success" type="submit">Submit</button>
                                            </div>
                                    </div>
                                </div>
                            </div>

                                </section>
                            </form>
                        </div>
                        
                    </div>
                    
                   
                    <section class="panel">
                            <header class="panel-heading">
                                <h4 class="my-0">User Details</h4>
                               <div class="panel-actions">
                                    <a href="#" class="fa fa-caret-down"></a>
                                    <a href="#" class="fa fa-times"></a>
                                </div>
                            </header>
                            <div class="panel-body pt-5 px-0">
                                <table class="table table-bordered table-striped mb-none mt-0" id="datatable-default">
                                    <thead>
                                        <tr class="table-success">
                                             <th>S.No</th>
                                             <th>Id No</th> 
                                            <th>Make Name</th>
                                            
                                            
                                            <th>Edit</th>
                                            <th>Delete</th>
                                           
                                            
                                        </tr>
                                         <?php 
                                           $count=0;
           
                                          ?>

                                    </thead>
                                    <tbody>
                                    @foreach($makeslist  as $a)
                                    <?php
                                     $count++;
                                     ?>
                                    <tr class="gradeX">
                                         <td>{{$count}}</td>
                                            <td>{{$a->id}}</td> 
                                            <td>{{$a->name}}</td>
                                           
                                            <!-- <td>{{$a->password}}</td> -->
                                                
                                            <td class="actions">
                                                
                                                <a href="{{route('make_view.edit',$a->id)}}"  class="on-default edit-row"><button class="btn btn-primary">Edit</button></a></td>
                                                <td><form action="{{route('make_view.destroy',$a->id)}}" method="post">
                                                @csrf
                                                @method('DELETE')
                                                <input type="submit"onclick="return confirm('Are you sure you want to delete {{$a->name}}');" class="btn btn-danger" value="Delete">
                                                </form>
                                            </td>
                                            
                                    </tr>
                                    @endforeach
                                    </tbody>
                                </table>
                            </div>
                        </section>
                </section>
              @stop