ifnex/04_Laravel/app/Filament/Resources/ShipmentResource/Pages/ViewShipment.php
Kazem Alghasi 48c88e9bc7 refactor(shipment): update direction enums and shipment import logic
Refactor the shipment direction logic from 'outbound/inbound' to 'export/import' to align with the new database schema requirements. This includes updating the `ShippingRatesImport` logic, adjusting the Excel import sheet mappings, and removing the AED to IRR conversion during import as rates are now stored in AED.

Additionally, updated the shipment view action to open PDF documents in a new tab and updated the Phase 0 checklist with the new database schema requirements.

- docs: update Phase 0 checklist with new schema requirements
- refactor(ui): update shipment view actions to open in new tab
- refactor(import): update shipping rates import to use new direction enums and AED values
- docs: add file map and new excel document
2026-08-23 21:33:56 +03:30

38 lines
1.2 KiB
PHP

<?php
namespace App\Filament\Resources\ShipmentResource\Pages;
use App\Filament\Resources\ShipmentResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
class ViewShipment extends ViewRecord
{
protected static string $resource = ShipmentResource::class;
protected function getHeaderActions(): array
{
return [
Actions\Action::make('print_label')
->label('چاپ لیبل')
->icon('heroicon-o-printer')
->color('success')
->url(fn ($record) => route('shipments.pdf.label', $record))
->openUrlInNewTab(),
Actions\Action::make('download_awb')
->label('دانلود AWB')
->icon('heroicon-o-document-text')
->color('warning')
->url(fn ($record) => route('shipments.pdf.awb', $record))
->openUrlInNewTab(),
Actions\Action::make('download_invoice')
->label('دانلود INVOICE')
->icon('heroicon-o-currency-dollar')
->color('info')
->url(fn ($record) => route('shipments.pdf.invoice', $record))
->openUrlInNewTab(),
];
}
}