Added import and export in courier outward page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 32s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 30s
Laravel Pint / pint (pull_request) Successful in 4m11s
Laravel Larastan / larastan (pull_request) Failing after 5m17s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 32s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 30s
Laravel Pint / pint (pull_request) Successful in 4m11s
Laravel Larastan / larastan (pull_request) Failing after 5m17s
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\Filament\Exports\CourierOutwardExporter;
|
||||
use App\Filament\Imports\CourierOutwardImporter;
|
||||
use App\Filament\Resources\CourierOutwardResource\Pages;
|
||||
use App\Filament\Resources\CourierOutwardResource\RelationManagers;
|
||||
use App\Models\CourierOutward;
|
||||
@@ -14,6 +16,8 @@ use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Tables\Actions\ExportAction;
|
||||
use Filament\Tables\Actions\ImportAction;
|
||||
|
||||
class CourierOutwardResource extends Resource
|
||||
{
|
||||
@@ -193,6 +197,22 @@ class CourierOutwardResource extends Resource
|
||||
Tables\Actions\ForceDeleteBulkAction::make(),
|
||||
Tables\Actions\RestoreBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->headerActions([
|
||||
ImportAction::make()
|
||||
->label('Import Courier Outward')
|
||||
->color('warning')
|
||||
->importer(CourierOutwardImporter::class)
|
||||
->visible(function () {
|
||||
return Filament::auth()->user()->can('view import courier outward');
|
||||
}),
|
||||
ExportAction::make()
|
||||
->label('Export Courier Outward')
|
||||
->color('warning')
|
||||
->exporter(CourierOutwardExporter::class)
|
||||
->visible(function () {
|
||||
return Filament::auth()->user()->can('view export courier outward');
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user