ifnex/04_Laravel/routes/web.php
Kazem Alghasi 02c29db696 feat(core): implement order approval flow, credit system, and import invoicing
Introduce a comprehensive set of commercial features including a multi-step
order approval workflow, customer credit management, and specialized
import service invoicing.

Key changes:
- Implement `pending_approval` and `approved` shipment statuses to allow
  staff verification before customer payment.
- Add a credit system to `User` model with `credit_limit` and `credit_used`
  to manage customer balances and debts.
- Develop a new `importInvoice` PDF generation service following the
  "Sheet ENG Invoice" specification for import services.
- Add Filament resources for managing Audit Logs, Commitment Forms,
  Customer Credits, and Shipment Checklists.
- Implement staff-specific APIs for order approval/rejection and
  customer financial status monitoring.
- Integrate Kavenegar SMS service for mobile verification and notifications.
- Add bulk tracking import functionality via CSV/Excel.
- Update WordPress bridge assets (CSS/JS) to support the new multi-step
  order form UI and updated redirection logic.
- Update deployment configurations and documentation to reflect new
  production domains and feature sets.
2026-09-03 06:04:20 +03:30

46 lines
2.0 KiB
PHP

<?php
use App\Http\Controllers\OrderController;
use App\Http\Controllers\PricingPageController;
use App\Http\Controllers\ShipmentPdfController;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
Route::get('/pricing', PricingPageController::class)->name('pricing.index');
Route::get('/order', [OrderController::class, 'create'])->name('orders.create');
Route::post('/order', [OrderController::class, 'store'])->name('orders.store');
Route::get('/order/success/{shipment}', [OrderController::class, 'success'])->name('orders.success');
Route::middleware('auth')->group(function () {
Route::get('/shipments/{shipment}/pdf/awb', [ShipmentPdfController::class, 'awb'])->name('shipments.pdf.awb');
Route::get('/shipments/{shipment}/pdf/invoice', [ShipmentPdfController::class, 'invoice'])->name('shipments.pdf.invoice');
Route::get('/shipments/{shipment}/pdf/label', [ShipmentPdfController::class, 'label'])->name('shipments.pdf.label');
Route::get('/shipments/{shipment}/pdf/import-invoice', [ShipmentPdfController::class, 'importInvoice'])->name('shipments.pdf.import-invoice');
});
// صفحات نتیجه پرداخت
Route::get('/payment-result', function (Illuminate\Http\Request $request) {
$status = $request->input('status');
$transactionId = $request->input('transaction_id');
$refId = $request->input('ref_id');
$amount = $request->input('amount');
$message = $request->input('message');
$isSuccess = $status === 'success';
return view('payment-result', [
'status' => $status,
'isSuccess' => $isSuccess,
'transactionId' => $transactionId,
'refId' => $refId,
'amount' => $amount,
'message' => $message,
]);
})->name('payment.result');
Route::get('/download-rate-template', function () {
return (new \App\Exports\ShippingRatesTemplateExport)->download('IFNEX_Rate_Template.xlsx');
})->middleware(['auth', 'panel:admin'])->name('download.rate-template');