Просмотр исходного кода

modifiche esportazioni con excel + nome file con data

ferrari 3 месяцев назад
Родитель
Сommit
379e774a36
31 измененных файлов с 325 добавлено и 194 удалено
  1. 144 104
      resources/views/layouts/app.blade.php
  2. 6 3
      resources/views/livewire/bank.blade.php
  3. 6 3
      resources/views/livewire/card.blade.php
  4. 6 3
      resources/views/livewire/city.blade.php
  5. 5 4
      resources/views/livewire/course.blade.php
  6. 6 3
      resources/views/livewire/course_duration.blade.php
  7. 6 3
      resources/views/livewire/course_frequency.blade.php
  8. 6 3
      resources/views/livewire/course_level.blade.php
  9. 5 2
      resources/views/livewire/course_list.blade.php
  10. 7 3
      resources/views/livewire/course_list_original.blade.php
  11. 7 3
      resources/views/livewire/course_member.blade.php
  12. 6 3
      resources/views/livewire/course_member_one.blade.php
  13. 6 3
      resources/views/livewire/course_member_two.blade.php
  14. 6 3
      resources/views/livewire/course_subscription.blade.php
  15. 6 3
      resources/views/livewire/course_type.blade.php
  16. 6 3
      resources/views/livewire/discipline.blade.php
  17. 6 3
      resources/views/livewire/email_comunications.blade.php
  18. 6 3
      resources/views/livewire/member.blade.php
  19. 6 3
      resources/views/livewire/nation.blade.php
  20. 6 3
      resources/views/livewire/payment_method.blade.php
  21. 6 3
      resources/views/livewire/province.blade.php
  22. 6 3
      resources/views/livewire/rate.blade.php
  23. 7 3
      resources/views/livewire/receipt.blade.php
  24. 5 3
      resources/views/livewire/records_in.blade.php
  25. 7 3
      resources/views/livewire/records_out.blade.php
  26. 6 3
      resources/views/livewire/reminders.blade.php
  27. 6 3
      resources/views/livewire/sms_comunications.blade.php
  28. 6 3
      resources/views/livewire/sponsor.blade.php
  29. 6 3
      resources/views/livewire/supplier.blade.php
  30. 6 3
      resources/views/livewire/user.blade.php
  31. 6 3
      resources/views/livewire/vat.blade.php

+ 144 - 104
resources/views/layouts/app.blade.php

@@ -468,120 +468,160 @@
     @livewireScripts
 
     <script>
-        function newexportaction(e, dt, button, config, cb) {
-            const self = this;
-            const settings = dt.settings()[0];
-            const isServerSide = settings.oFeatures && settings.oFeatures.bServerSide;
-            const hasAjax = !!settings.ajax;
-
-            // --- CLIENT-SIDE ---
-            if (!isServerSide || !hasAjax) {
-                // Esporta tutte le righe lato client
-                const origExportOptions = config.exportOptions ? {...config.exportOptions} : {};
-                config.exportOptions = config.exportOptions || {};
-                config.exportOptions.modifier = {...(config.exportOptions.modifier || {}), page: 'all'};
-
-                // PDF: tabella full-width
-                // const isPdf = button[0].className.indexOf('buttons-pdf') >= 0;
-                // const origCustomize = config.customize;
-                // if (isPdf) {
-                //     config.customize = function(doc) {
-                //         const table = doc.content[1] && doc.content[1].table ? doc.content[1].table : null;
-                //         if (table && table.body && table.body[0]) {
-                //             table.widths = Array(table.body[0].length).fill('*');
-                //         }
-                //         if (typeof origCustomize === 'function') origCustomize(doc);
-                //     };
-                // }
+    function newexportaction(e, dt, button, config, cb) {
+        const self = this;
+        const settings = dt.settings()[0];
+        const isServerSide = settings.oFeatures && settings.oFeatures.bServerSide;
+        const hasAjax = !!settings.ajax;
+
+        const customizeExcel = function (xlsx) {
+            const sheet  = xlsx.xl.worksheets['sheet1.xml'];
+            const styles = xlsx.xl['styles.xml'];
+
+            // --- crea background azzurro ---
+            const fills = $('fills', styles);
+            fills.append(
+                '<fill><patternFill patternType="solid">' +
+                    '<fgColor rgb="FFDDEBF7"/><bgColor indexed="64"/>' +
+                '</patternFill></fill>'
+            );
+            const fillId = $('fill', styles).length - 1;
+            fills.attr('count', $('fill', styles).length); // aggiorna count
+
+            // --- crea FONT bold nero ---
+            const fonts = $('fonts', styles);
+            fonts.append('<font><b/><sz val="11"/><color rgb="FF000000"/><name val="Calibri"/></font>');
+            const fontId = $('font', styles).length - 1;
+            fonts.attr('count', $('font', styles).length); // aggiorna count
+
+            // --- crea XF senza bordi, bold + fill azzurro ---
+            const cellXfs = $('cellXfs', styles);
+            cellXfs.append(
+                `<xf xfId="0" applyFont="1" applyFill="1" borderId="0" fontId="${fontId}" fillId="${fillId}">
+                    <alignment vertical="center"/>
+                </xf>`
+            );
+            const xfId = $('cellXfs xf', styles).length - 1;
+            cellXfs.attr('count', $('cellXfs xf', styles).length); // aggiorna count
+
+            // --- applica lo stile alla PRIMA riga (header) ---
+            $('row:first c', sheet).attr('s', xfId);
+        };
+
+
+        // --- CLIENT-SIDE ---
+        if (!isServerSide || !hasAjax) {
+            // Esporta tutte le righe lato client
+            const origExportOptions = config.exportOptions ? { ...config.exportOptions } : {};
+            config.exportOptions = config.exportOptions || {};
+            config.exportOptions.modifier = { ...(config.exportOptions.modifier || {}), page: "all" };
+
+            // PDF: tabella full-width
+            // const isPdf = button[0].className.indexOf('buttons-pdf') >= 0;
+            // const origCustomize = config.customize;
+            // if (isPdf) {
+            //     config.customize = function(doc) {
+            //         const table = doc.content[1] && doc.content[1].table ? doc.content[1].table : null;
+            //         if (table && table.body && table.body[0]) {
+            //             table.widths = Array(table.body[0].length).fill('*');
+            //         }
+            //         if (typeof origCustomize === 'function') origCustomize(doc);
+            //     };
+            // }
+
+            const cls = button[0].className;
+
+            if (cls.includes("buttons-copy")) {
+                $.fn.dataTable.ext.buttons.copyHtml5.action.call(self, e, dt, button, config, cb);
+            } else if (cls.includes("buttons-excel")) {
+                const origCustomize = config.customize;
+                config.filename = config.title;
+                config.title = null;
+                config.customize = function (xlsx) {
+                    if (typeof origCustomize === "function") origCustomize(xlsx);
+                    customizeExcel(xlsx);
+                };
+
+                ($.fn.dataTable.ext.buttons.excelHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.excelHtml5 : $.fn.dataTable.ext.buttons.excelFlash).action.call(self, e, dt, button, config, cb);
+
+                config.customize = origCustomize; // ripristina
+            } else if (cls.includes("buttons-csv")) {
+                ($.fn.dataTable.ext.buttons.csvHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.csvHtml5 : $.fn.dataTable.ext.buttons.csvFlash).action.call(self, e, dt, button, config, cb);
+            } else if (cls.includes("buttons-pdf")) {
+                ($.fn.dataTable.ext.buttons.pdfHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.pdfHtml5 : $.fn.dataTable.ext.buttons.pdfFlash).action.call(self, e, dt, button, config, cb);
+            } else if (cls.includes("buttons-print")) {
+                $.fn.dataTable.ext.buttons.print.action.call(self, e, dt, button, config, cb);
+            }
+
+            // Ripristina config
+            config.exportOptions = origExportOptions;
+            // if (isPdf) config.customize = origCustomize;
+
+            if (typeof cb === "function") cb();
+            return;
+        }
 
+        // --- SERVER-SIDE + AJAX: fetch completo poi export ---
+        const info = dt.page.info();
+        const oldStart = info.start;
+        const oldLength = info.length;
+        const targetLength = info.recordsTotal > 0 ? info.recordsTotal : 2147483647;
+
+        dt.one("preXhr", function (e2, s, data) {
+            data.start = 0;
+            data.length = targetLength;
+
+            dt.one("preDraw", function (e3, stg) {
                 const cls = button[0].className;
-                if (cls.includes('buttons-copy')) {
+
+                if (cls.includes("buttons-copy")) {
                     $.fn.dataTable.ext.buttons.copyHtml5.action.call(self, e, dt, button, config, cb);
-                } else if (cls.includes('buttons-excel')) {
-                    ($.fn.dataTable.ext.buttons.excelHtml5.available(dt, config)
-                        ? $.fn.dataTable.ext.buttons.excelHtml5
-                        : $.fn.dataTable.ext.buttons.excelFlash
-                    ).action.call(self, e, dt, button, config, cb);
-                } else if (cls.includes('buttons-csv')) {
-                    ($.fn.dataTable.ext.buttons.csvHtml5.available(dt, config)
-                        ? $.fn.dataTable.ext.buttons.csvHtml5
-                        : $.fn.dataTable.ext.buttons.csvFlash
-                    ).action.call(self, e, dt, button, config, cb);
-                } else if (cls.includes('buttons-pdf')) {
-                    ($.fn.dataTable.ext.buttons.pdfHtml5.available(dt, config)
-                        ? $.fn.dataTable.ext.buttons.pdfHtml5
-                        : $.fn.dataTable.ext.buttons.pdfFlash
-                    ).action.call(self, e, dt, button, config, cb);
-                } else if (cls.includes('buttons-print')) {
+                } else if (cls.includes("buttons-excel")) {
+                    const origCustomize = config.customize;
+                    config.filename = config.title;
+                    config.title = null;
+                    config.customize = function (xlsx) {
+                        if (typeof origCustomize === "function") origCustomize(xlsx);
+                        customizeExcel(xlsx);
+                    };
+
+                    ($.fn.dataTable.ext.buttons.excelHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.excelHtml5 : $.fn.dataTable.ext.buttons.excelFlash).action.call(self, e, dt, button, config, cb);
+
+                    config.customize = origCustomize;
+                } else if (cls.includes("buttons-csv")) {
+                    ($.fn.dataTable.ext.buttons.csvHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.csvHtml5 : $.fn.dataTable.ext.buttons.csvFlash).action.call(self, e, dt, button, config, cb);
+                } else if (cls.includes("buttons-pdf")) {
+                    // Full-width PDF
+                    // const origCustomize = config.customize;
+                    // config.customize = function(doc) {
+                    //     const t = doc.content[1] && doc.content[1].table ? doc.content[1].table : null;
+                    //     if (t && t.body && t.body[0]) t.widths = Array(t.body[0].length).fill('*');
+                    //     if (typeof origCustomize === 'function') origCustomize(doc);
+                    // };
+                    ($.fn.dataTable.ext.buttons.pdfHtml5.available(dt, config) ? $.fn.dataTable.ext.buttons.pdfHtml5 : $.fn.dataTable.ext.buttons.pdfFlash).action.call(self, e, dt, button, config, cb);
+                    // config.customize = origCustomize;
+                } else if (cls.includes("buttons-print")) {
                     $.fn.dataTable.ext.buttons.print.action.call(self, e, dt, button, config, cb);
                 }
 
-                // Ripristina config
-                config.exportOptions = origExportOptions;
-                // if (isPdf) config.customize = origCustomize;
+                dt.one("preXhr", function (e4, s2, data2) {
+                    data2.start = oldStart;
+                    data2.length = oldLength;
+                    stg._iDisplayStart = oldStart;
+                });
 
-                if (typeof cb === 'function') cb();
-                return;
-            }
+                setTimeout(() => {
+                    dt.ajax.reload(() => {
+                        if (typeof cb === "function") cb();
+                    }, false);
+                }, 0);
 
-            // --- SERVER-SIDE + AJAX: fetch completo poi export ---
-            const info = dt.page.info();
-            const oldStart = info.start;
-            const oldLength = info.length;
-            const targetLength = info.recordsTotal > 0 ? info.recordsTotal : 2147483647;
-
-            dt.one('preXhr', function (e2, s, data) {
-                data.start = 0;
-                data.length = targetLength;
-
-                dt.one('preDraw', function (e3, stg) {
-                    const cls = button[0].className;
-
-                    if (cls.includes('buttons-copy')) {
-                        $.fn.dataTable.ext.buttons.copyHtml5.action.call(self, e, dt, button, config, cb);
-                    } else if (cls.includes('buttons-excel')) {
-                        ($.fn.dataTable.ext.buttons.excelHtml5.available(dt, config)
-                            ? $.fn.dataTable.ext.buttons.excelHtml5
-                            : $.fn.dataTable.ext.buttons.excelFlash
-                        ).action.call(self, e, dt, button, config, cb);
-                    } else if (cls.includes('buttons-csv')) {
-                        ($.fn.dataTable.ext.buttons.csvHtml5.available(dt, config)
-                            ? $.fn.dataTable.ext.buttons.csvHtml5
-                            : $.fn.dataTable.ext.buttons.csvFlash
-                        ).action.call(self, e, dt, button, config, cb);
-                    } else if (cls.includes('buttons-pdf')) {
-                        // Full-width PDF
-                        // const origCustomize = config.customize;
-                        // config.customize = function(doc) {
-                        //     const t = doc.content[1] && doc.content[1].table ? doc.content[1].table : null;
-                        //     if (t && t.body && t.body[0]) t.widths = Array(t.body[0].length).fill('*');
-                        //     if (typeof origCustomize === 'function') origCustomize(doc);
-                        // };
-                        ($.fn.dataTable.ext.buttons.pdfHtml5.available(dt, config)
-                            ? $.fn.dataTable.ext.buttons.pdfHtml5
-                            : $.fn.dataTable.ext.buttons.pdfFlash
-                        ).action.call(self, e, dt, button, config, cb);
-                        // config.customize = origCustomize;
-                    } else if (cls.includes('buttons-print')) {
-                        $.fn.dataTable.ext.buttons.print.action.call(self, e, dt, button, config, cb);
-                    }
-
-                    dt.one('preXhr', function (e4, s2, data2) {
-                        data2.start = oldStart;
-                        data2.length = oldLength;
-                        stg._iDisplayStart = oldStart;
-                    });
-
-                    setTimeout(() => {
-                        dt.ajax.reload(() => { if (typeof cb === 'function') cb(); }, false);
-                    }, 0);
-
-                    return false;
-                });
+                return false;
             });
+        });
 
-            dt.ajax.reload();
-            }
+        dt.ajax.reload();
+    }
     </script>
 
     @stack('scripts')

+ 6 - 3
resources/views/livewire/bank.blade.php

@@ -168,6 +168,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -188,7 +191,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Banche',
+                                        title: date_export + 'Banche',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -196,7 +199,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Banche',
+                                        title: date_export + 'Banche',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -205,7 +208,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Banche',
+                                        title: date_export + 'Banche',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/card.blade.php

@@ -230,6 +230,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -247,7 +250,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Tessere',
+                                        title: date_export + 'Tessere',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -255,7 +258,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Tessere',
+                                        title: date_export + 'Tessere',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -264,7 +267,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Tessere',
+                                        title: date_export + 'Tessere',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/city.blade.php

@@ -139,6 +139,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -153,7 +156,7 @@
                             {
                                 extend: 'excelHtml5',
                                 action: newexportaction,
-                                title: 'Comuni',
+                                title: date_export + 'Comuni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -161,7 +164,7 @@
                             {
                                 extend: 'pdfHtml5',
                                 action: newexportaction,
-                                title: 'Comuni',
+                                title: date_export + 'Comuni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -170,7 +173,7 @@
                                 extend: 'print',
                                 action: newexportaction,
                                 text: 'Stampa',
-                                title: 'Comuni',
+                                title: date_export + 'Comuni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }

+ 5 - 4
resources/views/livewire/course.blade.php

@@ -508,7 +508,8 @@
         }
 
         function loadDataTable(){
-
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
 
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
@@ -531,7 +532,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Corsi',
+                                        title: date_export + 'Corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -539,7 +540,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Corsi',
+                                        title: date_export + 'Corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -548,7 +549,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Corsi',
+                                        title: date_export + 'Corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_duration.blade.php

@@ -135,6 +135,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -155,7 +158,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -163,7 +166,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -172,7 +175,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_frequency.blade.php

@@ -122,6 +122,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -142,7 +145,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Frequenza corsi',
+                                        title: date_export + 'Frequenza corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -150,7 +153,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Frequenza corsi',
+                                        title: date_export + 'Frequenza corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -159,7 +162,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Frequenza corsi',
+                                        title: date_export + 'Frequenza corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_level.blade.php

@@ -122,6 +122,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -142,7 +145,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Livello corsi',
+                                        title: date_export + 'Livello corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -150,7 +153,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Livello corsi',
+                                        title: date_export + 'Livello corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -159,7 +162,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Livello corsi',
+                                        title: date_export + 'Livello corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 5 - 2
resources/views/livewire/course_list.blade.php

@@ -667,6 +667,9 @@
             localStorage.setItem("filterTypeCourseList", filterType);
             */
             /*
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
 
             var output_table = $('#tablesaw-350').DataTable({
                 //scrollX: true,
@@ -964,7 +967,7 @@
                                 buttons: [
                                     {
                                         extend: 'excelHtml5',"action":newexportaction,
-                                        title: 'Pagamento corsi',
+                                        title: date_export + 'Pagamento corsi',
                                         orientation: 'landscape',
                                         exportOptions: {
                                             columns: ":not(':last')"
@@ -1005,7 +1008,7 @@
                                     },
                                     {
                                         extend: 'pdfHtml5',"action":newexportaction,
-                                        title: 'Pagamento corsi',
+                                        title: date_export + 'Pagamento corsi',
                                         orientation: 'landscape',
                                         exportOptions: {
                                             columns: ":not(':last')"

+ 7 - 3
resources/views/livewire/course_list_original.blade.php

@@ -532,6 +532,10 @@
             var filterType = $('.filterType').val();
             localStorage.setItem("filterTypeCourseList", filterType);
 
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
+
             var output_table = $('#tablesaw-350').DataTable({
                 //scrollX: true,
                 //scrollY: true,
@@ -830,7 +834,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Pagamento corsi',
+                                        title: date_export + 'Pagamento corsi',
                                         orientation: 'landscape',
                                         exportOptions: {
                                             columns: ":not(':last')"
@@ -872,7 +876,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Pagamento corsi',
+                                        title: date_export + 'Pagamento corsi',
                                         orientation: 'landscape',
                                         exportOptions: {
                                             columns: ":not(':last')"
@@ -904,7 +908,7 @@
                                     {
                                         extend: 'print',"action":newexportaction,
                                         text: 'Stampa',
-                                        title: 'Pagamento corsi',
+                                        title: date_export + 'Pagamento corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         },

+ 7 - 3
resources/views/livewire/course_member.blade.php

@@ -632,6 +632,10 @@
                 filterFromPrevious = '&filterFromPrevious={{$filterFromPrevious}}';
             @endif
 
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
+
             $('#tablesaw-350').DataTable({
                 serverSide: true,
                 processing: true,
@@ -723,7 +727,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -731,7 +735,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -740,7 +744,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_member_one.blade.php

@@ -58,6 +58,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -78,7 +81,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -86,7 +89,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -95,7 +98,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_member_two.blade.php

@@ -86,6 +86,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -106,7 +109,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -114,7 +117,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -123,7 +126,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Durata corsi',
+                                        title: date_export + 'Durata corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_subscription.blade.php

@@ -157,6 +157,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -177,7 +180,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -185,7 +188,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -194,7 +197,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Iscritti corsi',
+                                        title: date_export + 'Iscritti corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/course_type.blade.php

@@ -122,6 +122,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -142,7 +145,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Tipologia corsi',
+                                        title: date_export + 'Tipologia corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -150,7 +153,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Tipologia corsi',
+                                        title: date_export + 'Tipologia corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -159,7 +162,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Tipologia corsi',
+                                        title: date_export + 'Tipologia corsi',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/discipline.blade.php

@@ -122,6 +122,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -142,7 +145,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Discipline',
+                                        title: date_export + 'Discipline',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -150,7 +153,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Discipline',
+                                        title: date_export + 'Discipline',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -159,7 +162,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Discipline',
+                                        title: date_export + 'Discipline',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/email_comunications.blade.php

@@ -501,6 +501,9 @@
     });
 
     function loadArchiveDataTable(){
+        let date = new Date();
+        let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
         let table = $('#tablesaw-350').DataTable();
         if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
             table.destroy();
@@ -524,7 +527,7 @@
                                 {
                                     extend: 'excelHtml5',
                                     action: newexportaction,
-                                    title: 'Email',
+                                    title: date_export + 'Email',
                                     exportOptions: {
                                         columns: ":not(':last')"
                                     }
@@ -532,7 +535,7 @@
                                 {
                                     extend: 'pdfHtml5',
                                     action: newexportaction,
-                                    title: 'Email',
+                                    title: date_export + 'Email',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -541,7 +544,7 @@
                                     extend: 'print',
                                     action: newexportaction,
                                     text: 'Stampa',
-                                    title: 'Email',
+                                    title: date_export + 'Email',
                                     exportOptions: {
                                         columns: ":not(':last')"
                                     }

+ 6 - 3
resources/views/livewire/member.blade.php

@@ -2090,6 +2090,9 @@
 
 
         function loadDataTable() {
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             const url = '/get_members?cards=' + $('.filterCards').val() + "&filterCategories=" + $('.filterCategories').val() + "&filterCertificateType=" + $('.filterCertificateType').val() + "&filterScadenza=" + $('.filterScadenza').val() + "&filterStatus=" + $('.filterStatus').val() + "&fromYear=" + $('input[name="txtFromYear"]').val() + "&toYear=" + $('input[name="txtToYear"]').val() + "&fromYearYear=" + $('input[name="txtFromYearYear"]').val() + "&toYearYear=" + $('input[name="txtToYearYear"]').val();
 
             localStorage.setItem("filterCardsMember", $('.filterCards').val());
@@ -2197,7 +2200,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')",
                                             page: 'all'
@@ -2206,7 +2209,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         },
@@ -2218,7 +2221,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/nation.blade.php

@@ -182,6 +182,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -196,7 +199,7 @@
                             {
                                 extend: 'excelHtml5',
                                 action: newexportaction,
-                                title: 'Nazioni',
+                                title: date_export + 'Nazioni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -204,7 +207,7 @@
                             {
                                 extend: 'pdfHtml5',
                                 action: newexportaction,
-                                title: 'Nazioni',
+                                title: date_export + 'Nazioni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -213,7 +216,7 @@
                                 extend: 'print',
                                 action: newexportaction,
                                 text: 'Stampa',
-                                title: 'Nazioni',
+                                title: date_export + 'Nazioni',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }

+ 6 - 3
resources/views/livewire/payment_method.blade.php

@@ -213,6 +213,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ($.fn.DataTable.isDataTable('#tablesaw-350')) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -234,7 +237,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -242,7 +245,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -251,7 +254,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/province.blade.php

@@ -171,6 +171,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -185,7 +188,7 @@
                             {
                                 extend: 'excelHtml5',
                                 action: newexportaction,
-                                title: 'Provincie',
+                                title: date_export + 'Provincie',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -193,7 +196,7 @@
                             {
                                 extend: 'pdfHtml5',
                                 action: newexportaction,
-                                title: 'Provincie',
+                                title: date_export + 'Provincie',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -202,7 +205,7 @@
                                 extend: 'print',
                                 action: newexportaction,
                                 text: 'Stampa',
-                                title: 'Provincie',
+                                title: date_export + 'Provincie',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }

+ 6 - 3
resources/views/livewire/rate.blade.php

@@ -384,6 +384,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -404,7 +407,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -412,7 +415,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -421,7 +424,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Metodi di pagamento',
+                                        title: date_export + 'Metodi di pagamento',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 7 - 3
resources/views/livewire/receipt.blade.php

@@ -340,6 +340,10 @@
                 return;
             }
 
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
+
             var table = $('#tablesaw-350').DataTable({
                 serverSide: true,
                 processing: true, // Add this to show processing indicator
@@ -404,7 +408,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Ricevute',
+                                        title: date_export + 'Ricevute',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -412,7 +416,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Ricevute',
+                                        title: date_export + 'Ricevute',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -421,7 +425,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Ricevute',
+                                        title: date_export + 'Ricevute',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 5 - 3
resources/views/livewire/records_in.blade.php

@@ -1242,6 +1242,8 @@
 
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
 
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
@@ -1365,7 +1367,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Entrate',
+                                        title: date_export + 'Entrate',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -1373,7 +1375,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Entrate',
+                                        title: date_export + 'Entrate',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -1382,7 +1384,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Entrate',
+                                        title: date_export + 'Entrate',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 7 - 3
resources/views/livewire/records_out.blade.php

@@ -1813,6 +1813,10 @@
             localStorage.setItem("filterFromRecordOut", filterFrom);
             localStorage.setItem("filterToRecordOut", filterTo);
 
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
+
             $('#tablesaw-350').DataTable({
                 ajax: {
                     url : "/get_record_out?filterSupplier=" + filterSupplier + "&filterPaymentMethod=" + filterPaymentMethod + "&filterCausals=" + filterCausals + "&filterFrom=" + filterFrom + "&filterTo=" + filterTo,
@@ -1885,7 +1889,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Uscite',
+                                        title: date_export + 'Uscite',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -1893,7 +1897,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Uscite',
+                                        title: date_export + 'Uscite',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -1902,7 +1906,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Uscite',
+                                        title: date_export + 'Uscite',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/reminders.blade.php

@@ -243,6 +243,9 @@
         } );
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -263,7 +266,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Scadenze',
+                                        title: date_export + 'Scadenze',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -271,7 +274,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Scadenze',
+                                        title: date_export + 'Scadenze',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -280,7 +283,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Scadenze',
+                                        title: date_export + 'Scadenze',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/sms_comunications.blade.php

@@ -234,6 +234,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ($.fn.DataTable.isDataTable('#tablesaw-350')) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -255,7 +258,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Templates SMS',
+                                        title: date_export + 'Templates SMS',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -263,7 +266,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Templates SMS',
+                                        title: date_export + 'Templates SMS',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -272,7 +275,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Templates SMS',
+                                        title: date_export + 'Templates SMS',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/sponsor.blade.php

@@ -518,6 +518,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -533,7 +536,7 @@
                             {
                                 extend: 'excelHtml5',
                                 action: newexportaction,
-                                title: 'Sponsor',
+                                title: date_export + 'Sponsor',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -541,7 +544,7 @@
                             {
                                 extend: 'pdfHtml5',
                                 action: newexportaction,
-                                title: 'Sponsor',
+                                title: date_export + 'Sponsor',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }
@@ -550,7 +553,7 @@
                                 extend: 'print',
                                 action: newexportaction,
                                 text: 'Stampa',
-                                title: 'Sponsor',
+                                title: date_export + 'Sponsor',
                                 exportOptions: {
                                     columns: ":not(':last')"
                                 }

+ 6 - 3
resources/views/livewire/supplier.blade.php

@@ -376,6 +376,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -396,7 +399,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Fornitori',
+                                        title: date_export + 'Fornitori',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -404,7 +407,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Fornitori',
+                                        title: date_export + 'Fornitori',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         },
@@ -416,7 +419,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Fornitori',
+                                        title: date_export + 'Fornitori',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/user.blade.php

@@ -242,6 +242,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -262,7 +265,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -270,7 +273,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -279,7 +282,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Utenti',
+                                        title: date_export + 'Utenti',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }

+ 6 - 3
resources/views/livewire/vat.blade.php

@@ -134,6 +134,9 @@
         });
 
         function loadDataTable(){
+            let date = new Date();
+            let date_export = `${date.getFullYear()}${date.getMonth()}${date.getDate()}_`;
+
             if ( $.fn.DataTable.isDataTable('#tablesaw-350') ) {
                 $('#tablesaw-350').DataTable().destroy();
             }
@@ -154,7 +157,7 @@
                                     {
                                         extend: 'excelHtml5',
                                         action: newexportaction,
-                                        title: 'Iva',
+                                        title: date_export + 'Iva',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -162,7 +165,7 @@
                                     {
                                         extend: 'pdfHtml5',
                                         action: newexportaction,
-                                        title: 'Iva',
+                                        title: date_export + 'Iva',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }
@@ -171,7 +174,7 @@
                                         extend: 'print',
                                         action: newexportaction,
                                         text: 'Stampa',
-                                        title: 'Iva',
+                                        title: date_export + 'Iva',
                                         exportOptions: {
                                             columns: ":not(':last')"
                                         }