From 36d73b2875b70d31be8c3300a422d69646afb101 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Mon, 12 Jun 2023 18:56:40 +0300 Subject: [PATCH 1/2] add exporting entries - using `alperenersoy/filament-export` - delete migration file - imporve doc --- composer.json | 1 + composer.lock | 538 +++++++++++++++++- .../add_fields_to_sections_table.php.stub | 34 -- .../migrations/create_sections_table.php.stub | 4 + docs/introduction.md | 4 +- docs/overview.md | 9 +- resources/lang/ar.json | 3 +- .../Pages/ReportResponses.php | 8 + 8 files changed, 536 insertions(+), 65 deletions(-) delete mode 100644 database/migrations/add_fields_to_sections_table.php.stub diff --git a/composer.json b/composer.json index 9c27ca64..dacf47f3 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ ], "require": { "php": "^8.0", + "alperenersoy/filament-export": "^0.3.5", "codeat3/blade-clarity-icons": "^1.7", "filament/notifications": "^2.0", "filament/spatie-laravel-translatable-plugin": "^2.0", diff --git a/composer.lock b/composer.lock index fb85e889..03c201d4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7683e9d459773704accb75415af89bf8", + "content-hash": "5befcf07c608c56e314417ee403cd5ea", "packages": [ { "name": "akaunting/laravel-money", @@ -75,6 +75,62 @@ }, "time": "2023-03-16T14:39:27+00:00" }, + { + "name": "alperenersoy/filament-export", + "version": "v0.3.5", + "source": { + "type": "git", + "url": "https://github.com/alperenersoy/filament-export.git", + "reference": "3a26d8e026a5327f476fa2263d2654793ac863a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alperenersoy/filament-export/zipball/3a26d8e026a5327f476fa2263d2654793ac863a7", + "reference": "3a26d8e026a5327f476fa2263d2654793ac863a7", + "shasum": "" + }, + "require": { + "barryvdh/laravel-dompdf": "^2.0", + "filament/tables": "^2.0", + "php": "^8.0", + "spatie/simple-excel": "^3.0 >=3.2.0" + }, + "require-dev": { + "filament/filament": "^2.0", + "orchestra/testbench": "^7.6", + "pestphp/pest": "^1.21", + "pestphp/pest-plugin-livewire": "^1.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "AlperenErsoy\\FilamentExport\\FilamentExportServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "AlperenErsoy\\FilamentExport\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "alperen ersoy", + "email": "ersoyalperen@gmail.com" + } + ], + "description": "Customizable export and print functionality for Filament Admin Panel", + "support": { + "issues": "https://github.com/alperenersoy/filament-export/issues", + "source": "https://github.com/alperenersoy/filament-export/tree/v0.3.5" + }, + "time": "2023-06-01T16:45:19+00:00" + }, { "name": "archtechx/laravel-seo", "version": "v0.7.0", @@ -133,6 +189,83 @@ }, "time": "2023-03-03T13:19:18+00:00" }, + { + "name": "barryvdh/laravel-dompdf", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-dompdf.git", + "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/9843d2be423670fb434f4c978b3c0f4dd92c87a6", + "reference": "9843d2be423670fb434f4c978b3c0f4dd92c87a6", + "shasum": "" + }, + "require": { + "dompdf/dompdf": "^2.0.1", + "illuminate/support": "^6|^7|^8|^9|^10", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "nunomaduro/larastan": "^1|^2", + "orchestra/testbench": "^4|^5|^6|^7|^8", + "phpro/grumphp": "^1", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\DomPDF\\ServiceProvider" + ], + "aliases": { + "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf", + "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\DomPDF\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A DOMPDF Wrapper for Laravel", + "keywords": [ + "dompdf", + "laravel", + "pdf" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-dompdf/issues", + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.0.1" + }, + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2023-01-12T15:12:49+00:00" + }, { "name": "blade-ui-kit/blade-heroicons", "version": "1.4.0", @@ -876,6 +1009,68 @@ ], "time": "2022-12-15T16:57:16+00:00" }, + { + "name": "dompdf/dompdf", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/e8d2d5e37e8b0b30f0732a011295ab80680d7e85", + "reference": "e8d2d5e37e8b0b30f0732a011295ab80680d7e85", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "masterminds/html5": "^2.0", + "phenx/php-font-lib": ">=0.5.4 <1.0.0", + "phenx/php-svg-lib": ">=0.3.3 <1.0.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "ext-json": "*", + "ext-zip": "*", + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "squizlabs/php_codesniffer": "^3.5" + }, + "suggest": { + "ext-gd": "Needed to process images", + "ext-gmagick": "Improves image processing performance", + "ext-imagick": "Improves image processing performance", + "ext-zlib": "Needed for pdf stream compression" + }, + "type": "library", + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "The Dompdf Community", + "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "support": { + "issues": "https://github.com/dompdf/dompdf/issues", + "source": "https://github.com/dompdf/dompdf/tree/v2.0.3" + }, + "time": "2023-02-07T12:51:48+00:00" + }, { "name": "dragonmantank/cron-expression", "version": "v3.3.2", @@ -1006,16 +1201,16 @@ }, { "name": "filament/filament", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "5ffb51c2dc9a6011f9c83b395d6259b0a396a2ca" + "reference": "dd3655e315e825aaed5c98aaf16ed17f37a7b3db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/5ffb51c2dc9a6011f9c83b395d6259b0a396a2ca", - "reference": "5ffb51c2dc9a6011f9c83b395d6259b0a396a2ca", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/dd3655e315e825aaed5c98aaf16ed17f37a7b3db", + "reference": "dd3655e315e825aaed5c98aaf16ed17f37a7b3db", "shasum": "" }, "require": { @@ -1064,20 +1259,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-06-11T17:05:35+00:00" + "time": "2023-06-12T14:24:42+00:00" }, { "name": "filament/forms", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "23e57101e6e255ff22b2a08b5d5a677575242608" + "reference": "96a4e3ba9ab42d13e8630f0d37f8b83e8cff9eb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/23e57101e6e255ff22b2a08b5d5a677575242608", - "reference": "23e57101e6e255ff22b2a08b5d5a677575242608", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/96a4e3ba9ab42d13e8630f0d37f8b83e8cff9eb2", + "reference": "96a4e3ba9ab42d13e8630f0d37f8b83e8cff9eb2", "shasum": "" }, "require": { @@ -1122,20 +1317,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-06-11T17:05:36+00:00" + "time": "2023-06-12T14:24:44+00:00" }, { "name": "filament/notifications", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "2a0a808bff7b6eb036aa7d652e2167c3b3d7bd29" + "reference": "619a730d88943c9415ae1c61085445c2a76199ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/2a0a808bff7b6eb036aa7d652e2167c3b3d7bd29", - "reference": "2a0a808bff7b6eb036aa7d652e2167c3b3d7bd29", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/619a730d88943c9415ae1c61085445c2a76199ce", + "reference": "619a730d88943c9415ae1c61085445c2a76199ce", "shasum": "" }, "require": { @@ -1175,11 +1370,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-06-06T11:21:19+00:00" + "time": "2023-06-12T14:24:44+00:00" }, { "name": "filament/spatie-laravel-translatable-plugin", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-translatable-plugin.git", @@ -1225,7 +1420,7 @@ }, { "name": "filament/support", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", @@ -1276,16 +1471,16 @@ }, { "name": "filament/tables", - "version": "v2.17.47", + "version": "v2.17.48", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "84529e8c00bd54fb2816c6f0a5a8802e95672c1a" + "reference": "88aef59b52b2643a6536a251794abd3a043e0fc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/84529e8c00bd54fb2816c6f0a5a8802e95672c1a", - "reference": "84529e8c00bd54fb2816c6f0a5a8802e95672c1a", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/88aef59b52b2643a6536a251794abd3a043e0fc7", + "reference": "88aef59b52b2643a6536a251794abd3a043e0fc7", "shasum": "" }, "require": { @@ -1328,7 +1523,7 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2023-06-07T07:10:56+00:00" + "time": "2023-06-12T14:25:06+00:00" }, { "name": "fruitcake/php-cors", @@ -2988,6 +3183,189 @@ ], "time": "2023-02-08T01:06:31+00:00" }, + { + "name": "openspout/openspout", + "version": "v4.14.0", + "source": { + "type": "git", + "url": "https://github.com/openspout/openspout.git", + "reference": "528442c4051c8dfc53c164651156fa616c370931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/openspout/openspout/zipball/528442c4051c8dfc53c164651156fa616c370931", + "reference": "528442c4051c8dfc53c164651156fa616c370931", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-filter": "*", + "ext-libxml": "*", + "ext-xmlreader": "*", + "ext-zip": "*", + "php": "~8.1.0 || ~8.2.0" + }, + "require-dev": { + "ext-zlib": "*", + "friendsofphp/php-cs-fixer": "^3.17.0", + "infection/infection": "^0.27", + "phpbench/phpbench": "^1.2.10", + "phpstan/phpstan": "^1.10.15", + "phpstan/phpstan-phpunit": "^1.3.12", + "phpstan/phpstan-strict-rules": "^1.5.1", + "phpunit/phpunit": "^10.1.3" + }, + "suggest": { + "ext-iconv": "To handle non UTF-8 CSV files (if \"php-intl\" is not already installed or is too limited)", + "ext-intl": "To handle non UTF-8 CSV files (if \"iconv\" is not already installed)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "OpenSpout\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrien Loison", + "email": "adrien@box.com" + } + ], + "description": "PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way", + "homepage": "https://github.com/openspout/openspout", + "keywords": [ + "OOXML", + "csv", + "excel", + "memory", + "odf", + "ods", + "office", + "open", + "php", + "read", + "scale", + "spreadsheet", + "stream", + "write", + "xlsx" + ], + "support": { + "issues": "https://github.com/openspout/openspout/issues", + "source": "https://github.com/openspout/openspout/tree/v4.14.0" + }, + "funding": [ + { + "url": "https://paypal.me/filippotessarotto", + "type": "custom" + }, + { + "url": "https://github.com/Slamdunk", + "type": "github" + } + ], + "time": "2023-05-24T09:26:05+00:00" + }, + { + "name": "phenx/php-font-lib", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-font-lib.git", + "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/dd448ad1ce34c63d09baccd05415e361300c35b4", + "reference": "dd448ad1ce34c63d09baccd05415e361300c35b4", + "shasum": "" + }, + "require": { + "ext-mbstring": "*" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3 || ^4 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/PhenX/php-font-lib", + "support": { + "issues": "https://github.com/dompdf/php-font-lib/issues", + "source": "https://github.com/dompdf/php-font-lib/tree/0.5.4" + }, + "time": "2021-12-17T19:44:54+00:00" + }, + { + "name": "phenx/php-svg-lib", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/dompdf/php-svg-lib.git", + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685", + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0", + "sabberworm/php-css-parser": "^8.4" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Svg\\": "src/Svg" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/PhenX/php-svg-lib", + "support": { + "issues": "https://github.com/dompdf/php-svg-lib/issues", + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0" + }, + "time": "2022-09-06T12:16:56+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.1", @@ -3526,6 +3904,59 @@ ], "time": "2023-02-14T16:54:54+00:00" }, + { + "name": "sabberworm/php-css-parser", + "version": "8.4.0", + "source": { + "type": "git", + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/e41d2140031d533348b2192a83f02d8dd8a71d30", + "reference": "e41d2140031d533348b2192a83f02d8dd8a71d30", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=5.6.20" + }, + "require-dev": { + "codacy/coverage": "^1.4", + "phpunit/phpunit": "^4.8.36" + }, + "suggest": { + "ext-mbstring": "for parsing UTF-8 CSS" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sabberworm\\CSS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "https://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "support": { + "issues": "https://github.com/sabberworm/PHP-CSS-Parser/issues", + "source": "https://github.com/sabberworm/PHP-CSS-Parser/tree/8.4.0" + }, + "time": "2021-12-11T13:40:54+00:00" + }, { "name": "spatie/invade", "version": "1.1.1", @@ -3734,6 +4165,67 @@ ], "time": "2023-05-06T10:22:13+00:00" }, + { + "name": "spatie/simple-excel", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/simple-excel.git", + "reference": "f9afb9deb6973bbe96f30685580dca25207e54ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/simple-excel/zipball/f9afb9deb6973bbe96f30685580dca25207e54ce", + "reference": "f9afb9deb6973bbe96f30685580dca25207e54ce", + "shasum": "" + }, + "require": { + "illuminate/support": "^8.71|^9.0|^10.0", + "openspout/openspout": "^4.8", + "php": "^8.0" + }, + "require-dev": { + "pestphp/pest-plugin-laravel": "^1.3", + "phpunit/phpunit": "^9.4", + "spatie/pest-plugin-snapshots": "^1.1", + "spatie/phpunit-snapshot-assertions": "^4.0", + "spatie/temporary-directory": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\SimpleExcel\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Read and write simple Excel and CSV files", + "homepage": "https://github.com/spatie/simple-excel", + "keywords": [ + "simple-excel", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/simple-excel/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-03-13T16:33:17+00:00" + }, { "name": "symfony/console", "version": "v6.3.0", diff --git a/database/migrations/add_fields_to_sections_table.php.stub b/database/migrations/add_fields_to_sections_table.php.stub deleted file mode 100644 index a77cdf43..00000000 --- a/database/migrations/add_fields_to_sections_table.php.stub +++ /dev/null @@ -1,34 +0,0 @@ -integer('columns')->default(1); - $table->text('description')->nullable(); - $table->string('icon')->nullable(); - $table->boolean('aside')->default(0); - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::table('sections', function (Blueprint $table) { - $table->dropColumn('columns'); - $table->dropColumn('description'); - $table->dropColumn('icon'); - $table->dropColumn('aside'); - }); - } -}; diff --git a/database/migrations/create_sections_table.php.stub b/database/migrations/create_sections_table.php.stub index 22af0565..397e3ade 100644 --- a/database/migrations/create_sections_table.php.stub +++ b/database/migrations/create_sections_table.php.stub @@ -18,6 +18,10 @@ class CreateSectionsTable extends Migration $table->foreignId('form_id')->constrained('forms'); $table->text('name')->nullable(); $table->integer('ordering')->default(1); + $table->integer('columns')->default(1); + $table->text('description')->nullable(); + $table->string('icon')->nullable(); + $table->boolean('aside')->default(0); $table->timestamps(); $table->softDeletes(); }); diff --git a/docs/introduction.md b/docs/introduction.md index 04454c78..691ab4c3 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -48,9 +48,9 @@ included a UI for the frontend bilt with filament - 🔥 show responses for each form - 🔥 search in all responses filtering on the dynamic fields (soon) - 🔥 set status for each response -- 🔥 exporting (soon) +- 🔥 exporting - 🔥 clone form with `ReplicateAction` (soon) -- 🔥 form reports (soon) +- 🔥 form reports - 🔥 exam module (set correct answer, the mark for each question, auto correction for all responses, send the mark to the user, and display the result) (soon) - 🔥 poll module (custom layout to show the form as a poll, and display the result as chart) (soon) - 🔥 multiple events ready to listen to diff --git a/docs/overview.md b/docs/overview.md index 977c1402..62d24c22 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -30,11 +30,10 @@ collections are datasets used for lists like checkboxes and select menus. ### Responses: Every submission has a response record per user. - -Entries per form have three views: -list: list the response only as cards -browse: how the response with the fields one per page -report: table view for all entries and it's fields +you can view the responses per form in three ways: +- list: list the response only as cards +- browse: how the response with the fields one per page +- report: table view for all entries and it's fields ### Responses Fields: Fields are related to each response and each field of the form. And they contain the user input. diff --git a/resources/lang/ar.json b/resources/lang/ar.json index 7c7672f4..417f6a80 100644 --- a/resources/lang/ar.json +++ b/resources/lang/ar.json @@ -154,5 +154,6 @@ "ip": "رقم IP", "ipv4": "رقم IP 4", "ipv6": "رقم IP 6", - "mac address": "عنوان ماك" + "mac address": "عنوان ماك", + "Export": "تصدير" } diff --git a/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php b/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php index 19e1a1a3..042329c9 100644 --- a/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php +++ b/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php @@ -2,6 +2,7 @@ namespace LaraZeus\Bolt\Filament\Resources\ResponseResource\Pages; +use AlperenErsoy\FilamentExport\Actions\FilamentExportBulkAction; use Closure; use Filament\Resources\Pages\Page; use Filament\Tables; @@ -123,6 +124,13 @@ protected function getTableFilters(): array ]; } + protected function getTableBulkActions(): array + { + return [ + FilamentExportBulkAction::make('export')->label(__('Export')) + ]; + } + protected function getActions(): array { return $this->getEntriesActions(); From 0e628527b7bfc2eb3d9c56471dd0a1d6582c1028 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Mon, 12 Jun 2023 15:57:52 +0000 Subject: [PATCH 2/2] Fix styling --- .../Resources/ResponseResource/Pages/ReportResponses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php b/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php index 042329c9..613b483e 100644 --- a/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php +++ b/src/Filament/Resources/ResponseResource/Pages/ReportResponses.php @@ -127,7 +127,7 @@ protected function getTableFilters(): array protected function getTableBulkActions(): array { return [ - FilamentExportBulkAction::make('export')->label(__('Export')) + FilamentExportBulkAction::make('export')->label(__('Export')), ]; }