<form class="row g-3 auto-width task_entry" action="{{ route('task-entry.update', $data->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('PUT')
     <!-- Assign By -->
     <div class="col-md-12" style="display: none;">
        <div>
            <label for="assigned_by_id" class="form-label">Assign To <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="assigned_by_id">
                <option value="">--Select --</option>
                @foreach($assign_to as $list)
                 <option value="{{ $list->id }}" {{ $list->id == $data->assigned_by_id ? 'selected':'' }}>{{ $list->name }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_assigned_by_id" style="display: none;">This field is required.</span>
    </div>
    <!-- Assign To -->
    <div class="col-md-12">
        <div>
            <label for="assigned_to_id" class="form-label">Assign To <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="single-select form-control" name="assigned_to_id">
                <option value="">--Select --</option>
                @foreach($assign_to as $list)
                 <option value="{{ $list->id }}" {{ $list->id == $data->assigned_to_id ? 'selected':'' }}>{{ $list->name }} ({{ $list->email }}) {{ $list->prepared_by }}</option>
                @endforeach
            </select>
        </div>
        <span class="text-danger error_assigned_to_id" style="display: none;">This field is required.</span>
    </div>
     <!-- Assign date -->
     <div class="col-md-12">
        <div>
            <label for="assigned_date" class="form-label"> Assigned Date </label>
        </div>
        <div class="input-group">
            <input type="" name="assigned_date" class="form-control" id="assigned_date" value="{{$data->assigned_date}}" autocomplete="off" placeholder="Select Assigned Date" readonly style="cursor: pointer;">
        </div>
        @if ($errors->has('assigned_date'))
            <span class="text-danger">{{ $errors->first('assigned_date') }}</span>
        @endif
        <span class="text-danger error_assigned_date" style="display: none;">This field is required.</span>
     </div>
     <!-- expected_completion_date -->
     <div class="col-md-12">
        <div>
            <label for="expected_completion_date" class="form-label"> Expected Completion Date </label>
        </div>
        <div class="input-group">
            <input type="" name="expected_completion_date" class="form-control" id="expected_completion_date" autocomplete="off" placeholder="Select Expected Completion Date" value="{{$data->expected_completion_date}}" readonly style="cursor: pointer;">
        </div>
        @if ($errors->has('expected_completion_date'))
            <span class="text-danger">{{ $errors->first('expected_completion_date') }}</span>
        @endif
        <span class="text-danger error_expected_completion_date" style="display: none;">This field is required.</span>
     </div>
     <!-- actual_completion_date -->
     <div class="col-md-12">
        <div>
            <label for="actual_completion_date" class="form-label"> Actual Completion Date </label>
        </div>
        <div class="input-group">
            <input type="" name="actual_completion_date" class="form-control" id="actual_completion_date" autocomplete="off" placeholder="Select Actual Completion Date" value="{{$data->actual_completion_date}}" readonly style="cursor: pointer;">
        </div>
        @if ($errors->has('actual_completion_date'))
            <span class="text-danger">{{ $errors->first('actual_completion_date') }}</span>
        @endif
        <span class="text-danger error_actual_completion_date" style="display: none;">This field is required.</span>
     </div>
    <!-- hidden project id -->
    <input type="hidden" name="task_id" value="{{$data->task_id}}">
</form>
