fix(view): place rate-import blade in standard view path
The page view 'filament.pages.rate-import' resolves to namespace 'filament'
+ view 'pages.rate-import' in Laravel (the first dot segment is the
namespace). The previous addNamespace('filament.pages', ...) was wrong
because it registered a new namespace nobody looks up.
Move the blade file to resources/views/filament/pages/rate-import.blade.php
where Laravel's default view paths find it. Revert the AppServiceProvider
hack since it was ineffective.
This commit is contained in:
parent
f11dfa87dc
commit
4a38cf4fce
@ -27,13 +27,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
// هک برای رفع مشکل دیسک اکسل در لاراول ۱۱/۱۲
|
||||
config(['excel.temporary_files.disk' => 'local']);
|
||||
|
||||
// ─── ثبت مسیر view برای صفحات Filament Resource ───
|
||||
// صفحاتی که در app/Filament/Resources/*/Pages هستند و view='filament.pages.xxx'
|
||||
// دارند، blade خودشان را در app/Filament/Resources/views/ نگه میدارند.
|
||||
// این خط به Laravel میگوید علاوه بر resources/views/filament/pages/،
|
||||
// این مسیر را هم برای namespace 'filament.pages' جستجو کند.
|
||||
view()->addNamespace('filament.pages', app_path('Filament/Resources/views'));
|
||||
|
||||
// ثبت Observer برای اطلاعیههای تغییر سفارش
|
||||
Shipment::observe(ShipmentObserver::class);
|
||||
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
<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>
|
||||
Loading…
Reference in New Issue
Block a user