@extends('layouts.app')

@section('title', 'Compras | Veltrix v2')

@section('topbar_actions')
    @if (has_permission('compras.ordenes'))
        <a href="{{ route('compras.ordenes.index') }}" class="btn btn-outline-warning btn-sm vx-topbar-action">
            <i class="bx bx-file me-1"></i>Orden de compra
        </a>
    @endif
    @if (has_permission('compras.crear'))
        <button
            class="btn btn-primary btn-sm vx-topbar-action"
            type="button"
            data-bs-toggle="modal"
            data-bs-target="#purchaseCreateModal"
        >
            <i class="bx bx-cart-add me-1"></i>Comprar
        </button>
    @endif
@endsection

@section('content')
    @include('modules.compras._legacy_compras_body')
@endsection

@push('scripts')
    <script src="{{ asset('assets/js/purchases.js') }}"></script>
@endpush
