<form class="row g-3 auto-width rooms_update" action="{{ route('rooms.update', $room->id) }}" method="post" enctype='multipart/form-data'
    id="source_form">
    @csrf
    @method("PATCH")
     <!-- Room Number -->
    <div class="col-md-12">
        <label for="name" class="form-label">Room Number <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="room_number" name="room_number" aria-describedby="inputGroupPrepend" placeholder="Example:- 001"
           value="{{$room->room_number}}" required>
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
    <!-- Room Name -->
    <div class="col-md-12">
        <label for="name" class="form-label">Room Name</label>
        <input type="text" class="form-control" id="room_name" name="room_name" aria-describedby="inputGroupPrepend" placeholder="Enter Room Name" required value="{{$room->room_name}}">
        <span class="text-danger error_room_name" style="display:none;">This field is required.</span>
    </div>
     <!-- Building -->
     <div class="col-md-6">
        <label for="validationCustom01" class="form-label">Building <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="building_id">
            @foreach ($building as $list)
                <option value="{{ $list->id }}" {{ $list->id == $room->building_id ? 'selected':'' }}>{{ $list->name }}</option>
            @endforeach
        </select>
        <span class="text-danger error_building_id" style="display:none;">This field is required.</span>
    </div>
    <!-- FLoor -->
    <div class="col-md-6">
        <label for="validationCustom01" class="form-label">Floor <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="floor_id">
            @foreach ($floor as $list)
                <option value="{{ $list->id }}" {{ $list->id == $room->floor_id ? 'selected':'' }}>{{ $list->name }}</option>
            @endforeach
        </select>
        <span class="text-danger error_floor_id" style="display:none;">This field is required.</span>
    </div>
   
        
        <!-- Priority -->
    <div class="col-md-6">
        <label for="priority" class="form-label">Priority <span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" name="priority" aria-describedby="inputGroupPrepend"  required value="{{$room->priority}}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
</form>
