@extends('layouts.app')

@section('title', 'Create Qty Type')
@section('page-title', 'Create Qty Type')

@section('content')
    <div class="card">
        <div class="card-header">
            <h1 class="h3 mb-0 page-title-theme">Create Qty Type</h1>
        </div>
        <div class="card-body">
            @if(session('success'))
                <div class="alert alert-success">{{ session('success') }}</div>
            @endif

            @if($errors->any())
                <div class="alert alert-warning">
                    <ul class="mb-0">
                        @foreach($errors->all() as $err)
                            <li>{{ $err }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif

            <form method="POST" action="{{ route('qty_types.store') }}">
                @csrf

                <div class="row">
                    <div class="col-12 col-md-6 mb-3">
                        <label class="form-label">Qty Type</label>
                        <input type="text" name="qty_type" class="form-control" value="{{ old('qty_type') }}" required>
                    </div>
                </div>

                <div class="row">
                    <div class="col-12 d-grid gap-2 d-md-flex justify-content-md-end">
                        <a href="{{ route('qty_types.index') }}" class="btn btn-outline-secondary">Cancel</a>
                        <button class="btn btn-primary">Create</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection
