Files
portal-api/resources/views/administrator/pages/invoice/index.blade.php
T

54 lines
2.1 KiB
PHP

@extends('administrator.layout.master')
@push('plugin-styles')
@foreach (config('assets.datatable.css') as $datatable)
<link href="{{ asset($datatable) }}" rel="stylesheet" />
@endforeach
@endpush
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Invoice'],
['label' => 'Invoice Management'],
['label' => 'Invoice List', 'active' => true],
];
@endphp
<x-admin-breadcrumb :items="$breadcrumbItems" />
@endsection
@section('content')
@if(auth()->guard('admins')->user()->can("manager invoice"))
<div class="card card-primary card-outline rounded-4 shadow-none">
<div class="card-header bg-white d-flex justify-content-end gap-2 rounded-top-4">
<x-button-c-r-m route="administrator.pages.invoice.create" variant="primary" size="sm" icon="plus">
Add New Invoice
</x-button-c-r-m>
</div>
<div class="card-body p-0">
@php
$invoiceColumns = [
['key' => 'invoice_num', 'label' => 'Invoice #'],
['key' => 'date', 'label' => 'Date'],
['key' => 'customer', 'label' => 'Client Name'],
['key' => 'payment', 'label' => 'Payment Method'],
['key' => 'total', 'label' => 'Total'],
['key' => 'status', 'label' => 'Status'],
['key' => 'action', 'label' => 'Action'],
];
@endphp
<x-datatable id="invoiceTable" ajax="{{ route('administrator.pages.invoice.datatable') }}" :columns="$invoiceColumns" />
</div>
</div>
@else
<div class="alert alert-danger alert-dismissible">
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Invoice
management department</h5>
</div>
@endif
@endsection
@push('plugin-scripts')
@foreach (config('assets.datatable.js') as $datatable)
<script src="{{ asset($datatable) }}"></script>
@endforeach
@endpush