Introduce PDF generation capabilities for shipments using laravel-dompdf. This includes a new service layer, dedicated controller, and routes to handle the generation of Air Waybills (AWB), Invoices, and Shipping Labels. - Add `PdfService` to encapsulate PDF generation logic. - Add `ShipmentPdfController` to handle PDF download requests. - Integrate `barryvdh/laravel-dompdf` dependency. - Add Filament header actions to view shipment pages for quick PDF access. - Update order success view to provide direct download links for documents. - Add label methods to `ShipmentDirection` and `ShipmentType` enums. - Update project status documentation to reflect initial PDF implementation.
18 lines
286 B
PHP
18 lines
286 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum ShipmentDirection: string
|
|
{
|
|
case Import = 'import';
|
|
case Export = 'export';
|
|
|
|
public function label(): string
|
|
{
|
|
return match($this) {
|
|
self::Import => 'Import',
|
|
self::Export => 'Export',
|
|
};
|
|
}
|
|
}
|