@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">Sales POC 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">Sales POC 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('sales/poc/update') }}" method="post">
                    @csrf
                    @foreach ($salespoc as $sales)
                    <div class="row">
                        <input type="hidden" name="id" value="{{ $sales->id }}" readonly/>
                        <div class="col-lg-12">
                            <label for="">Name</label>
                            <input type="text" name="name" class="form-control" value="{{ $sales->name }}">
                            <span class="text-danger error-text name_error"></span>
                            @error('name')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>
                        <div class="col-lg-12">
                            <label for="">Remark</label>
                            <textarea name="remark" class="form-control" rows="3">{{ $sales->remark }}</textarea>
                            <span class="text-danger error-text remark_error"></span>
                             @error('remark')
                                <div class="text-danger">{{ $message }}</div>
                            @enderror
                        </div>
                    </div>
                    @endforeach
                    <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
