new: make the eye icon work to see an invoice in admin customer view
This commit is contained in:
@@ -4,8 +4,28 @@
|
||||
'model' => 'customer_invoices',
|
||||
'with_print' => false,
|
||||
'with_filters' => false,
|
||||
'show_callback' => 'AdminCustomerInvoiceView(id);',
|
||||
])
|
||||
<x-layout.modal title="Filtres" id="modal-customer_invoices-filters">
|
||||
@include('Admin.Shop.CustomerInvoices.partials.filters', ['model' => 'customer_invoices'])
|
||||
</x-layout.modal>
|
||||
</x-card>
|
||||
|
||||
@include('load.layout.modal')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
(function() {
|
||||
const customerInvoiceShowTemplate = "{{ route('Shop.Invoices.view', ['uuid' => '__UUID__']) }}";
|
||||
|
||||
window.AdminCustomerInvoiceView = function(id) {
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = customerInvoiceShowTemplate.replace('__UUID__', id);
|
||||
openModal('Voir une facture', '#invoice-form', url, false, false, 'xl', true);
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user