ifnex/04_Laravel/app/Filament/Resources/views/rate-import.blade.php
Kazem Alghasi c43b6b0bec fix(rate-import): fix file path resolution + redirect old import page to new 4-quadrant page
- Fix 'File not found' error in ImportRates page by using Storage facade
  to resolve the actual path on the 'local' disk (which points to
  storage/app/private, not storage/app).
- Deprecate the old ImportRatesPage (2-zone format) — hide from navigation
  and redirect anyone hitting its URL to /admin/rate-import.
- Update the template download route to serve the new 4-quadrant
  IFNEX_Rate_Template.xlsx from public/templates/ instead of the old
  ShippingRatesTemplateExport (2-zone format).
- Update rate-import.blade.php to use the named route for the download link.
- Add public/templates/IFNEX_Rate_Template.xlsx for direct web access.
2026-10-29 15:56:30 +03:30

46 lines
2.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<x-filament-panels::page>
<div class="space-y-4">
<div class="filament-card p-6">
<h2 class="text-lg font-semibold mb-2">Rate Excel Import</h2>
<p class="text-sm text-gray-600 mb-4">
Upload an Excel file matching the IFNEX Rate Template format.
The importer expects sheets named <code>Import Rate</code>, <code>Export Rate</code>, and optionally <code>Zone</code>.
Each rate sheet must contain two sections: <code>DOCUMENT</code> and <code>NON-DOCUMENT</code>.
</p>
<form wire:submit="import">
{{ $this->form }}
<div class="mt-4">
<x-filament::button type="submit" color="success" icon="heroicon-o-arrow-up-tray">
Import Rates
</x-filament::button>
</div>
</form>
</div>
<div class="filament-card p-4 bg-amber-50 border border-amber-200">
<h3 class="text-sm font-semibold text-amber-800 mb-2">📋 Quick checklist</h3>
<ul class="text-xs text-amber-700 list-disc ml-5 space-y-1">
<li>Sheet names must be exactly <code>Import Rate</code> and <code>Export Rate</code>.</li>
<li>Section markers must appear in column E (merged): <code>DOCUMENT</code> / <code>NON - DOCUMENT</code>.</li>
<li>Column headers must be <code>Weight (kg)</code> and <code>Zone 1</code>..<code>Zone 10</code> (or just integers 1..10).</li>
<li>Weights must be decimal numbers in column A (0.5, 1, 1.5, ...).</li>
<li>Empty cells are skipped (no rate stored for that weight × zone).</li>
<li>Currency defaults to AED. System converts to IRR using current exchange rate.</li>
</ul>
</div>
<div class="filament-card p-4">
<h3 class="text-sm font-semibold mb-2">دانلود قالب خالی</h3>
<p class="text-xs text-gray-600 mb-2">
اگر قالب خالی را می‌خواهید،
<a href="{{ route('download.rate-template') }}" class="text-blue-600 underline">دانلود IFNEX_Rate_Template.xlsx</a>
(فرمت ۴-رُبعی: Import Rate، Export Rate، Zone).
</p>
<p class="text-xs text-amber-600 mt-2">
⚠️ توجه: فایل اصلی مشتری (با داده‌های نرخ واقعی) را مستقیم آپلود کنید — این قالب فقط فرمت خالی است.
</p>
</div>
</div>
</x-filament-panels::page>