@extends('layouts.master')
@section('admincontent')
<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0">Client Form</h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
            <li class="breadcrumb-item">Master</li>
            <li class="breadcrumb-item active">Client Form</li>
          </ol>
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>
  <!-- /.content-header -->

  <!-- Main content -->
  <section class="content">
    @if (Session::has('success'))
    <div class="alert alert-success alert-dismissible fade show" role="alert">
        {{ Session::get('success') }}
        @php
            Session::forget('success');
        @endphp
        <button type="button" class="close" data-dismiss="alert"
            aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    @endif
    <div class="container-fluid">
      <!-- /.row -->
      <!-- Main row -->
      <div class="row">
        <!-- Left col -->
        <section class="col-lg-12 connectedSortable">
          <!-- Custom tabs (Charts with tabs)-->
          <div class="card">
            <div class="card-header">
              {{-- <h3 class="card-title">
                <i class="fas fa-chart-pie mr-1"></i>
                Sales
              </h3> --}}
              <div class="card-tools">
                <ul class="nav nav-pills ml-auto">
                  {{-- <li class="nav-item">
                    <a class="nav-link active" href="#revenue-chart" data-toggle="tab">Area</a>
                  </li> --}}
                  <li class="nav-item">
                    <button value="Back" type="Button" onclick="history.go(-1);" class="btn btn-info float-right">Back</button>
                  </li>
                </ul>
              </div>
            </div><!-- /.card-header -->
            <div class="card-body">
                <form action="{{ route('client/store') }}" method="post" enctype="multipart/form-data">
                    @csrf
                    <div class="row">
                        <div class="col-lg-6">
                            <label for="">Client Name</label>
                            <input type="text" name="clientname" class="form-control" value="{{ old('clientname') }}">
                            <span class="text-danger error-text clientname_error"></span>
                            @error('clientname')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>

                        <div class="col-lg-6">
                            <label for="">Number</label>
                            <input type="text" class="form-control" name="phoneno" value="{{ old('phoneno') }}">
                            <span class="text-danger error-text phoneno_error"></span>
                            @error('phoneno')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>
                        <div class="col-lg-6">
                            <label for="">Email</label>
                            <input type="text" name="email" class="form-control" value="{{ old('email') }}">
                            <span class="text-danger error-text email_error"></span>
                            @error('email')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>

                        <div class="col-lg-3">
                            <label for="">Date of Birth</label>
                            <input type="date" name="dob" class="form-control" value="{{ old('dob') }}">
                            <span class="text-danger error-text dob_error"></span>
                            @error('dob')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>

                        <div class="col-lg-3">
                            <label for="">Profile Photo</label>
                            <input type="file" name="profile" class="form-control" value="{{ old('profile') }}">
                            <span class="text-danger error-text profile_error"></span>
                             @error('profile')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>

                        <div class="col-lg-12">
                            <label for="">Remarks</label>
                            <textarea name="remark" class="form-control" rows="3">{{ old('remark') }}</textarea>
                            <span class="text-danger error-text remark_error"></span>
                             @error('remark')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>
                    </div>
                    <div class="row mt-3">
                        <div class="col-lg-6">
                            <button type="submit" class="btn btn-primary">Submit</button>
                        </div>
                    </div>
                </form>
            </div><!-- /.card-body -->
          </div>
          <!-- /.card -->
        </section>
      </div>
      <!-- /.row (main row) -->
    </div><!-- /.container-fluid -->
  </section>
@endsection
