<form class="row g-3 auto-width task_types" action="{{ route('task.store')}}" method="post" enctype='multipart/form-data'>
    @csrf
    <!-- date-->
    <div class="col-md-6"  style="z-index: 1500;">
        <div><label for="date" class="form-label"> Date <span class="text-danger"><b>*</b></span></label></div>
        <div class="input-group">
            <input type="" name="date" class="form-control" id="date" autocomplete="off" readonly style="cursor: pointer;">
        </div>
        @if ($errors->has('date'))
            <span class="text-danger">{{ $errors->first('date') }}</span>
        @endif
    </div>
    <!-- Assign to-->
    <div class="col-md-6">
        <div>
            <label for="assigned_to" class="form-label">Assign To </label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="assigned_to">
                <option value="">--Select Assign To -- </option>
                @foreach($assignTo as $list)
                <option value="{{ $list->id }}">{{ $list->name }} ({{ $list->email }})</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_assigned_to" style="display: none;">This field is required.</span>
    </div>
     <!-- Title -->
     <div class="col-md-12">
        <label for="title" class="form-label">Task Title <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="title" name="title" aria-describedby="inputGroupPrepend" required>
        @if ($errors->has('title'))
        <span class="text-danger">{{ $errors->first('title') }}</span>
        @endif
        <span class="text-danger error_title" style="display: none;">This field is required.</span>
    </div>
     <!-- Title Details-->
     <div class="col-md-12">
        <label class="form-label">Details</label>
        <textarea class="form-control" max=100 id="details" name="details"> </textarea>
        @if ($errors->has('details'))
        <span class="text-danger">{{ $errors->first('details') }}</span>
        @endif
        <span class="text-danger error_details" style="display: none;">This field is required.</span>
    </div>
     <!-- Account-->
    <div class="col-md-6">
        <div>
            <label class="form-label">Client </label>
        </div>
        <div class="input-group autocomplete">
            <input type="text" name="" id="account_id" class="account-select form-control" placeholder="Search Account">
            <ul class="searchResult"></ul>
            <input type="hidden" name="account_id" value="">
        </div>
        <span class="text-danger error_account_id" style="display:none;">This field is required.</span>
    </div>
    <!-- Amount-->
    <div class="col-md-6">
        <label class="form-label">Amount</label>
        <input type="number" class="form-control" id="amount" name="amount" aria-describedby="inputGroupPrepend" required>
        @if ($errors->has('amount'))
        <span class="text-danger">{{ $errors->first('amount') }}</span>
        @endif
        <span class="text-danger error_amount" style="display: none;">This field is required.</span>
    </div>
     <!-- Charge ID-->
     <div class="col-md-6">
        <div>
            <label for="charges_id" class="form-label">Task Charge</label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="charges_id">
                <option value="">--Select Charge -- </option>
                @foreach($charge_id as $list)
                <option value="{{ $list->id }}">{{ $list->name }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_charges_id" style="display: none;">This field is required.</span>
    </div>
    <!-- deadline-->
    <div class="col-md-6"  style="z-index: 1500;">
        <div><label for="deadline" class="form-label"> deadline </span></label></div>
        <div class="input-group">
            <input type="" name="deadline" class="form-control" id="deadline" autocomplete="off" readonly style="cursor: pointer;">
        </div>
        @if ($errors->has('deadline'))
            <span class="text-danger">{{ $errors->first('deadline') }}</span>
        @endif
    </div>
    <input type="hidden" name="project_id">
    <!-- Project-->
    {{-- <div class="col-md-6">
        <div>
            <label for="project_id" class="form-label">Projects <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="project_id">
                <option value="">--Select Project --</option>
                @foreach($project as $list)
                <option value="{{ $list->id }}">{{ $list->title }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_project_id" style="display: none;">This field is required.</span>
    </div> --}}
    <!-- Task  Type-->
    {{-- <div class="col-md-6">
        <div>
            <label for="task_type_id" class="form-label">Task Type <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="task_type_id">
                <option value="">--Select Project --</option>
                @foreach($taskType as $list)
                <option value="{{ $list->id }}">{{ $list->title }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_task_type_id" style="display: none;">This field is required.</span>
    </div> --}}


    <!-- Module code-->
    {{-- <div class="col-md-6">
        <div>
            <label for="module_code" class="form-label">Module Code <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="module_code">
                <option value="">--Select Project --</option>
                @foreach($module_code as $list)
                <option value="{{ $list->id }}">{{ $list->code }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_module_code" style="display: none;">This field is required.</span>
    </div> --}}

    <!-- chargable-->
    {{-- <div class="col-md-6">
        <label class="form-label">Chargable<span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" id="chargable" name="chargable" aria-describedby="inputGroupPrepend" required>
        @if ($errors->has('chargable'))
        <span class="text-danger">{{ $errors->first('chargable') }}</span>
        @endif
        <span class="text-danger error_chargable" style="display: none;">This field is required.</span>
    </div> --}}
    <!-- cost-->
    {{-- <div class="col-md-6">
        <label class="form-label">Cost<span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" id="cost" name="cost" aria-describedby="inputGroupPrepend" required>
        @if ($errors->has('cost'))
        <span class="text-danger">{{ $errors->first('cost') }}</span>
        @endif
        <span class="text-danger error_cost" style="display: none;">This field is required.</span>
    </div> --}}
    <!-- sale_price-->
    {{-- <div class="col-md-6">
        <label class="form-label">Sale Price<span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" id="sale_price" name="sale_price" aria-describedby="inputGroupPrepend" required>
        @if ($errors->has('sale_price'))
        <span class="text-danger">{{ $errors->first('sale_price') }}</span>
        @endif
        <span class="text-danger error_sale_price" style="display: none;">This field is required.</span>
    </div> --}}
</form>
