@extends('layouts.config_dashboard.app')

@section('content')
    <div class="container-fluid mt-4 ">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body mt-1">
                        <form action="{{ route('Piece.update', $piece->id) }}" method="post">
                            @csrf
                            @method('PUT')

                            <div class="col-6 mb-2">
                                <label for="brand">Type Piece</label>
                                <input type="text" readonly name="piece" value="{{ $piece->piecetype->type }}"
                                    class="form-control ">

                            </div>
                            <div class="col-md-6">
                                <div class="form-group mb-1">
                                    <label for="piece">Piéce</label>
                                    <input type="text" name="piece" value="{{ $piece->piece }}" required
                                        class="form-control @error('piece') is-invalid @enderror">
                                    @error('piece')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>



                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary">Modifier</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    @endsection

