diff --git a/cp/resources/views/admin/domains/listApplications.twig b/cp/resources/views/admin/domains/listApplications.twig index 6ad4fdb..a25e64f 100644 --- a/cp/resources/views/admin/domains/listApplications.twig +++ b/cp/resources/views/admin/domains/listApplications.twig @@ -57,6 +57,7 @@
+ diff --git a/cp/resources/views/admin/domains/listDomains.twig b/cp/resources/views/admin/domains/listDomains.twig index 9074d1c..68f224e 100644 --- a/cp/resources/views/admin/domains/listDomains.twig +++ b/cp/resources/views/admin/domains/listDomains.twig @@ -62,6 +62,7 @@
+ diff --git a/cp/resources/views/admin/financials/overview.twig b/cp/resources/views/admin/financials/overview.twig index 43b14ef..d6c0cbc 100644 --- a/cp/resources/views/admin/financials/overview.twig +++ b/cp/resources/views/admin/financials/overview.twig @@ -44,6 +44,7 @@
+ diff --git a/cp/resources/views/admin/financials/transactions.twig b/cp/resources/views/admin/financials/transactions.twig index ea3f730..74f96a5 100644 --- a/cp/resources/views/admin/financials/transactions.twig +++ b/cp/resources/views/admin/financials/transactions.twig @@ -44,6 +44,7 @@
+ diff --git a/cp/resources/views/partials/js-applications.twig b/cp/resources/views/partials/js-applications.twig index 340ab1d..63c2dc7 100644 --- a/cp/resources/views/partials/js-applications.twig +++ b/cp/resources/views/partials/js-applications.twig @@ -93,6 +93,11 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + paginationCounter:"rows", + paginationCounterElement:"#page-count", + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/dapi/applications", ajaxURLGenerator: function(url, config, params) { @@ -130,21 +135,22 @@ var lastPage = Math.ceil(response.results / this.options.paginationSize); return { last_page: lastPage, // Calculated total number of pages + last_row: response.results, // Total number of rows data: response.records, // Data for the current page }; } else { console.error('Unexpected response format', response); - return { last_page: 1, data: [] }; + return { last_page: 1, last_row: 0, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0}, + {title:"{{ __('Name') }}", field:"name", width:150, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0}, {title:"{{ __('Applicant') }}", width:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Creation Date') }}", width:250, minWidth:150, field:"crdate", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Phase') }}", width:150, minWidth:100, field:"phase_type", formatter: phaseFormatter, resizable:false, headerSort:true, responsive:2}, @@ -178,22 +184,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "applications.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "applications.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Applications"}); + table.download("xlsx", "applications.xlsx", {sheetName:"My Applications"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "applications.pdf", { orientation:"portrait", - title:"My Applications", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Applications" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-contacts.twig b/cp/resources/views/partials/js-contacts.twig index 383c667..7a327e4 100644 --- a/cp/resources/views/partials/js-contacts.twig +++ b/cp/resources/views/partials/js-contacts.twig @@ -32,6 +32,9 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/api/records/contact", ajaxURLGenerator: function(url, config, params) { @@ -75,14 +78,14 @@ return { last_page: 1, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Identifier') }}", field:"identifier", width:250, resizable:false, headerSort:true, formatter: contactLinkFormatter, responsive:0}, + {title:"{{ __('Identifier') }}", field:"identifier", width:200, resizable:false, headerSort:true, formatter: contactLinkFormatter, responsive:0}, {title:"{{ __('Email') }}", field:"email", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Phone') }}", field:"voice", width:200, minWidth:100, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Creation Date') }}", field:"crdate", width:280, minWidth:100, resizable:true, headerSort:true, responsive:2}, @@ -115,22 +118,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "contacts.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "contacts.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Contacts"}); + table.download("xlsx", "contacts.xlsx", {sheetName:"My Contacts"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "contacts.pdf", { orientation:"portrait", - title:"My Contacts", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Contacts" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-domains.twig b/cp/resources/views/partials/js-domains.twig index 6540a87..1760efd 100644 --- a/cp/resources/views/partials/js-domains.twig +++ b/cp/resources/views/partials/js-domains.twig @@ -68,6 +68,11 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + paginationCounter:"rows", + paginationCounterElement:"#page-count", + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/dapi/domains", ajaxURLGenerator: function(url, config, params) { @@ -105,22 +110,23 @@ var lastPage = Math.ceil(response.results / this.options.paginationSize); return { last_page: lastPage, // Calculated total number of pages + last_row: response.results, // Total number of rows data: response.records, // Data for the current page }; } else { console.error('Unexpected response format', response); - return { last_page: 1, data: [] }; + return { last_page: 1, last_row: 0, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0}, - {title:"{{ __('Registrant') }}", width:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2}, + {title:"{{ __('Name') }}", field:"name", minWidth:180, resizable:false, headerSort:true, formatter: domainLinkFormatter, responsive:0}, + {title:"{{ __('Registrant') }}", minWidth:200, field:"registrant_identifier", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Creation Date') }}", width:250, minWidth:150, field:"crdate", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Expiration Date') }}", width:250, minWidth:150, field:"exdate", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Status') }}", width:150, field:"domain_status", formatter: statusFormatter, resizable:false, headerSort:true, download:false, responsive:2}, @@ -177,22 +183,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "domains.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "domains.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Domains"}); + table.download("xlsx", "domains.xlsx", {sheetName:"My Domains"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "domains.pdf", { orientation:"portrait", - title:"My Domains", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Domains" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-hosts.twig b/cp/resources/views/partials/js-hosts.twig index d35f75b..daf0cd5 100644 --- a/cp/resources/views/partials/js-hosts.twig +++ b/cp/resources/views/partials/js-hosts.twig @@ -32,6 +32,9 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/api/records/host", ajaxURLGenerator: function(url, config, params) { @@ -74,14 +77,14 @@ return { last_page: 1, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Host Name') }}", field:"name", width:300, minWidth:150, resizable:false, headerSort:true, formatter: hostLinkFormatter, responsive:0}, + {title:"{{ __('Host Name') }}", field:"name", minWidth:150, resizable:false, headerSort:true, formatter: hostLinkFormatter, responsive:0}, {title:"{{ __('Creation Date') }}", field:"crdate", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Last Updated') }}", field:"lastupdate", width:300, minWidth:200, resizable:false, headerSort:true, responsive:2}, {title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort:false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){ @@ -114,22 +117,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "hosts.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "hosts.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Hosts"}); + table.download("xlsx", "hosts.xlsx", {sheetName:"My Hosts"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "hosts.pdf", { orientation:"portrait", - title:"My Hosts", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Hosts" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-invoices.twig b/cp/resources/views/partials/js-invoices.twig index b7ab22c..325249f 100644 --- a/cp/resources/views/partials/js-invoices.twig +++ b/cp/resources/views/partials/js-invoices.twig @@ -22,11 +22,14 @@ ajaxURL:"/api/records/invoices?join=registrar", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -36,10 +39,10 @@ placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Number') }}", field:"invoice_number", width:200, resizable:false, headerSort:true, formatter: invoiceLinkFormatter, responsive:0}, - {title:"{{ __('Registrar') }}", field:"registrar_id.name", width:300, resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Date') }}", field:"issue_date", width:300, resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Amount') }}", field:"total_amount", width:200, resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){ + {title:"{{ __('Number') }}", field:"invoice_number", minWidth:200, resizable:false, headerSort:true, formatter: invoiceLinkFormatter, responsive:0}, + {title:"{{ __('Registrar') }}", field:"registrar_id.name", minWidth:300, resizable:false, headerSort:true, responsive:2}, + {title:"{{ __('Date') }}", field:"issue_date", minWidth:300, resizable:false, headerSort:true, responsive:2}, + {title:"{{ __('Amount') }}", field:"total_amount", minWidth:200, resizable:false, headerSort:true, responsive:2, formatter:"money", formatterParams:function(cell){ return { decimal: ".", thousand: " ", @@ -71,22 +74,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "invoices.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "invoices.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Invoices"}); + table.download("xlsx", "invoices.xlsx", {sheetName:"My Invoices"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "invoices.pdf", { orientation:"portrait", - title:"My Invoices", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Invoices" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-log.twig b/cp/resources/views/partials/js-log.twig index 69cfe56..cad1f27 100644 --- a/cp/resources/views/partials/js-log.twig +++ b/cp/resources/views/partials/js-log.twig @@ -11,11 +11,14 @@ ajaxURL:"/api/records/error_log", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -25,8 +28,8 @@ placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Channel') }}", field:"channel", minWidth:200, resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Level') }}", field:"level_name", resizable:false, minWidth:200, headerSort:true, responsive:0}, + {title:"{{ __('Channel') }}", field:"channel", minWidth:180, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Level') }}", field:"level_name", resizable:false, minWidth:150, headerSort:true, responsive:0}, {title:"{{ __('Log') }}", field:"message", resizable:false, minWidth:550, headerSort:true, responsive:2}, {title:"{{ __('Date') }}", field:"created_at", resizable:false, minWidth:250, headerSort:true, responsive:2}, ] @@ -52,22 +55,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "log.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "log.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Logs"}); + table.download("xlsx", "log.xlsx", {sheetName:"My Logs"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "log.pdf", { orientation:"portrait", - title:"My Logs", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Logs" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-logs.twig b/cp/resources/views/partials/js-logs.twig index 635a8d4..af8ab28 100644 --- a/cp/resources/views/partials/js-logs.twig +++ b/cp/resources/views/partials/js-logs.twig @@ -41,6 +41,9 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxURL: "/log-api/records/transaction_identifier", ajaxURLGenerator: function(url, config, params) { var queryParts = []; @@ -78,28 +81,29 @@ dataReceiveParams: { "last_page": "results", // Mapping 'results' to 'last_page' }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Date') }}", field:"cldate", resizable:false, headerSort:false, responsive:0}, + {title:"{{ __('Date') }}", field:"cldate", minWidth:200, resizable:false, headerSort:false, responsive:0}, { title: "{{ __('Registrar') }}", field: "registrar_id", resizable:false, headerSort: false, - responsive: 2, + responsive: 0, + minWidth:120, formatter: function(cell, formatterParams, onRendered) { const registrarId = cell.getValue(); const name = getRegistrarNameById(registrarId); return name; // Return the name directly, as it is synchronously obtained from cache } }, - {title:"{{ __('Command') }}", field:"cmd", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Object Type') }}", field:"obj_type", resizable:false, headerSort:false, responsive:0}, + {title:"{{ __('Command') }}", field:"cmd", resizable:false, headerSort:false, responsive:2}, + {title:"{{ __('Object Type') }}", field:"obj_type", resizable:false, headerSort:false, responsive:2}, {title:"{{ __('Object') }}", field:"obj_id", resizable:false, headerSort:false, responsive:2}, {title:"{{ __('Result') }}", field:"code", resizable:false, headerSort:false, responsive:2}, {title:"{{ __('Message') }}", field:"msg", resizable:false, headerSort:false, responsive:2, download:false}, @@ -114,22 +118,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "logs.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "logs.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My EPP Log"}); + table.download("xlsx", "logs.xlsx", {sheetName:"My EPP Log"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "logs.pdf", { orientation:"portrait", - title:"My EPP Log", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My EPP Log" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-overview.twig b/cp/resources/views/partials/js-overview.twig index 41c44fe..2837f92 100644 --- a/cp/resources/views/partials/js-overview.twig +++ b/cp/resources/views/partials/js-overview.twig @@ -18,6 +18,11 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + paginationCounter:"rows", + paginationCounterElement:"#page-count", + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/dapi/payments", ajaxURLGenerator: function(url, config, params) { @@ -54,24 +59,25 @@ var lastPage = Math.ceil(response.results / this.options.paginationSize); return { last_page: lastPage, // Calculated total number of pages + last_row: response.results, // Total number of rows data: response.records, // Data for the current page }; } else { console.error('Unexpected response format', response); - return { last_page: 1, data: [] }; + return { last_page: 1, last_row: 0, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2}, + {title:"{{ __('Registrar') }}", field:"registrar_name", minWidth:150, resizable:false, headerSort:true, responsive:2}, + {title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:0}, {title:"{{ __('Description') }}", field:"description", resizable:false, headerSort:true, responsive:2, formatter:cell => (cell.getElement().setAttribute("title", cell.getValue() || ""), cell.getValue()?.length > 80 ? cell.getValue().substring(0, 80) + "..." : cell.getValue())}, - {title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, width:200, minWidth:100, responsive:0, formatter:"money", formatterParams:function(cell){ + {title:"{{ __('Amount') }}", field:"amount", minWidth:150, resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){ return { decimal: ".", thousand: " ", @@ -93,22 +99,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "overview.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "overview.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Overview"}); + table.download("xlsx", "overview.xlsx", {sheetName:"My Overview"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "overview.pdf", { orientation:"portrait", - title:"My Overview", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Overview" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-poll.twig b/cp/resources/views/partials/js-poll.twig index cbd2ba8..cc17bef 100644 --- a/cp/resources/views/partials/js-poll.twig +++ b/cp/resources/views/partials/js-poll.twig @@ -11,11 +11,14 @@ ajaxURL:"/api/records/poll?join=registrar", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -27,9 +30,9 @@ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, {title:"{{ __('ID') }}", field:"id", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Registrar') }}", field:"registrar_id.name", resizable:false, headerSort:true, responsive:2}, - {title:"{{ __('Date') }}", field:"qdate", resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Message') }}", field:"msg", resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Message Type') }}", field:"msg_type", resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Date') }}", field:"qdate", minWidth:120, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Message') }}", field:"msg", minWidth:200, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Message Type') }}", field:"msg_type", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Object') }}", field:"obj_name_or_id", resizable:false, headerSort:true, responsive:2}, ] }); @@ -55,22 +58,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "poll.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "poll.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Contacts"}); + table.download("xlsx", "poll.xlsx", {sheetName:"My Poll Data"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "poll.pdf", { orientation:"portrait", - title:"My Contacts", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Poll Data" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-profile.twig b/cp/resources/views/partials/js-profile.twig index 4c0e573..f29330a 100644 --- a/cp/resources/views/partials/js-profile.twig +++ b/cp/resources/views/partials/js-profile.twig @@ -129,11 +129,14 @@ ajaxURL:"/api/records/users_audit", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -146,8 +149,7 @@ { title: "{{ __('Event') }}", field: "user_event", - minWidth: 30, - width: 120, + minWidth: 120, resizable: false, headerSort: false, responsive: 0, @@ -159,8 +161,6 @@ { title: "{{ __('User Agent') }}", field: "user_agent", - minWidth: 30, - width: 300, resizable: false, headerSort: false, responsive: 2, @@ -173,18 +173,18 @@ { title: "{{ __('Location') }}", field: "user_location", - minWidth: 30, - width: 100, resizable: false, headerSort: false, - responsive: 0, + minWidth: 30, + width: 100, + responsive: 2, formatter: function(cell) { const countryCode = cell.getValue(); // Get the location code, e.g., "UA" return ``; }, }, - {title: "{{ __('Timestamp') }}", field: "event_time", minWidth:30, width:250, resizable:false, headerSort:false, responsive:2}, - {title: "{{ __('User Log') }}", field: "user_data", minWidth:30, width:300, resizable:false, headerSort:false, responsive:0}, + {title: "{{ __('Timestamp') }}", field: "event_time", minWidth:250, resizable:false, headerSort:false, responsive:2}, + {title: "{{ __('User Log') }}", field: "user_data", minWidth:170, resizable:false, headerSort:false, responsive:0}, ] }); }); diff --git a/cp/resources/views/partials/js-registrars.twig b/cp/resources/views/partials/js-registrars.twig index 945646a..68bf02d 100644 --- a/cp/resources/views/partials/js-registrars.twig +++ b/cp/resources/views/partials/js-registrars.twig @@ -37,6 +37,9 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL:"/api/records/registrar", ajaxURLGenerator: function(url, config, params) { @@ -80,14 +83,14 @@ return { last_page: 1, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Name') }}", field:"name", width:200, resizable:false, headerSort:true, formatter: registrarLinkFormatter, responsive:0}, + {title:"{{ __('Name') }}", field:"name", width:180, resizable:false, headerSort:true, formatter: registrarLinkFormatter, responsive:0}, {title:"IANA ID", field:"iana_id", width:300, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Email') }}", field:"email", width:300, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Balance') }}", field:"accountBalance", width:300, resizable:false, headerSort:true, responsive:2, formatter:"money", formatterParams:function(cell){ @@ -113,22 +116,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "registrars.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "registrars.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Registrars"}); + table.download("xlsx", "registrars.xlsx", {sheetName:"My Registrars"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "registrars.pdf", { orientation:"portrait", - title:"My Registrars", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Registrars" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-reports.twig b/cp/resources/views/partials/js-reports.twig index 46d7a53..c78e12b 100644 --- a/cp/resources/views/partials/js-reports.twig +++ b/cp/resources/views/partials/js-reports.twig @@ -11,11 +11,14 @@ ajaxURL:"/api/records/statistics", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -25,8 +28,8 @@ placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:0}, - {title:"{{ __('Total Domains') }}", field:"total_domains", resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Date') }}", field:"date", minWidth:150, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Total Domains') }}", minWidth:150, field:"total_domains", resizable:false, headerSort:true, responsive:0}, {title:"{{ __('Created Domains') }}", field:"created_domains", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Renewed Domains') }}", field:"renewed_domains", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Transferred Domains') }}", field:"transfered_domains", resizable:false, headerSort:true, responsive:2}, @@ -58,22 +61,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "reports.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "reports.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Reports"}); + table.download("xlsx", "reports.xlsx", {sheetName:"My Reports"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "reports.pdf", { orientation:"portrait", - title:"My Reports", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Reports" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-support.twig b/cp/resources/views/partials/js-support.twig index 710dc99..f2824c2 100644 --- a/cp/resources/views/partials/js-support.twig +++ b/cp/resources/views/partials/js-support.twig @@ -77,11 +77,14 @@ ajaxURL:"/api/records/support_tickets?join=ticket_categories", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, @@ -91,8 +94,8 @@ placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Subject') }}", field:"subject", width:350, minWidth:100, resizable:false, headerSort:true, formatter: ticketLinkFormatter, responsive:0}, - {title:"{{ __('Category') }}", field:"category_id.name", width:250, minWidth:80, formatter: catFormatter, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Subject') }}", field:"subject", minWidth:220, resizable:false, headerSort:true, formatter: ticketLinkFormatter, responsive:0}, + {title:"{{ __('Category') }}", field:"category_id.name", minWidth:80, formatter: catFormatter, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Status') }}", field:"status", resizable:false, headerSort:true, width:250, minWidth:100, formatter: statusFormatter, responsive:2}, {title:"{{ __('Priority') }}", field:"priority", resizable:false, headerSort:true, width:250, minWidth:100, formatter: priorityFormatter, responsive:2}, {title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }}, @@ -119,22 +122,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "support.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "support.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Support Tickets"}); + table.download("xlsx", "support.xlsx", {sheetName:"My Support Tickets"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "support.pdf", { orientation:"portrait", - title:"My Support Tickets", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Support Tickets" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-tlds.twig b/cp/resources/views/partials/js-tlds.twig index eeaa2a2..db929cf 100644 --- a/cp/resources/views/partials/js-tlds.twig +++ b/cp/resources/views/partials/js-tlds.twig @@ -59,18 +59,21 @@ ajaxURL:"/api/records/domain_tld", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"TLD", field:"tld", width:400, minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0}, + {title:"TLD", field:"tld", minWidth:50, headerSort:true, resizable:false, formatter: tldLinkFormatter, responsive:0}, { title: "{{ __('Script') }}", field: "idn_table", width:300, minWidth:80, headerSort:true, resizable:false, formatter: scriptNameFormatter, responsive:2}, {title:"DNSSEC", field:"secure", width:250, minWidth:80, headerSort:true, resizable:false, formatter: secureFormatter, responsive:2}, {title: "{{ __('Actions') }}", formatter: actionsFormatter, headerSort: false, resizable:false, download:false, hozAlign: "center", responsive:0, cellClick:function(e, cell){ e.stopPropagation(); }}, @@ -95,22 +98,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "tlds.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "tlds.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My TLDs"}); + table.download("xlsx", "tlds.xlsx", {sheetName:"My TLDs"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "tlds.pdf", { orientation:"portrait", - title:"My TLDs", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My TLDs" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-transactions.twig b/cp/resources/views/partials/js-transactions.twig index 3ec27b9..1a9e633 100644 --- a/cp/resources/views/partials/js-transactions.twig +++ b/cp/resources/views/partials/js-transactions.twig @@ -18,6 +18,11 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + paginationCounter:"rows", + paginationCounterElement:"#page-count", + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/dapi/statements", ajaxURLGenerator: function(url, config, params) { @@ -58,28 +63,29 @@ var lastPage = Math.ceil(response.results / this.options.paginationSize); return { last_page: lastPage, // Calculated total number of pages + last_row: response.results, // Total number of rows data: response.records, // Data for the current page }; } else { console.error('Unexpected response format', response); - return { last_page: 1, data: [] }; + return { last_page: 1, last_row: 0, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Registrar') }}", field:"registrar_name", resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Registrar') }}", field:"registrar_name", minWidth:150, resizable:false, headerSort:true, responsive:0}, {title:"{{ __('Date') }}", field:"date", resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Command') }}", field:"command", resizable:false, headerSort:true, responsive:2}, - {title:"{{ __('Domain') }}", field:"domain_name", resizable:false, headerSort:true, download:false, responsive:0}, + {title:"{{ __('Domain') }}", field:"domain_name", resizable:false, headerSort:true, download:false, responsive:2}, {title:"{{ __('Length') }}", field:"length_in_months", resizable:false, download:false, headerSort:true, responsive:2}, {title:"{{ __('From') }}", field:"fromS", resizable:false, headerSort:true, download:false, responsive:2}, {title:"{{ __('To') }}", field:"toS", resizable:false, headerSort:true, download:false, responsive:2}, - {title:"{{ __('Amount') }}", field:"amount", resizable:false, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){ + {title:"{{ __('Amount') }}", field:"amount", resizable:false, minWidth:150, headerSort:true, responsive:0, formatter:"money", formatterParams:function(cell){ return { decimal: ".", thousand: " ", @@ -101,22 +107,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "transactions.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "transactions.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Transactions"}); + table.download("xlsx", "transactions.xlsx", {sheetName:"My Transactions"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "transactions.pdf", { orientation:"portrait", - title:"My Transactions", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Transactions" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-transfers.twig b/cp/resources/views/partials/js-transfers.twig index de55bd5..608de82 100644 --- a/cp/resources/views/partials/js-transfers.twig +++ b/cp/resources/views/partials/js-transfers.twig @@ -69,22 +69,25 @@ ajaxURL:"/api/records/domain?filter=trstatus,nis", // Set the URL for your JSON data ajaxConfig:"GET", pagination:"local", - paginationSize:10, + paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", ajaxResponse:function(url, params, response){ return response.records; }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Name') }}", field:"name", width:300, minWidth:200, formatter: domainLinkFormatter, resizable:false, headerSort:true, responsive:0}, + {title:"{{ __('Name') }}", field:"name", width:200, minWidth:50, formatter: domainLinkFormatter, resizable:false, headerSort:true, responsive:0}, {title:"{{ __('Initiated Date') }}", field:"redate", width:250, minWidth:150, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Expiry Date') }}", field:"acdate", width:250, minWidth:150, resizable:false, headerSort:true, responsive:2}, - {title:"{{ __('Status') }}", field:"trstatus", width:200, minWidth:150, resizable:false, headerSort:false, download:false, formatter: statusFormatter, responsive:0}, - {title: "{{ __('Actions') }}", formatter: actionsFormatter, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){ + {title:"{{ __('Status') }}", field:"trstatus", width:200, minWidth:150, resizable:false, headerSort:false, download:false, formatter: statusFormatter, responsive:2}, + {title: "{{ __('Actions') }}", formatter: actionsFormatter, minWidth:100, resizable:false, headerSort: false, download:false, hozAlign: "center", responsive:0, cellClick: function(e, cell){ if (e.target.closest('.approve-btn')) { e.preventDefault(); // Prevent the default link behavior Swal.fire({ @@ -146,22 +149,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "transfers.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "transfers.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Transfers"}); + table.download("xlsx", "transfers.xlsx", {sheetName:"My Transfers"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "transfers.pdf", { orientation:"portrait", - title:"My Transfers", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Transfers" }); } \ No newline at end of file diff --git a/cp/resources/views/partials/js-users.twig b/cp/resources/views/partials/js-users.twig index d1413d1..4c9cc93 100644 --- a/cp/resources/views/partials/js-users.twig +++ b/cp/resources/views/partials/js-users.twig @@ -114,6 +114,9 @@ pagination: true, paginationMode: "remote", paginationSize: 10, + paginationSizeSelector:[10, 25, 50, 100], + clipboard:true, + clipboardPasteAction:"replace", sortMode: "remote", ajaxURL: "/api/records/users", ajaxURLGenerator: function(url, config, params) { @@ -156,14 +159,14 @@ return { last_page: 1, data: [] }; } }, - layout:"fitDataFill", + layout:"fitColumns", responsiveLayout: "collapse", responsiveLayoutCollapseStartOpen:false, resizableColumns:false, placeholder: "{{ __('No Data') }}", columns:[ {formatter:"responsiveCollapse", width:30, minWidth:30, hozAlign:"center", resizable:false, headerSort:false, responsive:0}, - {title:"{{ __('Email') }}", field:"email", width:300, resizable:false, headerSort:true, formatter: emailLinkFormatter, responsive:0}, + {title:"{{ __('Email') }}", field:"email", width:270, resizable:false, headerSort:true, formatter: emailLinkFormatter, responsive:0}, {title:"{{ __('User Name') }}", field:"username", width:200, resizable:false, headerSort:true, responsive:2}, {title:"{{ __('Roles') }}", field:"roles_mask", width:300, resizable:false, headerSort:true, formatter: roleLabelFormatter, responsive:2}, {title:"{{ __('Verified') }}", field:"verified", width:150, resizable:false, headerSort:true, formatter: verifiedFormatter, responsive:2}, @@ -183,22 +186,21 @@ }); function downloadCSV() { - table.download("csv", "data.csv"); + table.download("csv", "users.csv"); } function downloadJSON() { - table.download("json", "data.json"); + table.download("json", "users.json"); } function downloadXLSX() { - table.download("xlsx", "data.xlsx", {sheetName:"My Users"}); + table.download("xlsx", "users.xlsx", {sheetName:"My Users"}); } function downloadPDF() { - table.download("pdf", "data.pdf", { + table.download("pdf", "users.pdf", { orientation:"portrait", - title:"My Users", - jsPDF:{unit:"mm", format:"a4", orientation:"p"} + title:"My Users" }); } \ No newline at end of file