<form class="row g-3 auto-width" action="{{ route('product-location-rack.update', $location->id) }}" method="post" enctype='multipart/form-data'
    id="source_form">
    @csrf
    @method("PATCH")
    <div class="col-md-12">
        <label for="name" class="form-label">Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="name" name="name" aria-describedby="inputGroupPrepend"
            required value="{{$location->name}}">
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="code" class="form-label">code <span class="text-danger"><b>*</b></span></label>
        <input readonly type="text" class="form-control" id="code" name="code" aria-describedby="inputGroupPrepend"   required value="{{$location->code}}">
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="company_id" class="form-label">Company <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="company_id">
            @foreach ($company as $list)
                <option value="{{ $list->id }}" {{ $list->id == $location->company_id ? 'selected':'' }}>{{ $list->name }}</option>
            @endforeach
        </select>
        <span class="text-danger error_country_id" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="warehouse_id" class="form-label">Warehouse <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="warehouse_id">
            @foreach ($warehouse as $list)
                <option value="{{ $list->id }}" {{ $list->id == $location->warehouse_id ? 'selected':'' }}>{{ $list->name }}</option>
            @endforeach
        </select>
        <span class="text-danger error_country_id" style="display:none;">This field is required.</span>
    </div>
</form>
