<form class="row g-3 auto-width" method="post" action="{{ route('departments.update', $data->id) }}">
    @csrf
    @method('patch')
    <div class="col-12">
        <label for="name" class="form-label">Name<span class="text-danger"><b>*</b></span></label>
        <input type="text" value="{{ $data->name }}" class="form-control name" id="name" name="name" aria-describedby="inputGroupPrepend" placeholder="Name">
        <span class="text-danger error_department_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-12">
        <label for="code" class="form-label">code<span class="text-danger"><b>*</b></span></label>
        <input readonly type="text"  value="{{ $data->code }}" class="form-control code" id="code" name="code" aria-describedby="inputGroupPrepend" placeholder="code">
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="priority" class="form-label">Priority </label>
        <input type="number" class="form-control" name="priority" aria-describedby="inputGroupPrepend" required value="{{ $data->priority }}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>
    <div class="col-6">
        <label for="details" class="form-label">Description
        </label>
        <textarea name="description" id="description" class="form-control description" cols="30" rows="2">{{ $data->description }}</textarea>
    </div>
</form>
