Added import and export in vehicle page
Some checks are pending
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Waiting to run
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Some checks are pending
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Waiting to run
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Filament\Exports\VehicleEntryExporter;
|
||||
use App\Filament\Imports\VehicleEntryImporter;
|
||||
use App\Filament\Resources\VehicleEntryResource\Pages;
|
||||
use App\Models\Item;
|
||||
use App\Models\Plant;
|
||||
@@ -19,6 +21,8 @@ use Filament\Tables\Filters\Filter;
|
||||
use Filament\Forms\Components\DateTimePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Tables\Actions\ExportAction;
|
||||
use Filament\Tables\Actions\ImportAction;
|
||||
|
||||
class VehicleEntryResource extends Resource
|
||||
{
|
||||
@@ -280,6 +284,18 @@ class VehicleEntryResource extends Resource
|
||||
Tables\Actions\ForceDeleteBulkAction::make(),
|
||||
Tables\Actions\RestoreBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->headerActions([
|
||||
ImportAction::make()
|
||||
->importer(VehicleEntryImporter::class)
|
||||
->visible(function() {
|
||||
return Filament::auth()->user()->can('view import vehicle entry');
|
||||
}),
|
||||
ExportAction::make()
|
||||
->exporter(VehicleEntryExporter::class)
|
||||
->visible(function() {
|
||||
return Filament::auth()->user()->can('view export vehicle entry');
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user