<form action="{{ route('cashier.store') }}" method="POST">
    @csrf
    <div class="form-group row">
        <div class="col-md-6">
            <label>Nama Lengkap</label>
            <input type="text" name="name" class="form-control @error('name') is-invalid @enderror"
                placeholder="Nama Lengkap" value="{{ old('name') }}">
            @error('name')
                <div class="invalid-feedback">
                    {{ $message }}
                </div>
            @enderror
        </div>
        <div class="col-md-6">
            <label>Email</label>
            <input type="text" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="Email"
                value="{{ old('email') }}">
            @error('email')
                <div class="invalid-feedback">
                    {{ $message }}
                </div>
            @enderror
        </div>
    </div>
    <div class="form-group row">
        <div class="col-md-6">
            <label for="">Cabang</label>
            <select name="branch" id="" class="form-control select2">
                <option value="">---Pilih Cabang---</option>
                @foreach ($branch as $item)
                    <option value="{{ $item->id }}" {{ old('branch') == $item->id ? ' selected' : '' }}>
                        {{ $item->cabang }}</option>
                @endforeach
            </select>
        </div>
        <div class="col-md-6">
            <label for="">Level</label>
            <select name="level" id="" class="form-control select2 @error('level') is-invalid @enderror">
                <option value="">---Pilih Level---</option>
                <option value="0">Admin</option>
                <option value="1">Kasir</option>
            </select>
        </div>
    </div>


    <button type="submit" class="btn btn-primary mr-2"><i class="fa fa-save"></i> Simpan</button>
    <button type="reset" class="btn btn-default"><i class="fa fa-times"></i> Reset</button>
</form>
