![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/clinic.corals.io/resources/assets/js/transactions/ |
'use strict'; let tableName = '#transactionsTable'; $(document).ready(function () { let tbl = $(tableName).DataTable({ processing: true, serverSide: true, searchDelay: 500, 'language': { 'lengthMenu': 'Show _MENU_', }, 'order': [[0, 'desc']], ajax: { url: route('patients.transactions'), }, columnDefs: [ { 'targets': [0], 'width': '50%', }, { 'targets': [1], 'width': '18%', }, { 'targets': [2], 'orderable': false, 'searchable': false, 'className': 'text-center', 'width': '8%', }, ], columns: [ { data: function (row) { return `<span class="badge badge-light-info">${moment.parseZone( row.created_at).format('Do MMM, Y h:mm A')}</span>`; }, name: 'created_at', }, { data: function (row) { return currencyIcon + ' ' + getFormattedPrice(row.amount); }, name: 'amount', }, { data: function (row) { let data = [ { 'id': row.id, 'showUrl': route('patients.transactions.show', row.id), }, ]; return prepareTemplateRender('#transactionsTemplate', data); }, name: 'id', }, ], }); handleSearchDatatable(tbl); });