Refactor the shipment direction logic from 'outbound/inbound' to 'export/import' to align with the new database schema requirements. This includes updating the `ShippingRatesImport` logic, adjusting the Excel import sheet mappings, and removing the AED to IRR conversion during import as rates are now stored in AED. Additionally, updated the shipment view action to open PDF documents in a new tab and updated the Phase 0 checklist with the new database schema requirements. - docs: update Phase 0 checklist with new schema requirements - refactor(ui): update shipment view actions to open in new tab - refactor(import): update shipping rates import to use new direction enums and AED values - docs: add file map and new excel document
203 lines
6.0 KiB
Markdown
203 lines
6.0 KiB
Markdown
# 📂 نقشه فایلهای فاز ۰ — IFNEX Laravel
|
||
|
||
> هر فایل را از پوشه `IFNEX_Laravel_Phase0/` در ریشهی پروژه Laravel (مثلاً `04_Laravel/`) کپی کنید.
|
||
|
||
---
|
||
|
||
## ۱. Migrations (۸ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `database/migrations/2026_08_02_000001_create_countries_table.php` |
|
||
| 2 | `database/migrations/2026_08_02_000002_create_shipments_table.php` |
|
||
| 3 | `database/migrations/2026_08_02_000003_create_shipment_carrier_mappings_table.php` |
|
||
| 4 | `database/migrations/2026_08_02_000004_create_shipment_tracking_events_table.php` |
|
||
| 5 | `database/migrations/2026_08_02_000005_create_shipment_items_table.php` |
|
||
| 6 | `database/migrations/2026_08_02_000006_create_shipping_rates_table.php` |
|
||
| 7 | `database/migrations/2026_08_02_000007_create_system_settings_table.php` |
|
||
| 8 | `database/migrations/2026_08_02_000008_create_users_table.php` |
|
||
|
||
---
|
||
|
||
## ۲. Models (۸ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Models/Country.php` |
|
||
| 2 | `app/Models/Shipment.php` |
|
||
| 3 | `app/Models/ShipmentCarrierMapping.php` |
|
||
| 4 | `app/Models/ShipmentTrackingEvent.php` |
|
||
| 5 | `app/Models/ShipmentItem.php` |
|
||
| 6 | `app/Models/ShippingRate.php` |
|
||
| 7 | `app/Models/SystemSetting.php` |
|
||
| 8 | `app/Models/User.php` |
|
||
|
||
---
|
||
|
||
## ۳. Seeders (۳ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `database/seeders/DatabaseSeeder.php` |
|
||
| 2 | `database/seeders/CountriesTableSeeder.php` |
|
||
| 3 | `database/seeders/SystemSettingSeeder.php` |
|
||
|
||
---
|
||
|
||
## ۴. Fil> Filament Resources (۱۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Filament/Resources/CountryResource.php` |
|
||
| 2 | `app/Filament/Resources/CountryResource/Pages/ListCountries.php` |
|
||
| 3 | `app/Filament/Resources/CountryResource/Pages/CreateCountry.php` |
|
||
| 4 | `app/Filament/Resources/CountryResource/Pages/EditCountry.php` |
|
||
| 5 | `app/Filament/Resources/ShipmentResource.php` |
|
||
| 6 | `app/Filament/Resources/ShipmentResource/Pages/ListShipments.php` |
|
||
| 7 | `app/Filament/Resources/ShipmentResource/Pages/CreateShipment.php` |
|
||
| 8 | `app/Filament/Resources/ShipmentResource/Pages/ViewShipment.php` |
|
||
| 9 | `app/Filament/Resources/ShipmentResource/Pages/EditShipment.php` |
|
||
| 10 | `app/Filament/Resources/ShipmentResource/RelationManagers/CarrierMappingsRelationManager.php` |
|
||
| 11 | `app/Filament/Resources/ShipmentResource/RelationManagers/TrackingEventsRelationManager.php` |
|
||
| 12 | `app/Filament/Resources/ShipmentResource/RelationManagers/ItemsRelationManager.php` |
|
||
| 13 | `app/Filament/Resources/ShippingRateResource.php` |
|
||
| 14 | `app/Filament/Resources/ShippingRateResource/Pages/ListShippingRates.php` |
|
||
| 15 | `app/Filament/Resources/ShippingRateResource/Pages/CreateShippingRate.php` |
|
||
| 16 | `app/Filament/Resources/ShippingRateResource/Pages/EditShippingRate.php` |
|
||
|
||
---
|
||
|
||
## ۵. Filament Pages + Widget (۳ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Filament/Pages/SettingsPage.php` |
|
||
| 2 | `app/Filament/Pages/PriceTestPage.php` |
|
||
| 3 | `app/Filament/Widgets/ShipmentStatsWidget.php` |
|
||
|
||
---
|
||
|
||
## ۶. Filament Blade Views (۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `resources/views/filament/pages/settings-page.blade.php` |
|
||
| 2 | `resources/views/filament/pages/price-test-page.blade.php` |
|
||
|
||
---
|
||
|
||
## ۷. Services (۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Services/PriceCalculatorService.php` |
|
||
| 2 | `app/Services/TrackingService.php` |
|
||
|
||
---
|
||
|
||
## ۸. Controllers (۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Http/Controllers/Api/PricingController.php` |
|
||
| 2 | `app/Http/Controllers/Api/TrackController.php` |
|
||
|
||
---
|
||
|
||
## ۹. Middleware (۱ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Http/Middleware/ApiKeyAuth.php` |
|
||
|
||
---
|
||
|
||
## ۱۰. Form Requests (۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Http/Requests/Api/CalculatePriceRequest.php` |
|
||
| 2 | `app/Http/Requests/Api/TrackShipmentRequest.php` |
|
||
|
||
---
|
||
|
||
## ۱۱. Imports (۳ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Imports/OldShipmentsImport.php` |
|
||
| 2 | `app/Imports/ShippingRatesImport.php` |
|
||
| 3 | `app/Imports/ShippingRatesMultiSheetImport.php` |
|
||
|
||
---
|
||
|
||
## ۱۲. Provider (۱ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `app/Providers/AdminPanelProvider.php` |
|
||
|
||
> ⚠️ **مهم:** این فایل را در `bootstrap/providers.php` هم ثبت کنید:
|
||
> ```php
|
||
> return [
|
||
> App\Providers\AdminPanelProvider::class,
|
||
> ];
|
||
> ```
|
||
|
||
---
|
||
|
||
## ۱۳. Config (۲ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `config/ifnex.php` |
|
||
| 2 | `config/cors.php` |
|
||
|
||
---
|
||
|
||
## ۱۴. Routes (۱ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `routes/api.php` |
|
||
|
||
---
|
||
|
||
## ۱۵. Bootstrap (۱ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `bootstrap/app.php` |
|
||
|
||
---
|
||
|
||
## ۱۶. Environment (۱ فایل)
|
||
|
||
| # | آدرس مقصد در پروژه Laravel |
|
||
|---|---|
|
||
| 1 | `.env.example` |
|
||
|
||
---
|
||
|
||
## ⚠️ فایلهایی که باید حذف شوند (قدیمی)
|
||
|
||
| # | آدرس | دلیل |
|
||
|---|---|---|
|
||
| 1 | `01_Documents/PRD_v2.md` | قدیمی — فقط ۲ زون و ۲ نوع سرویس |
|
||
| 2 | `01_Documents/Project_Roadmap.md` | قدیمی — نقشه راه ۳ فازی (الان ۴ فازی) |
|
||
|
||
---
|
||
|
||
## ⚠️ فایلهایی که باید دستی اصلاح شوند
|
||
|
||
| # | فایل | تغییر |
|
||
|---|---|---|
|
||
| 1 | `composer.json` | `"laravel/framework": "^12.0"` → `"^11.0"` |
|
||
| 2 | `composer.json` | اضافه کردن `"morilog/jalali": "^5.*"` |
|
||
| 3 | `bootstrap/providers.php` | اضافه کردن `App\Providers\AdminPanelProvider::class` |
|
||
| 4 | فونت Vazirmatn | نصب: `npm install @fontsource/vazirmatn` یا CDN |
|
||
|
||
---
|
||
|
||
> مجموع: **۵۶ فایل** قابل دانلود + **۴ تغییر دستی**
|