ifnex/04_Laravel/resources/views/orders/success.blade.php
Kazem Alghasi 5874568c63 feat(shipment): implement PDF generation for AWB, invoice, and labels
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.
2026-08-04 09:20:23 +03:30

38 lines
2.2 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div class="bg-white shadow rounded-lg p-8 text-center">
<div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-green-100 mb-6">
<svg class="h-8 w-8 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
</svg>
</div>
<h2 class="text-2xl font-bold text-gray-900 mb-2">سفارش شما با موفقیت ثبت شد</h2>
<p class="text-gray-600 mb-6">کد پیگیری سفارش شما:</p>
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<span class="text-2xl font-mono font-bold text-orange-600">{{ $shipment->awb_no ?? 'N/A' }}</span>
</div>
<p class="text-sm text-gray-500 mb-8">کارشناسان ما در اسرع وقت با شما تماس خواهند گرفت.</p>
<div class="flex flex-wrap justify-center gap-3 mb-6">
<a href="{{ route('shipments.pdf.awb', $shipment) }}" class="inline-flex items-center px-4 py-2 bg-orange-600 border border-transparent rounded-md font-semibold text-white hover:bg-orange-700">
دانلود AWB
</a>
<a href="{{ route('shipments.pdf.invoice', $shipment) }}" class="inline-flex items-center px-4 py-2 bg-blue-600 border border-transparent rounded-md font-semibold text-white hover:bg-blue-700">
دانلود INVOICE
</a>
<a href="{{ route('shipments.pdf.label', $shipment) }}" class="inline-flex items-center px-4 py-2 bg-gray-700 border border-transparent rounded-md font-semibold text-white hover:bg-gray-800">
دانلود LABEL
</a>
</div>
<div class="flex justify-center">
<a href="{{ route('orders.create') }}" class="inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-gray-700 hover:bg-gray-50">
ثبت سفارش جدید
</a>
</div>
</div>
</div>
@endsection